diff --git a/.svn/pristine/01/01a939b2196c4a82410c27309d534d61bab96b8e.svn-base b/.svn/pristine/01/01a939b2196c4a82410c27309d534d61bab96b8e.svn-base new file mode 100644 index 0000000..c1b3c58 --- /dev/null +++ b/.svn/pristine/01/01a939b2196c4a82410c27309d534d61bab96b8e.svn-base @@ -0,0 +1,769 @@ + + + + + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 设置密码 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 查看/回复 + 导出 + + + + + 查询 + 导出 + + + + + + + + + 保存 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + 配置设备 + + + + + 查询 + 新建 + 修改 + 删除 + 工序配置 + + + + + 查询 + 新建 + 删除 + 配置BOM明细 + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加1 + 添加2 + 删除 + + + + + 查询 + 修改 + 同步数据 + + + + + 查询 + 修改 + 启用 + 禁用 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + + + + + 查询 + 修改 + + + + + 查询 + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 添加 + 整车添加 + 修改 + 修改计划顺序号 + 插单 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 新建 + 修改 + 修改计划顺序号 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 导出 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 盘点明细 + 盘点对比 + 比对结果 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + + 查询 + 添加 + 编辑 + 删除 + + + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改 + 删除 + + + + + + 查询 + 修改 + 删除 + + + + + 查询 + 修改 + 删除 + + + + + 查询 + 修改批次号 + 删除 + + + + + 查询 + + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 查看明细 + 导出 + + + + + + 查询 + 导出 + + + + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/02/02039cb39d879dbac173a27c3ba07f13e870c931.svn-base b/.svn/pristine/02/02039cb39d879dbac173a27c3ba07f13e870c931.svn-base new file mode 100644 index 0000000..94e65f8 --- /dev/null +++ b/.svn/pristine/02/02039cb39d879dbac173a27c3ba07f13e870c931.svn-base @@ -0,0 +1,934 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Basic; +using QMFrameWork.Data; +using QMFrameWork.Common.Serialization; +using System.Linq; +using QMAPP.WinForm.Forms.Operation; +using System.IO.Ports; +using System.Management; +using System.Threading; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M11-2 + /// 作 用:搪塑条码打印 + /// 作 者:王庆男 + /// 编写日期:2015年05月28日 + /// + public partial class SlushMoldingPrintForOldNewForm : Form + { + + + /// + /// 车型,A:B9车型,B:Q5车型 + /// + public string CarType { set; get; } + + List moldConfigList; + + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + + /// + /// 称重记录 + /// + public List List_tSWeighRecores = new List(); + + /// + /// 新建 + /// + public SlushMoldingPrintForOldNewForm() + { + InitializeComponent(); + btnCommSend.Enabled = true; + serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived); + frmMain_Load(); + moldConfigList = new List(); + } + + /// + /// 窗体初始化 + /// + private void InitForm() + { + //预留方法,用于B9\Q5功能差异 + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + InitForm(); + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + List recorders = null; + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + recorders = recorders.OrderBy(o => o.INDEXVALUE).ToList(); + moldConfigList = recorders; + + #region 绑定下拉列表 + + BasicData basicData = new BasicData(); + //加载搪塑设备列表 + //this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType.tangsu.GetHashCode().ToString() }, true); + //this.comMachineCode.DisplayMember = "MACHINENAME"; + //this.comMachineCode.ValueMember = "MACHINECODDE"; + //this.comMachineCode.SelectedIndex = 1; + //this.comMachineCode.Enabled = false; + + var machinelist = basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachineCode.DataSource = machinelist; + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + + + + //颜色 + this.comColor.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.COLOR.ToString()); + this.comColor.DisplayMember = "VALUE"; + this.comColor.ValueMember = "KEY"; + this.comColor.SelectedValue = "1"; + //this.comColor.Enabled = false; + ////AB腔 + this.comPosition.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.CAVITYTYPE.ToString()); + this.comPosition.DisplayMember = "VALUE"; + this.comPosition.ValueMember = "KEY"; + //this.comPosition.SelectedIndex = 0; + //this.comPosition.Enabled = false; + + + #endregion + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text)) + { + this.dtpDate.Text = DateTime.Now.ToString(); + } + + SetMouldStation(); + + + #region 打印模板拷贝 + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("SlushMoldingPrintForOldForm"); + + #endregion + } + + #region 设置模架号 + /// + /// + /// + private void SetMouldStation() + { + this.cBoxModelCode.DisplayMember = "VALUE"; + this.cBoxModelCode.ValueMember = "KEY"; + List cBoxModelCodeList = new List(); + foreach (var m in moldConfigList) + { + cBoxModelCodeList.Add(new { VALUE = m.MOLDVALUE, KEY = m.MOLDVALUE }); + } + this.cBoxModelCode.DataSource = cBoxModelCodeList; + this.cBoxModelCode.SelectedIndex = 0; + cBoxModelCode.Enabled = false; + + + this.comMouldNumber.DisplayMember = "VALUE"; + this.comMouldNumber.ValueMember = "KEY"; + List comMouldNumberList = new List(); + foreach (var m in moldConfigList) + { + comMouldNumberList.Add(new { VALUE = m.MOLDSTATION, KEY = m.MOLDSTATION }); + } + this.comMouldNumber.DataSource = comMouldNumberList; + this.comMouldNumber.SelectedIndex = 0; + + //判断是否有正在使用的模腔配置信息 + if (moldConfigList.Count(o => o.USED == 1) > 0) + { + //获取该对象 + MoldConfig m = moldConfigList.First(o => o.USED == 1); + //设置模架选择项 + comMouldNumber.SelectedValue = m.MOLDSTATION; + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + } + #endregion + + #region 窗体保存事件 + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + string message = this.ErrorCheck(); + if (!string.IsNullOrEmpty(message)) + { + this.ErrorMessage.Text = message; + return; + } + List listRecorder = new List(); + //窗体数据校验 + //老搪塑只出黑色表皮,模腔号2 为高配B腔 模腔号3 为低配A腔,老搪塑只有一套模具,固定即可 + //搪塑机 + MachineInfo machineInfo = this.comMachineCode.SelectedItem as MachineInfo; + + #region 加载保存信息 + //for (int i = 0; i < 2; i++)//一次出2个码 + //{ + //零件属性 + Product recorder = new Product(); + ProductAttribute productAttribute = new ProductAttribute(); + //搪塑机编号 + productAttribute.VAL1 = machineInfo.MACHINENUM; + //产品类型(车型)成都固定 + productAttribute.VAL2 = "V"; + //高低配 成都无,且固定 + productAttribute.VAL3 = "B"; + //颜色 + productAttribute.VAL4 = this.comColor.SelectedValue.ToString(); + + string[] cb = new string[] { }; + if (!string.IsNullOrEmpty(this.cBoxModelCode.Text)) + { + cb = this.cBoxModelCode.Text.Split('+'); + } + if (cb.Length <= 0) + { + MessageBox.Show("模腔出错!"); + return; + } + + //腔 + + + if (this.comPosition.Text == "搪塑B腔")//第一个为模腔号2 + { + //腔 + productAttribute.VAL5 = "B"; + + //模腔 + productAttribute.VAL6 = cb[0].PadLeft(2, '0'); + } + else if (this.comPosition.Text == "搪塑A腔") + { + //腔 + productAttribute.VAL5 = "A"; + //模腔 + productAttribute.VAL6 = cb[1].PadLeft(2, '0'); + } + + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text.Trim())) + { + productAttribute.VAL7 = Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + productAttribute.VAL7 = Convert.ToDateTime(this.dtpDate.Text.Trim()).ToString("yyyy-MM-dd HH:mm:ss"); + } + + recorder.MACHINECODDE = machineInfo.MACHINECODDE; + recorder.MACHINENAME = machineInfo.MACHINENAME; + recorder.PRODUCTSOURCE = EnumGeter.PRODUCTSOURCE.SELFMADE.GetHashCode().ToString(); + recorder.PRODUCTTYPE = EnumGeter.ProductType.biaopi.GetHashCode().ToString(); + + ////添加加物料号 + //QMAPP.ServicesAgent.ServiceAgent agents = ClientContext.GetServiceAgent(); + //DataResult materialcode = agents.InvokeServiceFunction>(B9BasicService.MaterialCodeBLL_GetMaterialCode.ToString(), productAttribute.VAL2); + //recorder.MATERIAL_CODE = materialcode.Result.ToString(); + + recorder.STATUS = EnumGeter.PRODUCTSTAUTS.QUALIFIED.GetHashCode().ToString(); + recorder.CURRENTPROCESS = EnumGeter.ProcessType.lengdaoruohua.GetHashCode().ToString(); + //ToDo:选择生产线 + //成都固定生产线 + recorder.PRODUCELINE = "IPVW371"; + + recorder.OUTFLAG = EnumGeter.PRODUCTOUTFLAG.INLIBRARY.GetHashCode().ToString(); + recorder.USINGSTATE = EnumGeter.PRODUCTUSESTATE.UNUSED.GetHashCode().ToString(); + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE; + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME; + recorder.CAPACITY = 1; + recorder.USINGCOUNT = 0; + recorder.PRODUCTATTRIBUTE = productAttribute; + recorder.AddM = this.cbM.Checked; + listRecorder.Add(recorder); + //} + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult> result = agent.InvokeServiceFunction>>(B9BasicService.ProductBLL_InsertListEpidermis.ToString(), listRecorder); + + //保存成功 + if (result.IsSuccess) + { + + #region 打印条码 + + this.DialogResult = System.Windows.Forms.DialogResult.OK; + string barCode = result.Result.ToString(); + foreach (PrintCode item in result.Result) + { + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = item.MAINCODE + ",*" + item.PRODUCTCODE + "*" + "," + item.COLOR_CODE; + QM.Assist.PrintUtil.LabelList2.Add(ll); + + + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + + #region 保存称重记录 + + btnCommSend_Click(sender, e); //发送信号 + + + var Entity = new TSWeighRecore(); + Entity.ProductCode = item.PRODUCTCODE; + Entity.PColour = item.COLOR_CODE; + Entity.MATERIAL_CODE = item.MAINCODE; + + List_tSWeighRecores.Add(Entity); + #endregion + + + } + + + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "temPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "dataPath"].ToString + ()); + + #endregion + + #region 重新设置当前使用和列表信息 + + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + + #region 重新设置当前使用 + + + DataResult updateresult = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_UpdateNextUsed.ToString(), new MoldConfig() { MOLDSTATION = moldStation }); + + #endregion + + #region 绑定下拉列表 + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + moldConfigList = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + moldConfigList = moldConfigList.OrderBy(o => o.INDEXVALUE).ToList(); + + + SetMouldStation(); + + #endregion + + #endregion + + //MessageBox.Show("打印成功!"); + + this.ErrorMessage.Text = ""; + + } + else + { + MessageBox.Show(result.Msg); + } + #endregion + + #endregion + } + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 错误检测 + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + //判断条码是否为空 + + ////搪塑设备 + if (this.comMachineCode.SelectedValue == null || this.comMachineCode.SelectedValue == string.Empty) + { + strMessage += Resource1.SlushMachineNullValidate + "\r\n"; + } + ////产品类别 + //if (this.comProType.SelectedValue == null || this.comProType.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.ProductTypeNullValidate + "\r\n"; + //} + //颜色 + if (this.comColor.SelectedValue == null || this.comColor.SelectedValue == string.Empty) + { + strMessage += Resource1.ColorNullValidate + "\r\n"; + } + ////高低配 + //if (this.comHOrL.SelectedValue == null || this.comHOrL.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.HLNullValidate + "\r\n"; + //} + //腔 + if (this.comPosition.SelectedValue == null || this.comPosition.SelectedValue == string.Empty) + { + strMessage += Resource1.PositionNullValidate + "\r\n"; + } + ////模腔号 + //if (this.cBoxModelCode.Text == null || this.cBoxModelCode.Text == string.Empty) + //{ + // strMessage += Resource1.ModelCodeNullValidate + "\r\n"; + //} + + return strMessage; + #endregion + } + #endregion + + + /// + /// + /// + /// + /// + private void comMouldNumber_SelectedIndexChanged(object sender, EventArgs e) + { + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + MoldConfig m = moldConfigList.First(o => o.MOLDSTATION == moldStation); + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + + /// + /// + /// + /// + /// + /// + public object GetPropertyValue(object info, string field) + { + if (info == null) return null; + Type t = info.GetType(); + IEnumerable property = from pi in t.GetProperties() where pi.Name.ToLower() == field.ToLower() select pi; + return property.First().GetValue(info, null); + } + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachineCode.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachineCode.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region + + /// + /// + /// + /// + /// + public delegate void MyInitDelegate(RichTextBox myRtb, string strTemp); + public void DelegateInitMethod(RichTextBox myRtb, string strTemp) + { + myRtb.AppendText(strTemp + System.Environment.NewLine); + } + /// + /// 所有的串口类型 + /// + public enum HardwareEnum + { + Win32_Processor, + Win32_PhysicalMemory, + Win32_Keyboard, + Win32_PointingDevice, + Win32_FloppyDrive, + Win32_DiskDrive, + Win32_CDROMDrive, + Win32_BaseBoard, + Win32_BIOS, + Win32_ParallelPort, + Win32_SerialPort, + Win32_SerialPortConfiguration, + Win32_SoundDevice, + Win32_SystemSlot, + Win32_USBController, + Win32_NetworkAdapter, + Win32_NetworkAdapterConfiguration, + Win32_Printer, + Win32_PrinterConfiguration, + Win32_PrintJob, + Win32_TCPIPPrinterPort, + Win32_POTSModem, + Win32_POTSModemToSerialPort, + Win32_DesktopMonitor, + Win32_DisplayConfiguration, + Win32_DisplayControllerConfiguration, + Win32_VideoController, + Win32_VideoSettings, + Win32_TimeZone, + Win32_SystemDriver, + Win32_DiskPartition, + Win32_LogicalDisk, + Win32_LogicalDiskToPartition, + Win32_LogicalMemoryConfiguration, + Win32_PageFile, + Win32_PageFileSetting, + Win32_BootConfiguration, + Win32_ComputerSystem, + Win32_OperatingSystem, + Win32_StartupCommand, + Win32_Service, + Win32_Group, + Win32_GroupUser, + Win32_UserAccount, + Win32_Process, + Win32_Thread, + Win32_Share, + Win32_NetworkClient, + Win32_NetworkProtocol, + Win32_PnPEntity, + } + + /// + /// 获取所有串口数据(2) + /// + public static string[] MulGetHardwareInfo(HardwareEnum hardType, string propKey) + { + + List stringList = new List(); + try + { + + ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("select * from " + (object)hardType); + + foreach (ManagementBaseObject managementBaseObject in managementObjectSearcher.Get()) + { + if (managementBaseObject.Properties[propKey].Value != null) + { + string s = managementBaseObject.Properties[propKey].Value.ToString(); + int num = s.LastIndexOf("(COM"); + + if (num != -1 && char.IsNumber(s, num + 4)) + stringList.Add(managementBaseObject.Properties[propKey].Value.ToString()); + } + } + + managementObjectSearcher.Dispose(); + return stringList.ToArray(); + } + catch + { + MessageBox.Show("MulGetHardwareInfo!"); + return stringList.ToArray(); + } + finally + { + } + } + + /// + /// 获取所有串口数据(1) + /// + private void frmMain_Load() + { + try + { + string[] hardwareInfo = MulGetHardwareInfo(HardwareEnum.Win32_PnPEntity, "Name"); + + int length = hardwareInfo.Length; + List listItem = new List(); + + for (int index = 0; index < length; ++index) + { + listItem.Add(new ListItem((string)hardwareInfo[index], (string)hardwareInfo[index])); + } + this.textBox1.DataSource = listItem; + this.textBox1.DisplayMember = "VALUE"; + this.textBox1.ValueMember = "KEY"; + } + catch + { + MessageBox.Show("frmMain_Load!"); + } + + + } + + public string CodeName = string.Empty; + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + string text = this.textBox1.SelectedValue.ToString(); + int num = text.LastIndexOf("COM"); + + if (num == -1) + return; + + char ch1 = text[num + 3]; + char ch2 = text[num + 4]; + + if ((int)ch2 == 41) + CodeName = "COM" + (object)ch1; + else + CodeName = "COM" + (object)ch1 + (object)ch2; + } + catch + { + MessageBox.Show("comboBox1_SelectedIndexChanged!"); + } + + } + public string Weigh_str = string.Empty; + private SerialPort serialPort1 = new SerialPort(); + + /// + /// 获取设备返回结果 + /// + /// + /// + private void serialPort1_DataReceived(object sender, EventArgs e) + { + try + { + int bytesToRead = this.serialPort1.BytesToRead; + + if (bytesToRead == 0) + return; + + //TBRCV.Text = ""; + bool flag = true; + + while (flag) + { + Thread.Sleep(50); + + if (this.serialPort1.BytesToRead == bytesToRead) + flag = false; + else + bytesToRead = this.serialPort1.BytesToRead; + } + + byte[] numArray1 = new byte[bytesToRead]; + this.serialPort1.Read(numArray1, 0, bytesToRead); + byte[] numArray2 = callcrc(numArray1, bytesToRead - 2); + string str = string.Empty; + + for (int index = 0; index < numArray1.Length; ++index) + str = (int)numArray1[index] >= 16 ? str + Convert.ToString(numArray1[index], 16) + " " : str + "0" + Convert.ToString(numArray1[index], 16) + " "; + //Weigh_str = str.ToUpper(); + + if ((int)numArray2[0] == (int)numArray1[bytesToRead - 2] && + (int)numArray2[1] == (int)numArray1[bytesToRead - 1]) + { + Weigh_str = str.ToUpper(); + TBRCV.BeginInvoke(new MyInitDelegate(DelegateInitMethod), new object[] { TBRCV, str.ToUpper() }); + Weigh_str = Weigh_str.Trim(); + Weigh_str = Weigh_str.Substring(Weigh_str.Length - 11, 2) + Weigh_str.Substring(Weigh_str.Length - 8, 2); + Weigh_str = Convert.ToInt32(Weigh_str, 16).ToString(); + foreach (var t in List_tSWeighRecores) + { + t.Weigh = Weigh_str; + agent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.TSWeighRecoreBLL_Insert.ToString(), t); + } + List_tSWeighRecores = new List(); + + } + else + { + Weigh_str = "接收错误"; + this.TBRCV.Text = str.ToUpper() + "接收错误 CRC有误"; + } + } + catch + { + MessageBox.Show("serialPort1_DataReceived!"); + } + } + public static byte[] strToToHexByte(string hexString) + { + try + { + hexString = hexString.Replace(" ", ""); + + if (hexString.Length % 2 != 0) + hexString += "0"; + + byte[] numArray = new byte[hexString.Length / 2]; + + for (int index = 0; index < numArray.Length; ++index) + { + try + { + numArray[index] = Convert.ToByte(hexString.Substring(index * 2, 2), 16); + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + return numArray; + } + catch + { + MessageBox.Show("strToToHexByte!"); + return new byte[] { }; + } + + } + public static byte[] addCrcHexByte(byte[] strHexByte) + { + try + { + byte[] numArray = new byte[strHexByte.Length + 2]; + + for (int index = 0; index < strHexByte.Length; ++index) + { + try + { + numArray[index] = strHexByte[index]; + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + byte[] numArray2 = callcrc(strHexByte, strHexByte.Length); + numArray[strHexByte.Length + 0] = numArray2[0]; + numArray[strHexByte.Length + 1] = numArray2[1]; + return numArray; + } + catch + { + MessageBox.Show("addCrcHexByte!"); + return new byte[] { }; + } + + } + public static byte[] callcrc(byte[] ss, int num) + { + try + { + ushort num1 = ushort.MaxValue; + byte[] numArray = ss; + + for (byte index1 = 0; (int)index1 < num; ++index1) + { + num1 ^= (ushort)numArray[(int)index1]; + + for (byte index2 = 0; (int)index2 < 8; ++index2) + { + if (((int)num1 & 1) > 0) + num1 = (ushort)((uint)(ushort)((uint)num1 >> 1) ^ 40961U); + else + num1 >>= 1; + } + } + + byte num2 = (byte)((uint)num1 >> 8); + return new byte[2] + { + (byte)((uint) num1 & (uint) byte.MaxValue), + num2 + }; + } + catch + { + MessageBox.Show("callcrc!"); + return new byte[] { }; + } + + } + + /// + /// 打开设备通讯 + /// + /// + /// + private void btnCom_Click(object sender, EventArgs e) + { + try + { + if (CodeName == "") + { + comboBox1_SelectedIndexChanged(sender, e); + } + + serialPort1.BaudRate = Convert.ToInt32(19200); + serialPort1.Parity = Parity.None; + serialPort1.DataBits = 8; + serialPort1.StopBits = StopBits.One; + serialPort1.ReadBufferSize = 4068; + serialPort1.WriteBufferSize = 4068; + serialPort1.ReadTimeout = 200; + serialPort1.WriteTimeout = 200; + serialPort1.PortName = CodeName; + serialPort1.Open(); + + this.TBSEND.Text = "连接设备"; + } + catch + { + MessageBox.Show("btnCom_Click!"); + } + + } + + /// + /// 发送连接请求 + /// + /// + /// + private void btnCommSend_Click(object sender, EventArgs e) + { + try { + //btnCom_Click(); + if (serialPort1.IsOpen) + { + byte[] toHexByte = strToToHexByte("01" + "03" + "0FA1" + "0002"); + byte[] buffer = addCrcHexByte(toHexByte); + serialPort1.Write(buffer, 0, buffer.Length); + //TBRCV.Text = ""; + TBSEND.Text = ""; + string str = string.Empty; + + for (int index = 0; index < buffer.Length; ++index) + str = (int)buffer[index] >= 16 ? str + Convert.ToString(buffer[index], 16) + " " : str + "0" + Convert.ToString(buffer[index], 16) + " "; + + TBSEND.Text = str.ToUpper(); + } + else + { + int num1 = (int)MessageBox.Show("请打开设备连接!"); + } + } + catch + { + MessageBox.Show("btnCommSend_Click!"); + } + + } + + #endregion + + } +} diff --git a/.svn/pristine/02/023405fca8d9bde68f6ad31f98f1e333f79ec8fc.svn-base b/.svn/pristine/02/023405fca8d9bde68f6ad31f98f1e333f79ec8fc.svn-base new file mode 100644 index 0000000..ba6ac39 --- /dev/null +++ b/.svn/pristine/02/023405fca8d9bde68f6ad31f98f1e333f79ec8fc.svn-base @@ -0,0 +1,762 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using System.Linq; +using QM.Common; +using QMAPP.Entity; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Andon; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.ODS; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.Stocktaking; +using QMAPP.MD.Entity; +namespace QMAPP.WinForm.Common +{ + public class BasicData + { + #region ȡб + /// + /// ȡб + /// + /// + public List GetShiftComboxSource() + { + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + ProduceShift entity = new ProduceShift(); + List list = new List(); + try + { + //ȡϢ + list = agent.InvokeServiceFunction>("ProduceShiftBLL_GetWorkcenterShifts", ""); + //Ƿ䷵ֵ + list.Insert(0, new ProduceShift()); + return list; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + /// + /// ȡб + /// + /// + public List GetVideoInfoList() + { + //ȡ + VideoTypeEntity searchModel = new VideoTypeEntity(); + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("VideoTypeBLL_GetAllList"); + //Ƿ䷵ֵ + list.Insert(0, new VideoTypeEntity()); + return list; + } + + /// + /// ȡ豸б + /// + /// + public List GetMachineInfoList(string[] processType, bool isWithEmpty) + { + //ȡ + MachineInfo searchModel = new MachineInfo(); + if (processType.Length > 0) + { + searchModel.PROCESSTYPES = "'" + string.Join("','", processType) + "'"; + } + searchModel.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MachineInfoBLL_GetAllList", searchModel); + list = list.OrderBy(p => p.MACHINENAME).ToList() ; + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MachineInfo()); + } + return list; + } + + /// + /// ȡ豸б + /// + /// + public List GetMachineInfoListPro(string[] processType, bool isWithEmpty) + { + //ȡ + MachineInfo searchModel = new MachineInfo(); + if (processType.Length > 0) + { + searchModel.PROCESSTYPES = "'" + string.Join("','", processType) + "'"; + } + searchModel.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MachineInfoBLL_GetAllList", searchModel); + list = list.OrderBy(p => p.MACHINENAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MachineInfo()); + } + return list; + } + + /// + /// ȡ豸б20171105 + /// + /// + public List GetMachineList(string ordertype, bool isWithEmpty) + { + //ȡ + MachineInfo searchModel = new MachineInfo(); + searchModel.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + WorkCell info = new WorkCell(); + info.WORKCELL_CODE = ordertype; + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MachineInfoBLL_GetMachineForOrderList", new MachineInfo(), info); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MachineInfo()); + } + return list; + } + + /// + /// ȡ豸б + /// + /// + public List GetMachineInfoAndModelList(string[] processType, bool isWithEmpty) + { + //ȡ + MachineInfo searchModel = new MachineInfo(); + if (processType.Length > 0) + { + searchModel.PROCESSTYPES = string.Join(",", processType); + } + searchModel.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9BasicService.MachineInfoBLL_GetAllListAndModels.ToString(), searchModel); + list = list.OrderBy(p => p.MACHINENAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MachineInfo { MACHINENAME = "", MACHINECODDE = "" }); + } + return list; + } + + public List GetMachineInfoMachineCheck() + { + //ȡ + + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MachineInfoBLL_GetMachineInfoMachineCheck"); + list.Insert(0, new MachineInfo { MACHINENAME = "", MACHINECODDE = "" }); + return list; + } + + /// + /// ȡԭб + /// + /// + public List GetMaterielInfoList(string materialType, bool isWithEmpty) + { + //ȡ + MD.Entity.Material searchModel = new MD.Entity.Material(); + searchModel.MATERIAL_TYPE_CODE = materialType; + //searchModel.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetMaterialList", searchModel); + list = list.OrderBy(p => p.MATERIAL_NAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MD.Entity.Material()); + } + return list; + } + + /// + /// ȡб + /// + /// + public List GetOperatorInfoList(string processType, bool isWithEmpty) + { + //ȡ + OperatorInfo searchModel = new OperatorInfo(); + searchModel.PROCESSTYPE = processType; + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9BasicService.OperatorInfoBLL_GetAllList.ToString(), searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new OperatorInfo()); + } + return list; + } + + /// + /// ȡб + /// + /// + public List GetOperatorInfoComboxSource(string processType, bool isWithEmpty) + { + List list = new List(); + //ȡ + List listEntity = GetOperatorInfoList(processType, isWithEmpty); + foreach (var item in listEntity) + { + list.Add(new ListItem(item.OPERATOR, item.OPERATORCODE)); + } + return list; + } + + + /// + /// ȡϼб + /// + /// + public List GetMaterialShelfTypeList(string productType, bool isWithEmpty) + { + //ȡ + MaterialShelfType searchModel = new MaterialShelfType(); + if (!string.IsNullOrEmpty(productType)) + { + searchModel.PRODUCTTYPE = productType; + } + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9BasicService.MaterialShelfTypeBLL_GetAllList.ToString(), searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MaterialShelfType()); + } + return list; + } + + + /// + /// ȡб + /// + /// + public List GetProductBasicList(string productType, bool isWithEmpty) + { + //ȡ + ProductBasic searchModel = new ProductBasic(); + if (!string.IsNullOrEmpty(productType)) + { + searchModel.PRODUCTMAINTYPE = productType; + } + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9BasicService.ProductBasicBLL_GetAllList.ToString(), searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new ProductBasic()); + } + return list; + } + + /// + /// ȡб + /// + /// + public List GetProductBasicList(ProductBasic searchModel, bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9BasicService.ProductBasicBLL_GetAllList.ToString(), searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new ProductBasic()); + } + return list; + } + /// + /// ȡб + /// + /// + public List GetMaterialTypeList(MaterialClass searchModel, bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialClassBLL_GetAllList", searchModel); + list = list.OrderBy(p => p.MATERIAL_TYPE_NAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MaterialClass()); + } + return list; + } + + /// + /// ȡƷĿб + /// + /// + public List GetProjectList(bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("ProjectBLL_GetAllList", new Project { }); + list = list.OrderBy(p => p.PROJECT_NAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new Project()); + } + return list; + } + + /// + /// ȡDictionary.xmlб + /// + /// + public List GetDictionaryList(string kind) + { + List listItem = new List(); + Dictionary dicts = null; + QMFrameWork.Common.Util.ModelDictionaryHandler.TryGetModelDictionary(kind.ToString(), out dicts); + foreach (string item in dicts.Keys) + { + listItem.Add(new ListItem(item, dicts[item])); + } + return listItem; + } + + /// + /// ȡб + /// + /// + public List GetProduceShiftComboxSource(ProduceShift condition, bool isWithEmpty) + { + //ִвѯ + List listEntity = new List(); + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + listEntity = agent.InvokeServiceFunction>(B9BasicService.ProduceShiftBLL_GetAllList.ToString(), condition); + //Ƿ䷵ֵ + if (isWithEmpty) + { + listEntity.Insert(0, new ProduceShift { PRODUCESHIFTNAME = string.Empty, PRODUCESHIFTTCODE = string.Empty }); + } + foreach (var item in listEntity) + { + list.Add(new ListItem(item.PRODUCESHIFTNAME, item.PRODUCESHIFTTCODE)); + } + return list; + } + + public List GetPrintModelCopy(string formFlag) + { + //ȡ + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>(B9IPCService.PrintModelCopyBLL_GetPrintModelCopyList.ToString(), formFlag); + //Ƿ䷵ֵ + return list; + } + + + /// + /// ȡб + /// + /// + public List GetMaterialTypeList(string ordertype, bool isWithEmpty) + { + //ִвѯ + List list = new List(); + WorkCell info = new WorkCell(); + info.WORKCELL_CODE = ordertype; + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetMaterialClassWithType", new MaterialClass(), info); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MaterialClass()); + } + return list; + } + + /// + /// ȡϺ + /// + /// + public List GetmaterialCodeList(string materialType, bool isWithEmpty) + { + //ȡ + QMAPP.MD.Entity.Material searchModel = new QMAPP.MD.Entity.Material(); + searchModel.MATERIAL_TYPE_CODE = materialType; + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetAllList", searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new QMAPP.MD.Entity.Material()); + } + return list; + } + + /// + /// ϶ȡб + /// + /// + public List GetMaterialClassToMendRecorderWasteForm(bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetMaterialClassToMendRecorderWasteForm"); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new MaterialClass()); + } + return list; + } + + /// + /// ȡб + /// + /// + public List GetWorkCellList(bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("WorkCellBLL_GetAllList", new WorkCell()); + list = list.OrderBy(p => p.WORKCELL_NAME).ToList(); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new WorkCell()); + } + return list; + } + + /// + /// ɨȡ֮ǰб + /// ɸѡ + /// + /// + public List GetMainOperationWorkCell(string ProductCode) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MainOperationBLL_GetMainOperationWorkCell", ProductCode, true); + + if (list.Count > 0) + { + foreach (MainOperation item in list) + { + item.WORKCELL_NAME = item.WORKCELL_NAME + ":" + item.PRODUCTCODE; + } + list.Insert(0, new MainOperation()); + } + //Ϊվעܼ + else + { + list = agent.InvokeServiceFunction>("MainOperationBLL_GetMainOperationWorkCell", ProductCode, false); + foreach (MainOperation item in list) + { + item.WORKCELL_NAME = "עܻ"; + item.WORKCELL_CODE = "INJECTION"; + } + } + return list; + } + + /// + /// ȡԭ + /// + /// + /// + public List GetOutReasonList(bool isWithEmpty) + { + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("ProductOutBLL_GetOutReasonList", new OutReason()); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new OutReason()); + } + return list; + } + + /// + /// ȡֵ + /// + /// + /// + public List GetInputValueList(string checkcode, bool isWithEmpty) + { + InputValue searchModel = new InputValue(); + searchModel.CHECKITEMCODE = checkcode; + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("ProductCheckBLL_GetInputValueList", searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new InputValue { INPUTVALUE = string.Empty }); + } + return list; + } + + /// + /// ȡ + /// + /// + public List GetConfigDetailComboxSource(string MainTypeCode, bool isWithEmpty) + { + //ִвѯ + List list = new List(); + //List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("ConfigDetailBLL_GetAllList", MainTypeCode); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new ConfigDetail { DetailTypeName = string.Empty, DetailTypeCode = string.Empty }); + } + //foreach (ConfigDetail item in list) + //{ + // item.DetailTypeName = item.DetailTypeCode + "/" + item.DetailTypeName; + //} + return list; + } + + //ԶComboBoxݵĿ + public void AdjustComboBoxDropDownListWidth(object comboBox) + { + Graphics g = null; + Font font = null; + try + { + ComboBox senderComboBox = null; + if (comboBox is ComboBox) + senderComboBox = (ComboBox)comboBox; + else if (comboBox is ToolStripComboBox) + senderComboBox = ((ToolStripComboBox)comboBox).ComboBox; + else + return; + + int width = senderComboBox.Width; + g = senderComboBox.CreateGraphics(); + font = senderComboBox.Font; + + //checks if a scrollbar will be displayed. + //If yes, then get its width to adjust the size of the drop down list. + int vertScrollBarWidth = + (senderComboBox.Items.Count > senderComboBox.MaxDropDownItems) + ? SystemInformation.VerticalScrollBarWidth : 0; + + int newWidth; + foreach (object s in senderComboBox.Items) //Loop through list items and check size of each items. + { + if (s != null) + { + newWidth = (int)g.MeasureString(s.ToString().Trim(), font).Width + + vertScrollBarWidth; + if (width < newWidth) + width = newWidth; //set the width of the drop down list to the width of the largest item. + } + } + senderComboBox.DropDownWidth = width; + } + catch + { } + finally + { + if (g != null) + g.Dispose(); + } + } + + #region ȡȫб + /// + /// ȡб + /// + /// Դ + public List GetAllWorkCenterComboxSource() + { + var workCenter = new WorkCenter(); + QMAPP.ServicesAgent.ServiceAgent wcfAgent = ClientContext.GetServiceAgent(); + //ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("WorkCenterBLL_GetWorkCenterList", workCenter); + return dataResult.Result; + } + catch (Exception ex) + { + throw ex; + } + } + public List GetFactoryWorkCenterComboxSource(string factoryCode) + { + ServiceAgent wcfAgent = ClientContext.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("WorkCenterBLL_GetWorkCenterList", new WorkCenter { FACTORY_CODE = factoryCode }); + + return dataResult.Result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region ȡλб() + /// + /// ȡб + /// + /// Դ + public List GetWorkLocComboxSource(string workCenterCode) + { + List list = new List(); + ServiceAgent wcfAgent = ClientContext.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(workCenterCode) == false) + { + list = wcfAgent.InvokeServiceFunction> + ("WorkLocBLL_GetWorkLocFromWorkCenterCodeList", workCenterCode); + //foreach (WorkLoc item in dataResult) + //{ + // item.WORKLOC_NAME = item.WORKLOC_NAME; + // list.Add(item); + //} + } + return list; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region ȡԭϢT_PP_ORDERENTITY MATERIALTYPE + /// + /// ȡԭϢT_PP_ORDERENTITY MATERIALTYPE + /// + /// + public List GetMaterialInfoByType(string OrderType, bool isWithEmpty) + { + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + OrderIndentity OrderSearch = new OrderIndentity(); + if (!string.IsNullOrEmpty(OrderType)) + { + OrderSearch.ORDER_TYPE = OrderType; + OrderSearch = agent.InvokeServiceFunction("MaterialBLL_GetOrderInfo", OrderSearch); + } + //ȡ + QMAPP.MD.Entity.Material searchModel = new QMAPP.MD.Entity.Material(); + if (!string.IsNullOrEmpty(OrderSearch.MATERIALTYPE)) + { + string str = string.Join(",", OrderSearch.MATERIALTYPE); + searchModel.MATERIALTYPES = "'" + str.Replace(",", "','") + "'"; + } + //ִвѯ + List list = new List(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetAllList", searchModel); + //Ƿ䷵ֵ + if (isWithEmpty) + { + list.Insert(0, new QMAPP.MD.Entity.Material()); + } + return list; + } + #endregion + + + + /// + /// ȡϢ + /// + /// + /// + /// + public List GetMaterialInfoList(string materialCode, bool isWithEmpty) + { + QMAPP.MD.Entity.Material searchModel = new QMAPP.MD.Entity.Material(); + searchModel.MATERIAL_CODE = materialCode; + //ִвѯ + List list = new List(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + list = agent.InvokeServiceFunction>("MaterialBLL_GetMaterialInfoListBy", searchModel); + //Ƿ䷵ֵ + if (list.Count > 0) + { + foreach (QMAPP.MD.Entity.Material item in list) + { + item.MATERIAL_NAME = item.MATERIAL_NAME + ":" + item.MATERIAL_CODE; + } + } + if (isWithEmpty) + { + list.Insert(0, new QMAPP.MD.Entity.Material { MATERIAL_NAME = "", MATERIAL_CODE = "" }); + } + return list; + } + + + /// + /// + /// + /// + /// + /// + public QMAPP.MD.Entity.Material GetMaterialInfo(string materialCode) + { + QMAPP.MD.Entity.Material searchModel = new QMAPP.MD.Entity.Material(); + searchModel.MATERIAL_CODE = materialCode; + //ִвѯ + QMAPP.MD.Entity.Material MaterialInfo = new QMAPP.MD.Entity.Material(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + MaterialInfo = agent.InvokeServiceFunction("MaterialBLL_GetMaterialInfo", searchModel); + return MaterialInfo; + } + + } +} diff --git a/.svn/pristine/02/02559df1d6cc7b18e9925cef1587e5588a9f52d9.svn-base b/.svn/pristine/02/02559df1d6cc7b18e9925cef1587e5588a9f52d9.svn-base new file mode 100644 index 0000000..564a0ee Binary files /dev/null and b/.svn/pristine/02/02559df1d6cc7b18e9925cef1587e5588a9f52d9.svn-base differ diff --git a/.svn/pristine/02/02b126a3c9f0e62b1ba229266138379dd5099a6e.svn-base b/.svn/pristine/02/02b126a3c9f0e62b1ba229266138379dd5099a6e.svn-base new file mode 100644 index 0000000..9dbad91 --- /dev/null +++ b/.svn/pristine/02/02b126a3c9f0e62b1ba229266138379dd5099a6e.svn-base @@ -0,0 +1,580 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class SlushMoldingPrintForOldNewForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.lblLock = new System.Windows.Forms.LinkLabel(); + this.label12 = new System.Windows.Forms.Label(); + this.comMouldNumber = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.cbM = new System.Windows.Forms.CheckBox(); + this.cBoxModelCode = new System.Windows.Forms.ComboBox(); + this.comMachineCode = new System.Windows.Forms.ComboBox(); + this.dtpDate = new DateTimePickerA(); + this.label14 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.comPosition = new System.Windows.Forms.ComboBox(); + this.comColor = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.ErrorMessage = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MAINCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.COLOR = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PRODUCTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tsbSave = new System.Windows.Forms.Button(); + this.btnCommSend = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.TBRCV = new System.Windows.Forms.RichTextBox(); + this.textBox1 = new System.Windows.Forms.ComboBox(); + this.TBSEND = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.infolabel = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.lblLock); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.comMouldNumber); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.cbM); + this.groupBox1.Controls.Add(this.cBoxModelCode); + this.groupBox1.Controls.Add(this.comMachineCode); + this.groupBox1.Controls.Add(this.dtpDate); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.comPosition); + this.groupBox1.Controls.Add(this.comColor); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(720, 2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(499, 368); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "信息录入"; + // + // lblLock + // + this.lblLock.AutoSize = true; + this.lblLock.Font = new System.Drawing.Font("新宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblLock.Location = new System.Drawing.Point(68, 64); + this.lblLock.Name = "lblLock"; + this.lblLock.Size = new System.Drawing.Size(89, 19); + this.lblLock.TabIndex = 20; + this.lblLock.TabStop = true; + this.lblLock.Tag = "0"; + this.lblLock.Text = "锁定工位"; + this.lblLock.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblLock_LinkClicked); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(68, 221); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(21, 25); + this.label12.TabIndex = 18; + this.label12.Text = "*"; + // + // comMouldNumber + // + this.comMouldNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMouldNumber.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMouldNumber.FormattingEnabled = true; + this.comMouldNumber.Location = new System.Drawing.Point(166, 216); + this.comMouldNumber.Name = "comMouldNumber"; + this.comMouldNumber.Size = new System.Drawing.Size(247, 32); + this.comMouldNumber.TabIndex = 16; + this.comMouldNumber.SelectedIndexChanged += new System.EventHandler(this.comMouldNumber_SelectedIndexChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label13.Location = new System.Drawing.Point(88, 221); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(76, 16); + this.label13.TabIndex = 17; + this.label13.Text = "模架号:"; + // + // cbM + // + this.cbM.AutoSize = true; + this.cbM.Checked = true; + this.cbM.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbM.Enabled = false; + this.cbM.Location = new System.Drawing.Point(427, 44); + this.cbM.Name = "cbM"; + this.cbM.Size = new System.Drawing.Size(69, 29); + this.cbM.TabIndex = 15; + this.cbM.Text = "扣料"; + this.cbM.UseVisualStyleBackColor = true; + // + // cBoxModelCode + // + this.cBoxModelCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBoxModelCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cBoxModelCode.FormattingEnabled = true; + this.cBoxModelCode.Location = new System.Drawing.Point(166, 273); + this.cBoxModelCode.Name = "cBoxModelCode"; + this.cBoxModelCode.Size = new System.Drawing.Size(247, 32); + this.cBoxModelCode.TabIndex = 12; + // + // comMachineCode + // + this.comMachineCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMachineCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMachineCode.FormattingEnabled = true; + this.comMachineCode.Items.AddRange(new object[] { + "否", + "是"}); + this.comMachineCode.Location = new System.Drawing.Point(166, 41); + this.comMachineCode.Name = "comMachineCode"; + this.comMachineCode.Size = new System.Drawing.Size(247, 32); + this.comMachineCode.TabIndex = 11; + // + // dtpDate + // + this.dtpDate.CustomFormat = " "; + this.dtpDate.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtpDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.FormatString = "yyyy年MM月dd日"; + this.dtpDate.Location = new System.Drawing.Point(166, 329); + this.dtpDate.Name = "dtpDate"; + this.dtpDate.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.Size = new System.Drawing.Size(249, 35); + this.dtpDate.TabIndex = 10; + this.dtpDate.ValueX = null; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.Color.Red; + this.label14.Location = new System.Drawing.Point(99, 163); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(21, 25); + this.label14.TabIndex = 9; + this.label14.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(68, 270); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(21, 25); + this.label10.TabIndex = 9; + this.label10.Text = "*"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(45, 42); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(21, 25); + this.label6.TabIndex = 9; + this.label6.Text = "*"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Red; + this.label4.Location = new System.Drawing.Point(78, 105); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(21, 25); + this.label4.TabIndex = 9; + this.label4.Text = "*"; + // + // comPosition + // + this.comPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comPosition.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comPosition.FormattingEnabled = true; + this.comPosition.Items.AddRange(new object[] { + "A+B"}); + this.comPosition.Location = new System.Drawing.Point(166, 160); + this.comPosition.Name = "comPosition"; + this.comPosition.Size = new System.Drawing.Size(247, 32); + this.comPosition.TabIndex = 5; + // + // comColor + // + this.comColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comColor.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comColor.FormattingEnabled = true; + this.comColor.Location = new System.Drawing.Point(166, 99); + this.comColor.Name = "comColor"; + this.comColor.Size = new System.Drawing.Size(247, 32); + this.comColor.TabIndex = 3; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label11.Location = new System.Drawing.Point(118, 163); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(42, 16); + this.label11.TabIndex = 6; + this.label11.Text = "腔:"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label15.Location = new System.Drawing.Point(70, 333); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(93, 16); + this.label15.TabIndex = 6; + this.label15.Text = "加工时间:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(86, 278); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(76, 16); + this.label9.TabIndex = 6; + this.label9.Text = "模腔号:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label5.Location = new System.Drawing.Point(70, 44); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(93, 16); + this.label5.TabIndex = 6; + this.label5.Text = "搪塑设备:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(101, 107); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(59, 16); + this.label3.TabIndex = 6; + this.label3.Text = "颜色:"; + // + // ErrorMessage + // + this.ErrorMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ErrorMessage.AutoSize = true; + this.ErrorMessage.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ErrorMessage.ForeColor = System.Drawing.Color.Red; + this.ErrorMessage.Location = new System.Drawing.Point(741, 649); + this.ErrorMessage.Name = "ErrorMessage"; + this.ErrorMessage.Size = new System.Drawing.Size(0, 25); + this.ErrorMessage.TabIndex = 19; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.DGView); + this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox2.Location = new System.Drawing.Point(2, 2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(714, 794); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "打印记录"; + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MAINCODE, + this.COLOR, + this.PRODUCTCODE, + this.CREATETIME}); + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(3, 29); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(708, 762); + this.DGView.TabIndex = 39; + // + // MAINCODE + // + this.MAINCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MAINCODE.DataPropertyName = "MAINCODE"; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 15.75F); + this.MAINCODE.DefaultCellStyle = dataGridViewCellStyle8; + this.MAINCODE.FillWeight = 48.95314F; + this.MAINCODE.HeaderText = "条码信息"; + this.MAINCODE.Name = "MAINCODE"; + this.MAINCODE.ReadOnly = true; + this.MAINCODE.Width = 240; + // + // COLOR + // + this.COLOR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.COLOR.DataPropertyName = "MATERIAL_NAME"; + dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 15.75F); + this.COLOR.DefaultCellStyle = dataGridViewCellStyle9; + this.COLOR.FillWeight = 99.90437F; + this.COLOR.HeaderText = "表皮颜色"; + this.COLOR.Name = "COLOR"; + this.COLOR.ReadOnly = true; + this.COLOR.Width = 150; + // + // PRODUCTCODE + // + this.PRODUCTCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.PRODUCTCODE.DataPropertyName = "PRODUCTCODE"; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PRODUCTCODE.DefaultCellStyle = dataGridViewCellStyle10; + this.PRODUCTCODE.FillWeight = 48.95314F; + this.PRODUCTCODE.HeaderText = "零件号"; + this.PRODUCTCODE.Name = "PRODUCTCODE"; + this.PRODUCTCODE.ReadOnly = true; + this.PRODUCTCODE.Width = 240; + // + // CREATETIME + // + this.CREATETIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.CREATETIME.DataPropertyName = "CREATETIME"; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle11.Format = "f"; + dataGridViewCellStyle11.NullValue = null; + this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle11; + this.CREATETIME.FillWeight = 48.95314F; + this.CREATETIME.HeaderText = "操作时间"; + this.CREATETIME.Name = "CREATETIME"; + this.CREATETIME.ReadOnly = true; + this.CREATETIME.Width = 250; + // + // tsbSave + // + this.tsbSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.Location = new System.Drawing.Point(877, 624); + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(232, 137); + this.tsbSave.TabIndex = 35; + this.tsbSave.Text = "打印"; + this.tsbSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.tsbSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.tsbSave.UseVisualStyleBackColor = true; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // btnCommSend + // + this.btnCommSend.Enabled = false; + this.btnCommSend.Location = new System.Drawing.Point(780, 385); + this.btnCommSend.Name = "btnCommSend"; + this.btnCommSend.Size = new System.Drawing.Size(80, 32); + this.btnCommSend.TabIndex = 52; + this.btnCommSend.Text = "连接设备"; + this.btnCommSend.UseVisualStyleBackColor = true; + this.btnCommSend.Click += new System.EventHandler(this.btnCom_Click); + // + // groupBox3 + // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.TBRCV); + this.groupBox3.Location = new System.Drawing.Point(791, 469); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(365, 62); + this.groupBox3.TabIndex = 53; + this.groupBox3.TabStop = false; + // + // TBRCV + // + this.TBRCV.Dock = System.Windows.Forms.DockStyle.Fill; + this.TBRCV.Location = new System.Drawing.Point(3, 17); + this.TBRCV.Name = "TBRCV"; + this.TBRCV.Size = new System.Drawing.Size(359, 42); + this.TBRCV.TabIndex = 0; + this.TBRCV.Text = ""; + // + // textBox1 + // + this.textBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textBox1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox1.FormattingEnabled = true; + this.textBox1.Location = new System.Drawing.Point(876, 386); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(280, 32); + this.textBox1.TabIndex = 21; + // + // TBSEND + // + this.TBSEND.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TBSEND.Location = new System.Drawing.Point(876, 433); + this.TBSEND.Multiline = true; + this.TBSEND.Name = "TBSEND"; + this.TBSEND.Size = new System.Drawing.Size(279, 38); + this.TBSEND.TabIndex = 54; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label1.Location = new System.Drawing.Point(777, 444); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(93, 16); + this.label1.TabIndex = 21; + this.label1.Text = "连接编码:"; + // + // infolabel + // + this.infolabel.AutoSize = true; + this.infolabel.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.infolabel.ForeColor = System.Drawing.Color.Red; + this.infolabel.Location = new System.Drawing.Point(774, 549); + this.infolabel.Name = "infolabel"; + this.infolabel.Size = new System.Drawing.Size(0, 31); + this.infolabel.TabIndex = 55; + // + // SlushMoldingPrintForOldNewForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1223, 798); + this.Controls.Add(this.infolabel); + this.Controls.Add(this.label1); + this.Controls.Add(this.TBSEND); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.btnCommSend); + this.Controls.Add(this.tsbSave); + this.Controls.Add(this.ErrorMessage); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "SlushMoldingPrintForOldNewForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "单色搪塑机条码打印"; + this.Load += new System.EventHandler(this.Form_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox comPosition; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comColor; + private System.Windows.Forms.Label label15; + private DateTimePickerA dtpDate; + private System.Windows.Forms.ComboBox cBoxModelCode; + private System.Windows.Forms.ComboBox comMachineCode; + private System.Windows.Forms.CheckBox cbM; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox comMouldNumber; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label ErrorMessage; + private System.Windows.Forms.LinkLabel lblLock; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.Button tsbSave; + private System.Windows.Forms.DataGridViewTextBoxColumn MAINCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn COLOR; + private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME; + private System.Windows.Forms.Button btnCommSend; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.RichTextBox TBRCV; + private System.Windows.Forms.ComboBox textBox1; + private System.Windows.Forms.TextBox TBSEND; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label infolabel; + } +} \ No newline at end of file diff --git a/.svn/pristine/03/03a03a6e91ebec0fc42b6d7db85784cedc59fd35.svn-base b/.svn/pristine/03/03a03a6e91ebec0fc42b6d7db85784cedc59fd35.svn-base new file mode 100644 index 0000000..de2ca13 --- /dev/null +++ b/.svn/pristine/03/03a03a6e91ebec0fc42b6d7db85784cedc59fd35.svn-base @@ -0,0 +1,17 @@ + + + + + True + False + True + Debug + Any CPU + FileSystem + C:\Users\Administrator\Desktop\发布\CDMES\MainDataWeb + FileSystem + + + \ No newline at end of file diff --git a/.svn/pristine/04/0405ef37eb99b5391e07c258c64dfae601dbcc8e.svn-base b/.svn/pristine/04/0405ef37eb99b5391e07c258c64dfae601dbcc8e.svn-base new file mode 100644 index 0000000..2a66105 --- /dev/null +++ b/.svn/pristine/04/0405ef37eb99b5391e07c258c64dfae601dbcc8e.svn-base @@ -0,0 +1,795 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.Operation; +using QMFrameWork.Common.Serialization; +using QMAPP.WinForm.Forms.Operation; +using QMAPP.FJC.Entity.Basic; +using QMAPP.MD.Entity.Bucket; +using QMAPP.MD.Entity; + +namespace QMAPP.WinForm.Forms.Injection +{ + public partial class InjectionCodePrint : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + List paramcolumns = new List(); + FileSynchronizers.IFileSynchronizer sync; + + public InjectionCodePrint() + { + InitializeComponent(); + } + + private void InjectionCodePrint_Load(object sender, EventArgs e) + { + LoadMachineList(); + SetConnectState(0); + + this.radioButSignal.Checked = true; + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("InjectionCodePrint"); + + cbPrintCount.SelectedIndex = 3; + cbPrintSpan.SelectedIndex = 3; + } + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist = basicData.GetMachineInfoAndModelList(new string[] {"1"}, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.btnLockMachine.Visible = false; + this.LockMachine(false); + } + else + { + //this.btnLockMachine.Visible = false; + this.LockMachine(false); + } + comMachine_SelectedIndexChanged(null, null); + #endregion + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + tsbPrint.Enabled = false; + CodeCreatePrint(); + tsbPrint.Enabled = true; + } + + private void CodeCreatePrint() + { + List materialListInfo = GetSelectedMaterials(); + var model = cbMould.SelectedItem as MachineInfoModels; + if (model == null) + { + model = new MachineInfoModels(); + } + int i = 1; + //DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeForChengdu", materialListInfo, model, i); + var machine = comMachine.SelectedItem as MachineInfo; + DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary()); + + Print(resultList.Result, true); + } + + private void CodeCreatePrint(string header, string datarow, char[] dataSeparator) + { + + List materialListInfo = GetSelectedMaterials(); + var machine = comMachine.SelectedItem as MachineInfo; + var model = cbMould.SelectedItem as MachineInfoModels; + if (model == null) + { + model = new MachineInfoModels(); + } + string tableName = paramcolumns.FirstOrDefault().PARATABLENAME; + Dictionary param=new Dictionary(); + param.Add("PARAMETER_COLUMNS",header); + var paramvalue=datarow.Split(dataSeparator); + for(int j=0;j> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo,machine,model,tableName,param); + Print(resultList.Result,false); + } + private void Print(List codeList,bool IsManual) + { + List labels = new List(); + //打印条码 + + string typeTem = ""; + string typeData = ""; + foreach (PrintCode item in codeList) + { + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MATERIAL_NAME"].Value = item.MATERIAL_NAME; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + //班次信息 + string shiftCode = ClientContext.produceShift.PRODUCESHIFTTCODE; + item.ShiftCode = shiftCode; + + DGView.AutoGenerateColumns = false; + typeTem = item.PRINT_TEMPALTE_TEM; + typeData = item.PRINT_TEMPALTE_DATA; + //QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = item.MATERIAL_NAME + "," + item.PRODUCTCODE + "," + item.MAINCODE + "," + shiftCode + "," + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + //QM.Assist.PrintUtil.LabelList2.Add(ll); + PrintTemplate.InjectLabel label = new PrintTemplate.InjectLabel + { + CreateDate = DateTime.Now, + MachineCode = comMachine.SelectedValue + "", + MaterialCode = item.PRODUCTCODE, + MaterialName = item.MATERIAL_NAME, + ModelCode = cbMould.SelectedValue + "", + SerialNumber = item.MAINCODE, + ShiftCode = shiftCode, + IsManualPrint = IsManual + }; + labels.Add(label); + } + string path = System.Configuration.ConfigurationManager.AppSettings["Template_Local_Path"]; + if (!System.IO.Directory.Exists(path)) + { + System.IO.Directory.CreateDirectory(path); + } + FastReport.Report fr = new FastReport.Report(); + fr.RegisterData(labels, "Labels"); + if (!System.IO.File.Exists(string.Format("{0}\\{1}.frx", path, typeTem))) + { + if (System.IO.File.Exists(string.Format("PrintTemplate\\{1}.frx", path, typeTem))) + { + System.IO.File.Copy(string.Format("PrintTemplate\\{1}.frx", path, typeTem) + , string.Format("{0}\\{1}.frx", path, typeTem)); + } + else + { + fr.FileName = string.Format("{0}\\{1}.frx", path, typeTem); + fr.Design(true); + fr.Save(string.Format("{0}\\{1}.frx", path, typeTem)); + } + } + fr.Load(string.Format("{0}\\{1}.frx", path, typeTem)); + if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) + { + fr.Design(true); + } + else + { + fr.PrintSettings.ShowDialog = false; + fr.Print(); + + #region 张松男20210802 修改 增加新版注塑投料条码绑定 + + foreach (var la in labels) + { + var material_T = new BucketMaterialClass() { MaterialCode = la.MaterialCode }; + var List = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_GetListTo.ToString(), material_T); + + if (List != null && List.Count > 0) + { + foreach (var raw in List) + { + var record = new RawMaterialRecord(); + record.MaterialCode = la.MaterialCode; + record.MaterialName = la.MaterialName; + record.ProductCode = la.SerialNumber; + record.RawMaterialPID = raw.PID; + record.MachineCode = la.MachineCode; + _agent.InvokeServiceFunction>(B9BasicService.RawMaterialRecordBLL_Insert.ToString(), record); + } + } + } + + #endregion + + } + fr.Dispose(); + + //QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeTem + "temPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeData + "dataPath"].ToString + // ()); + } + + private List GetSelectedMaterials() + { + List materialListInfo = new List(); + Material concationMaterial = new Material(); + //int i= Convert.ToInt32( this.txtNum.Text); + + if (this.radioButSignal.Checked == true) + { + string materialcode1 = this.txtMaterialCode.Text; + concationMaterial.MATERIAL_CODE = materialcode1; + materialListInfo.Add(concationMaterial); + } + else if (this.radioButDouble.Checked == true) + { + concationMaterial.MATERIAL_CODE = this.txtMaterialCode.Text; + materialListInfo.Add(concationMaterial); + if (!string.IsNullOrEmpty(this.comboxMaterial.SelectedValue.ToString())) + { + Material concationMaterial2 = new Material(); + concationMaterial2.MATERIAL_CODE = this.comboxMaterial.SelectedValue.ToString(); + materialListInfo.Add(concationMaterial2); + } + } + else if (this.radioButFourth.Checked == true) + { + concationMaterial.MATERIAL_CODE = this.txtMaterialCode.Text; + materialListInfo.Add(concationMaterial); + + if (!string.IsNullOrEmpty(this.txtMaterial2.Text)) + { + Material concationMaterial3 = new Material(); + concationMaterial3.MATERIAL_CODE = this.txtMaterial2.Text.Substring(this.txtMaterial2.Text.LastIndexOf(":") + 1); + materialListInfo.Add(concationMaterial3); + } + + if (!string.IsNullOrEmpty(this.txtMaterial3.Text)) + { + Material concationMaterial4 = new Material(); + concationMaterial4.MATERIAL_CODE = this.txtMaterial3.Text.Substring(this.txtMaterial3.Text.LastIndexOf(":") + 1); + materialListInfo.Add(concationMaterial4); + } + if (!string.IsNullOrEmpty(this.txtMaterial4.Text)) + { + Material concationMaterial5 = new Material(); + concationMaterial5.MATERIAL_CODE = this.txtMaterial4.Text.Substring(this.txtMaterial4.Text.LastIndexOf(":") + 1); + materialListInfo.Add(concationMaterial5); + } + } + return materialListInfo; + } + #endregion + + #region 校验 + /// + /// 校验 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + + var selectmachine= comMachine.SelectedItem as MachineInfo; + if (selectmachine == null || string.IsNullOrEmpty(selectmachine.PID)) + { + strMessage += "请选择注塑机!" + "\r\n"; + } + //判断条码是否为空 + + if (cbMould.Items.Count > 0 && cbMould.SelectedIndex < 0) + { + strMessage += "请选择模具!" + "\r\n"; + } + + //注塑零件 + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + strMessage += Resource1.MaterialChoiceValidate + "\r\n"; + } + + + + //打印数量 + //if (this.txtNum.Text == null || this.txtNum.Text == string.Empty) + //{ + // strMessage += Resource1.NumNullValidate + "\r\n"; + //} + //else + //{ + // int proNum = 0; + // if (!int.TryParse(this.txtNum.Text, out proNum)) + // { + // strMessage += Resource1.NumFormatValidate + "\r\n"; + // } + //} + return strMessage; + #endregion + } + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 点击选择零件信息 + /// + /// 点击选择零件信息 + /// + /// + /// + private void btnChoiceMaterial_Click(object sender, EventArgs e) + { + MaterialTreeForm materialForm = new MaterialTreeForm(); + var ret= materialForm.ShowDialog(); + if (ret == DialogResult.OK) + { + this.txtMaterialCode.Text = materialForm.MaterialCode; + this.textMaterialName.Text = materialForm.MaterialName; + bool maintype = materialForm.MainType; + if (maintype) + { + this.groupBox3.Enabled = true; + } + else + { + this.groupBox3.Enabled = false; + } + } + } + #endregion + + #region 单选按钮 + /// + /// 单件 + /// + /// + /// + private void radioButSignal_CheckedChanged(object sender, EventArgs e) + { + if (radioButSignal.Checked == true) + { + this.panel34.Visible = false; + this.paneldouble.Visible = false; + } + } + /// + /// 双件,获取物料信息下拉 + /// + /// + /// + private void radioButDouble_CheckedChanged(object sender, EventArgs e) + { + if (radioButDouble.Checked == true) + { + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + string Messae = Resource1.MaterialChoiceValidate + "\r\n"; + MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + radioButSignal.Checked = true; + return; + } + this.paneldouble.Visible = true; + this.panel34.Visible = false; + + string materialCode = this.txtMaterialCode.Text; + BasicData basicData = new BasicData(); + this.comboxMaterial.DataSource = basicData.GetMaterialInfoList(materialCode, true); + this.comboxMaterial.DisplayMember = "MATERIAL_NAME"; + this.comboxMaterial.ValueMember = "MATERIAL_CODE"; + } + + } + /// + /// 四件,自动填写下拉物料信息 + /// + /// + /// + private void radioButFourth_CheckedChanged(object sender, EventArgs e) + { + if (radioButFourth.Checked == true) + { + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + string Messae = Resource1.MaterialChoiceValidate + "\r\n"; + MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + radioButSignal.Checked = true; + return; + } + string materialCode = this.txtMaterialCode.Text; + BasicData basicData = new BasicData(); + List materialList = basicData.GetMaterialInfoList(materialCode, false); + materialList = materialList.OrderBy(p => p.MATERIAL_CODE).ToList(); + if (materialList.Count < 3) + { + string Messae = Resource1.SelectedInfoWrong + "\r\n"; + MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + radioButSignal.Checked = true; + return; + } + this.panel34.Visible = true; + this.paneldouble.Visible = false; + this.txtMaterial2.Text = materialList[0].MATERIAL_NAME; + this.txtMaterial3.Text = materialList[1].MATERIAL_NAME; + this.txtMaterial4.Text = materialList[2].MATERIAL_NAME; + + } + } + #endregion + + + /// + /// 所选零件发生改变 + /// + /// + /// + private void txtMaterialCode_TextChanged(object sender, EventArgs e) + { + radioButSignal.Checked = true; + } + + + + private void btnStart_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + btnStart.Enabled = false; + btnStop.Enabled = true; + cbPrintCount.Enabled = false; + cbPrintSpan.Enabled = false; + lblLastCount.Text = cbPrintCount.Text; + tsbPrint.Enabled = false; + btnChoiceMaterial.Enabled = false; + groupBox3.Enabled = false; + printtimer = int.Parse(cbPrintSpan.Text.Trim('s')); + LockPrintMode(2); + + } + + private void btnStop_Click(object sender, EventArgs e) + { + btnStart.Enabled = true; + btnStop.Enabled = false; + cbPrintCount.Enabled = true; + cbPrintSpan.Enabled = true; + //lblLastCount.Text = cbPrintCount.Text; + tsbPrint.Enabled = true; + btnChoiceMaterial.Enabled = true; + groupBox3.Enabled = true; + LockPrintMode(-1); + } + + int printtimer = 0; + + private void timer2_Tick(object sender, EventArgs e) + { + if (!btnStart.Enabled&&btnStop.Enabled) + { + int span=int.Parse(cbPrintSpan.Text.Trim('s')); + if (printtimer >= span) + { + CodeCreatePrint(); + printtimer = 0; + var lastcount = int.Parse(lblLastCount.Text) - 1; + lblLastCount.Text = lastcount + ""; + if (lastcount <= 0) + { + btnStop_Click(sender, e); + } + + } + else + { + printtimer++; + } + } + else + { + printtimer = 0; + } + } + + private void comMachine_SelectedIndexChanged(object sender, EventArgs e) + { + var selectmachine = comMachine.SelectedItem as MachineInfo; + if (selectmachine != null && !string.IsNullOrEmpty(selectmachine.PID)) + { + var mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = "INJ_MODEL" }).OrderBy(p => p.MODELCODE).ToList(); + mouldList.Insert(0, new MachineInfoModels { }); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + + if (selectmachine.ISCONTROL == "1") + { + HideTimerPrint(true); + } + else + { + HideTimerPrint(false); + } + } + + } + + private void btnStartFileScan_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + var selectmachine= comMachine.SelectedItem as MachineInfo; + if (selectmachine != null&&!string.IsNullOrEmpty(selectmachine.PID)) + { + txtFilePath.Text = selectmachine.EQUIPMENT_DIRECTORY; + var columns = _agent.InvokeServiceFunction>>("ProcessParameterBLL_GetAllList", new ProcessParameter { MACHINECODDE = selectmachine.MACHINECODDE }).Result; + if (columns != null) + { + paramcolumns = columns; + } + else + { + paramcolumns = new List(); + } + lvParamRecords.Items.Clear(); + lvParamRecords.Columns.Clear(); + var c1=lvParamRecords.Columns.Add("扫描时间"); + c1.Width=180; + foreach (var col in paramcolumns) + { + var c= lvParamRecords.Columns.Add(col.PARADESCRIBE); + } + if (selectmachine.EQUIPMENT_TYPE_CODE == "HaitianInjection") + { + sync = new FileSynchronizers.HaitianInjectionFileSynchronizer(selectmachine); + } + else if (selectmachine.EQUIPMENT_TYPE_CODE == "EngelInjection") + { + sync = new FileSynchronizers.EngelInjectionFileSynchronizer(selectmachine); + } + else + { + MessageBox.Show("注塑机型号未设定!", Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + sync.NewRecordFound += new EventHandler(sync_NewRecordFound); + sync.ExceptionCatched += new EventHandler(sync_ExceptionCatched); + sync.Start(cbSkipHistory.Checked); + SetConnectState(1); + btnStartFileScan.Enabled = false; + btnStopFileScan.Enabled = true; + LockPrintMode(0); + } + else + { + MessageBox.Show("请选择注塑机!", Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + /// + /// 设置连接状态 + /// + /// 0:停止 1:正常 2:断开 + void SetConnectState(int state) + { + switch (state) + { + case 0: + { + txtConnectState.Text = "扫描停止"; + picConnectState.Image = WinForm.Resource1.stop; + break; + } + case 1: + { + txtConnectState.Text = "扫描正常"; + picConnectState.Image = WinForm.Resource1.reload; + break; + } + case 2: + { + txtConnectState.Text = "连接断开"; + picConnectState.Image = WinForm.Resource1.no; + break; + } + } + } + /// + /// 锁定打印模式 + /// + /// -1 解锁; 0 联机; 1 手动; 2 定时; + void LockPrintMode(int mode) + { + for(int i=0;i + /// 隐藏定时打印模式 + /// + void HideTimerPrint(bool hide) + { + if (hide) + { + if (tpPrintMode.Controls.Contains(tpTimer)) + //tpPrintMode.Controls[tpTimer.Name].Visible = !hide; + tpPrintMode.Controls.Remove(tpTimer); + } + else + { + if (!tpPrintMode.Controls.Contains(tpTimer)) + //tpPrintMode.Controls[tpTimer.Name].Visible = !hide; + tpPrintMode.Controls.Add(tpTimer); + } + } + + void sync_ExceptionCatched(object sender, FileSynchronizers.InjParamEventArgs e) + { + this.Invoke((Action)(() => { + txtMessage.Text = e.Exception.Message; + SetConnectState(2); + })); + } + + void sync_NewRecordFound(object sender, FileSynchronizers.InjParamEventArgs e) + { + this.Invoke((Action)(() => + { + CodeCreatePrint(e.HeaderRow, e.DataRow, e.DataSeparator); + txtCurrentFile.Text = e.FileName; + txtLastScanTime.Text = e.RecordTime.ToString("hh:mm:ss"); + txtMessage.Text = e.DataRow; + var li = lvParamRecords.Items.Insert(0,e.RecordTime.ToString("yyyy-MM-dd hh:mm:ss")); + li.SubItems.AddRange(e.DataRow.Split(e.DataSeparator)); + if (lvParamRecords.Items.Count > 200) + { + lvParamRecords.Items.RemoveAt(200); + } + SetConnectState(1); + })); + } + + private void btnStopFileScan_Click(object sender, EventArgs e) + { + if (sync != null) + { + sync.Stop(); + } + SetConnectState(0); + btnStartFileScan.Enabled = true; + btnStopFileScan.Enabled = false; + LockPrintMode(-1); + } + + private void InjectionCodePrint_FormClosed(object sender, FormClosedEventArgs e) + { + if (sync != null) + { + sync.Stop(); + } + } + + private void btnLockMachine_Click(object sender, EventArgs e) + { + LockMachine(true); + + /* if (this.btnLockMachine.Tag.ToString().Equals("0")) + { + + LockMachine(false); + } + else + { + LockMachine(true); + }*/ + } + #region 设备锁定 + /// + /// 设备锁定 + /// + /// + private void LockMachine(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.btnLockMachine.Text = "锁定"; + this.btnLockMachine.Tag = "0"; + } + else + { + ClientContext.MachineInfo = this.comMachine.SelectedItem as MachineInfo; + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.btnLockMachine.Text = "解锁"; + this.btnLockMachine.Tag = "1"; + } + + } + #endregion + } +} diff --git a/.svn/pristine/04/04855cbc6897a7bcb2d9aadad48afab48c36d285.svn-base b/.svn/pristine/04/04855cbc6897a7bcb2d9aadad48afab48c36d285.svn-base new file mode 100644 index 0000000..35d1617 --- /dev/null +++ b/.svn/pristine/04/04855cbc6897a7bcb2d9aadad48afab48c36d285.svn-base @@ -0,0 +1,3473 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["AutoInput条码正则表达式"]?.Trim(); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + ispass = true; + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex))//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.MATERIAL_CODE)).ToList(); + if (filterList.Count > 0) + { + string bomCode = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + if (record != null) + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/05/059efe34b929cc83f1095c26715c2c9e5956ce39.svn-base b/.svn/pristine/05/059efe34b929cc83f1095c26715c2c9e5956ce39.svn-base new file mode 100644 index 0000000..9b22c34 --- /dev/null +++ b/.svn/pristine/05/059efe34b929cc83f1095c26715c2c9e5956ce39.svn-base @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {25F672F4-55A6-41B3-82DA-84233786D991} + Library + Properties + QMAPP.MD.DAL + QMAPP.MD.DAL + v4.0 + 512 + Svn + Svn + Svn + SubversionScc + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + Code + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + + + \ No newline at end of file diff --git a/.svn/pristine/05/05ca602a128808526fef028e9a8b4c0d2357818c.svn-base b/.svn/pristine/05/05ca602a128808526fef028e9a8b4c0d2357818c.svn-base new file mode 100644 index 0000000..2dc8928 Binary files /dev/null and b/.svn/pristine/05/05ca602a128808526fef028e9a8b4c0d2357818c.svn-base differ diff --git a/.svn/pristine/07/0740c7f2e11b869520d5aeeb75a032e6d32cc418.svn-base b/.svn/pristine/07/0740c7f2e11b869520d5aeeb75a032e6d32cc418.svn-base new file mode 100644 index 0000000..6aed4ba Binary files /dev/null and b/.svn/pristine/07/0740c7f2e11b869520d5aeeb75a032e6d32cc418.svn-base differ diff --git a/.svn/pristine/07/07919d23fcd47e7008d47261a3a0d0aeccf37f83.svn-base b/.svn/pristine/07/07919d23fcd47e7008d47261a3a0d0aeccf37f83.svn-base new file mode 100644 index 0000000..882f6d2 --- /dev/null +++ b/.svn/pristine/07/07919d23fcd47e7008d47261a3a0d0aeccf37f83.svn-base @@ -0,0 +1,215 @@ +using System; +using System.Collections.Generic; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.DAL.ProduceManage; +using QMAPP.FJC.Entity.ProduceManage; +using QMFrameWork.Data; +using QMFrameWork.Log; +using QMAPP.FJC.Entity; +using QMAPP.MD.Entity.Bucket; +using QMAPP.FJC.DAL.Bucket; + +namespace QMAPP.FJC.BLL.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketInfoBLL : BaseBLL + { + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BucketInfo model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BucketInfoDAL().Get(model); + result.IsSuccess = true; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取异常"; + } + + return result; + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BucketInfo condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + DataPage dataPage = new BucketInfoDAL().GetList(condition, page); + + result.IsSuccess = true; + result.Result = dataPage; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取列表异常!"; + } + + return result; + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 全部集合 + public List GetAllList() + { + try + { + //获取信息列表 + return new BucketInfoDAL().GetALL(); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + throw ex; + } + } + + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(BucketInfo info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = info.CREATEUSER; + info.UPDATEDATE = info.CREATEDATE; + info.IsCheck = "0"; + BucketInfoDAL cmdDAL = new BucketInfoDAL(); + result.Result = cmdDAL.Insert(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult Update(BucketInfo model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + BucketInfo info = new BucketInfoDAL().Get(model); + + //基本信息 + info.IsCheck = model.IsCheck; + info.BucketCode = model.BucketCode; + info.BucketName = model.BucketName; + info.CREATEUSER = model.CREATEUSER; + info.CREATEDATE = model.CREATEDATE; + info.UPDATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = this.LoginUser.UserID; + int temp = new BucketInfoDAL().Update(info); + + if (temp == 0) + { + result.IsSuccess = false; + result.Msg = "更新失败!"; + return result; + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "更新异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "更新异常"; + } + return result; + } + #endregion + + #region 删除 + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int Delete(string model) + { + int count = 0; + try + { + count = new BucketInfoDAL().Delete(model); + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/08/08f87698ae017e542510a9d8f900e2daf3b2f106.svn-base b/.svn/pristine/08/08f87698ae017e542510a9d8f900e2daf3b2f106.svn-base new file mode 100644 index 0000000..b1220e5 --- /dev/null +++ b/.svn/pristine/08/08f87698ae017e542510a9d8f900e2daf3b2f106.svn-base @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.DAL.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; +using QMAPP.FJC.DAL.MD; +using QMAPP.FJC.Entity.MD; + +namespace QMAPP.FJC.BLL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年03月17日 + /// + public class AppConfigBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public AppConfig Get(string code) + { + try + { + return new AppConfigDAL().Get(code); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public AppConfig GetPID(AppConfig code) + { + try + { + return new AppConfigDAL().GetPID(code); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + public DataResult GetList(AppConfig condition, DataPage page) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + result.Result = new AppConfigDAL().GetList(condition,page); + return result; + } + catch (Exception ex) + { + throw ex; + + } + } + + public DataResult Update(AppConfig info) + { + DataResult result = new DataResult(); + try + { + result.IsSuccess = true; + result.Result = new AppConfigDAL().Update(info); + return result; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public MaterialClass GetMATERIAL(string code) + { + try + { + //查找物料号 + var MATERIAL = new MaterialDAL().Get(code); + var msg = ""; + var mater = new AppConfigDAL().GetMATERIAL(MATERIAL.MATERIAL_TYPE_CODE,ref msg); + mater.MATERIAL_TYPE_NAME = msg; + return mater; + } + catch (Exception ex) + { + throw ex; + } + } + } +} diff --git a/.svn/pristine/09/09e75bf260af893508a366af049aead771f87ab8.svn-base b/.svn/pristine/09/09e75bf260af893508a366af049aead771f87ab8.svn-base new file mode 100644 index 0000000..ba22d7e --- /dev/null +++ b/.svn/pristine/09/09e75bf260af893508a366af049aead771f87ab8.svn-base @@ -0,0 +1,987 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Basic; +using QMFrameWork.Data; +using QMFrameWork.Common.Serialization; +using System.Linq; +using QMAPP.WinForm.Forms.Operation; +using System.IO.Ports; +using System.Management; +using System.Threading; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M11-2 + /// 作 用:搪塑条码打印 + /// 作 者:王庆男 + /// 编写日期:2015年05月28日 + /// + public partial class SlushMoldingPrintForOldNewForm : Form + { + + + /// + /// 车型,A:B9车型,B:Q5车型 + /// + public string CarType { set; get; } + + List moldConfigList; + + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + + /// + /// 称重记录 + /// + public List List_tSWeighRecores = new List(); + + private string _cfgSlushMolding = null;// 称重区间 + + /// + /// 新建 + /// + public SlushMoldingPrintForOldNewForm() + { + InitializeComponent(); + _cfgSlushMolding = GetAppConfigValue("SlushMolding"); + btnCommSend.Enabled = true; + serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived); + frmMain_Load(); + moldConfigList = new List(); + } + + /// + /// 窗体初始化 + /// + private void InitForm() + { + //预留方法,用于B9\Q5功能差异 + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + InitForm(); + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + List recorders = null; + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + recorders = recorders.OrderBy(o => o.INDEXVALUE).ToList(); + moldConfigList = recorders; + + #region 绑定下拉列表 + + BasicData basicData = new BasicData(); + //加载搪塑设备列表 + //this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType.tangsu.GetHashCode().ToString() }, true); + //this.comMachineCode.DisplayMember = "MACHINENAME"; + //this.comMachineCode.ValueMember = "MACHINECODDE"; + //this.comMachineCode.SelectedIndex = 1; + //this.comMachineCode.Enabled = false; + + var machinelist = basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachineCode.DataSource = machinelist; + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + + + + //颜色 + this.comColor.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.COLOR.ToString()); + this.comColor.DisplayMember = "VALUE"; + this.comColor.ValueMember = "KEY"; + this.comColor.SelectedValue = "1"; + //this.comColor.Enabled = false; + ////AB腔 + this.comPosition.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.CAVITYTYPE.ToString()); + this.comPosition.DisplayMember = "VALUE"; + this.comPosition.ValueMember = "KEY"; + //this.comPosition.SelectedIndex = 0; + //this.comPosition.Enabled = false; + + + #endregion + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text)) + { + this.dtpDate.Text = DateTime.Now.ToString(); + } + + SetMouldStation(); + + + #region 打印模板拷贝 + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("SlushMoldingPrintForOldForm"); + + #endregion + } + + #region 设置模架号 + /// + /// + /// + private void SetMouldStation() + { + this.cBoxModelCode.DisplayMember = "VALUE"; + this.cBoxModelCode.ValueMember = "KEY"; + List cBoxModelCodeList = new List(); + foreach (var m in moldConfigList) + { + cBoxModelCodeList.Add(new { VALUE = m.MOLDVALUE, KEY = m.MOLDVALUE }); + } + this.cBoxModelCode.DataSource = cBoxModelCodeList; + this.cBoxModelCode.SelectedIndex = 0; + cBoxModelCode.Enabled = false; + + + this.comMouldNumber.DisplayMember = "VALUE"; + this.comMouldNumber.ValueMember = "KEY"; + List comMouldNumberList = new List(); + foreach (var m in moldConfigList) + { + comMouldNumberList.Add(new { VALUE = m.MOLDSTATION, KEY = m.MOLDSTATION }); + } + this.comMouldNumber.DataSource = comMouldNumberList; + this.comMouldNumber.SelectedIndex = 0; + + //判断是否有正在使用的模腔配置信息 + if (moldConfigList.Count(o => o.USED == 1) > 0) + { + //获取该对象 + MoldConfig m = moldConfigList.First(o => o.USED == 1); + //设置模架选择项 + comMouldNumber.SelectedValue = m.MOLDSTATION; + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + } + #endregion + + #region 窗体保存事件 + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + string message = this.ErrorCheck(); + if (!string.IsNullOrEmpty(message)) + { + this.ErrorMessage.Text = message; + return; + } + List listRecorder = new List(); + //窗体数据校验 + //老搪塑只出黑色表皮,模腔号2 为高配B腔 模腔号3 为低配A腔,老搪塑只有一套模具,固定即可 + //搪塑机 + MachineInfo machineInfo = this.comMachineCode.SelectedItem as MachineInfo; + + #region 加载保存信息 + //for (int i = 0; i < 2; i++)//一次出2个码 + //{ + //零件属性 + Product recorder = new Product(); + ProductAttribute productAttribute = new ProductAttribute(); + //搪塑机编号 + productAttribute.VAL1 = machineInfo.MACHINENUM; + //产品类型(车型)成都固定 + productAttribute.VAL2 = "V"; + //高低配 成都无,且固定 + productAttribute.VAL3 = "B"; + //颜色 + productAttribute.VAL4 = this.comColor.SelectedValue.ToString(); + + string[] cb = new string[] { }; + if (!string.IsNullOrEmpty(this.cBoxModelCode.Text)) + { + cb = this.cBoxModelCode.Text.Split('+'); + } + if (cb.Length <= 0) + { + MessageBox.Show("模腔出错!"); + return; + } + + //腔 + + + if (this.comPosition.Text == "搪塑B腔")//第一个为模腔号2 + { + //腔 + productAttribute.VAL5 = "B"; + + //模腔 + productAttribute.VAL6 = cb[0].PadLeft(2, '0'); + } + else if (this.comPosition.Text == "搪塑A腔") + { + //腔 + productAttribute.VAL5 = "A"; + //模腔 + productAttribute.VAL6 = cb[1].PadLeft(2, '0'); + } + + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text.Trim())) + { + productAttribute.VAL7 = Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + productAttribute.VAL7 = Convert.ToDateTime(this.dtpDate.Text.Trim()).ToString("yyyy-MM-dd HH:mm:ss"); + } + + recorder.MACHINECODDE = machineInfo.MACHINECODDE; + recorder.MACHINENAME = machineInfo.MACHINENAME; + recorder.PRODUCTSOURCE = EnumGeter.PRODUCTSOURCE.SELFMADE.GetHashCode().ToString(); + recorder.PRODUCTTYPE = EnumGeter.ProductType.biaopi.GetHashCode().ToString(); + + ////添加加物料号 + //QMAPP.ServicesAgent.ServiceAgent agents = ClientContext.GetServiceAgent(); + //DataResult materialcode = agents.InvokeServiceFunction>(B9BasicService.MaterialCodeBLL_GetMaterialCode.ToString(), productAttribute.VAL2); + //recorder.MATERIAL_CODE = materialcode.Result.ToString(); + + recorder.STATUS = EnumGeter.PRODUCTSTAUTS.QUALIFIED.GetHashCode().ToString(); + recorder.CURRENTPROCESS = EnumGeter.ProcessType.lengdaoruohua.GetHashCode().ToString(); + //ToDo:选择生产线 + //成都固定生产线 + recorder.PRODUCELINE = "IPVW371"; + + recorder.OUTFLAG = EnumGeter.PRODUCTOUTFLAG.INLIBRARY.GetHashCode().ToString(); + recorder.USINGSTATE = EnumGeter.PRODUCTUSESTATE.UNUSED.GetHashCode().ToString(); + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE; + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME; + recorder.CAPACITY = 1; + recorder.USINGCOUNT = 0; + recorder.PRODUCTATTRIBUTE = productAttribute; + recorder.AddM = this.cbM.Checked; + listRecorder.Add(recorder); + //} + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult> result = agent.InvokeServiceFunction>>(B9BasicService.ProductBLL_InsertListEpidermis.ToString(), listRecorder); + result_Save = result; + + btnCommSend_Click(sender, e); //发送信号 + + #endregion + + #endregion + } + #endregion + + #region 先判定称重,再进行打印 + /// + /// + /// + public DataResult> result_Save { get; set; } + /// + /// + /// + public void SaveProduct() + { + //保存成功 + if (result_Save.IsSuccess) + { + + #region 打印条码 + + this.DialogResult = System.Windows.Forms.DialogResult.OK; + string barCode = result_Save.Result.ToString(); + foreach (PrintCode item in result_Save.Result) + { + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = item.MAINCODE + ",*" + item.PRODUCTCODE + "*" + "," + item.COLOR_CODE; + QM.Assist.PrintUtil.LabelList2.Add(ll); + + + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + + #region 保存称重记录 + + var Entity = new TSWeighRecore(); + Entity.MATERIAL_CODE = item.PRODUCTCODE; + Entity.PColour = item.COLOR_CODE; + Entity.ProductCode = item.MAINCODE; + + List_tSWeighRecores.Add(Entity); + #endregion + + + } + + + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "temPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "dataPath"].ToString + ()); + + #endregion + + #region 重新设置当前使用和列表信息 + + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + + #region 重新设置当前使用 + + + DataResult updateresult = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_UpdateNextUsed.ToString(), new MoldConfig() { MOLDSTATION = moldStation }); + + #endregion + + #region 绑定下拉列表 + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + moldConfigList = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + moldConfigList = moldConfigList.OrderBy(o => o.INDEXVALUE).ToList(); + + + SetMouldStation(); + + #endregion + + #endregion + + //MessageBox.Show("打印成功!"); + + this.ErrorMessage.Text = ""; + + } + else + { + MessageBox.Show(result_Save.Msg); + } + } + + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 错误检测 + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + //判断条码是否为空 + + ////搪塑设备 + if (this.comMachineCode.SelectedValue == null || this.comMachineCode.SelectedValue == string.Empty) + { + strMessage += Resource1.SlushMachineNullValidate + "\r\n"; + } + ////产品类别 + //if (this.comProType.SelectedValue == null || this.comProType.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.ProductTypeNullValidate + "\r\n"; + //} + //颜色 + if (this.comColor.SelectedValue == null || this.comColor.SelectedValue == string.Empty) + { + strMessage += Resource1.ColorNullValidate + "\r\n"; + } + ////高低配 + //if (this.comHOrL.SelectedValue == null || this.comHOrL.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.HLNullValidate + "\r\n"; + //} + //腔 + if (this.comPosition.SelectedValue == null || this.comPosition.SelectedValue == string.Empty) + { + strMessage += Resource1.PositionNullValidate + "\r\n"; + } + ////模腔号 + //if (this.cBoxModelCode.Text == null || this.cBoxModelCode.Text == string.Empty) + //{ + // strMessage += Resource1.ModelCodeNullValidate + "\r\n"; + //} + + return strMessage; + #endregion + } + #endregion + + + /// + /// + /// + /// + /// + private void comMouldNumber_SelectedIndexChanged(object sender, EventArgs e) + { + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + MoldConfig m = moldConfigList.First(o => o.MOLDSTATION == moldStation); + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + + /// + /// + /// + /// + /// + /// + public object GetPropertyValue(object info, string field) + { + if (info == null) return null; + Type t = info.GetType(); + IEnumerable property = from pi in t.GetProperties() where pi.Name.ToLower() == field.ToLower() select pi; + return property.First().GetValue(info, null); + } + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachineCode.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachineCode.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region + + /// + /// + /// + /// + /// + public delegate void MyInitDelegate(RichTextBox myRtb, string strTemp); + public void DelegateInitMethod(RichTextBox myRtb, string strTemp) + { + myRtb.AppendText(strTemp + System.Environment.NewLine); + } + /// + /// 所有的串口类型 + /// + public enum HardwareEnum + { + Win32_Processor, + Win32_PhysicalMemory, + Win32_Keyboard, + Win32_PointingDevice, + Win32_FloppyDrive, + Win32_DiskDrive, + Win32_CDROMDrive, + Win32_BaseBoard, + Win32_BIOS, + Win32_ParallelPort, + Win32_SerialPort, + Win32_SerialPortConfiguration, + Win32_SoundDevice, + Win32_SystemSlot, + Win32_USBController, + Win32_NetworkAdapter, + Win32_NetworkAdapterConfiguration, + Win32_Printer, + Win32_PrinterConfiguration, + Win32_PrintJob, + Win32_TCPIPPrinterPort, + Win32_POTSModem, + Win32_POTSModemToSerialPort, + Win32_DesktopMonitor, + Win32_DisplayConfiguration, + Win32_DisplayControllerConfiguration, + Win32_VideoController, + Win32_VideoSettings, + Win32_TimeZone, + Win32_SystemDriver, + Win32_DiskPartition, + Win32_LogicalDisk, + Win32_LogicalDiskToPartition, + Win32_LogicalMemoryConfiguration, + Win32_PageFile, + Win32_PageFileSetting, + Win32_BootConfiguration, + Win32_ComputerSystem, + Win32_OperatingSystem, + Win32_StartupCommand, + Win32_Service, + Win32_Group, + Win32_GroupUser, + Win32_UserAccount, + Win32_Process, + Win32_Thread, + Win32_Share, + Win32_NetworkClient, + Win32_NetworkProtocol, + Win32_PnPEntity, + } + + /// + /// 获取所有串口数据(2) + /// + public static string[] MulGetHardwareInfo(HardwareEnum hardType, string propKey) + { + + List stringList = new List(); + try + { + + ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("select * from " + (object)hardType); + + foreach (ManagementBaseObject managementBaseObject in managementObjectSearcher.Get()) + { + if (managementBaseObject.Properties[propKey].Value != null) + { + string s = managementBaseObject.Properties[propKey].Value.ToString(); + int num = s.LastIndexOf("(COM"); + + if (num != -1 && char.IsNumber(s, num + 4)) + stringList.Add(managementBaseObject.Properties[propKey].Value.ToString()); + } + } + + managementObjectSearcher.Dispose(); + return stringList.ToArray(); + } + catch + { + MessageBox.Show("MulGetHardwareInfo!"); + return stringList.ToArray(); + } + finally + { + } + } + + /// + /// 获取所有串口数据(1) + /// + private void frmMain_Load() + { + try + { + string[] hardwareInfo = MulGetHardwareInfo(HardwareEnum.Win32_PnPEntity, "Name"); + + int length = hardwareInfo.Length; + List listItem = new List(); + + for (int index = 0; index < length; ++index) + { + listItem.Add(new ListItem((string)hardwareInfo[index], (string)hardwareInfo[index])); + } + this.textBox1.DataSource = listItem; + this.textBox1.DisplayMember = "VALUE"; + this.textBox1.ValueMember = "KEY"; + } + catch + { + MessageBox.Show("frmMain_Load!"); + } + + + } + + public string CodeName = string.Empty; + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + string text = this.textBox1.SelectedValue.ToString(); + int num = text.LastIndexOf("COM"); + + if (num == -1) + return; + + char ch1 = text[num + 3]; + char ch2 = text[num + 4]; + + if ((int)ch2 == 41) + CodeName = "COM" + (object)ch1; + else + CodeName = "COM" + (object)ch1 + (object)ch2; + } + catch + { + MessageBox.Show("comboBox1_SelectedIndexChanged!"); + } + + } + public string Weigh_str = string.Empty; + private SerialPort serialPort1 = new SerialPort(); + + /// + /// 获取设备返回结果 + /// + /// + /// + private void serialPort1_DataReceived(object sender, EventArgs e) + { + try + { + int bytesToRead = this.serialPort1.BytesToRead; + + if (bytesToRead == 0) + return; + + //TBRCV.Text = ""; + bool flag = true; + + while (flag) + { + Thread.Sleep(50); + + if (this.serialPort1.BytesToRead == bytesToRead) + flag = false; + else + bytesToRead = this.serialPort1.BytesToRead; + } + + byte[] numArray1 = new byte[bytesToRead]; + this.serialPort1.Read(numArray1, 0, bytesToRead); + byte[] numArray2 = callcrc(numArray1, bytesToRead - 2); + string str = string.Empty; + + for (int index = 0; index < numArray1.Length; ++index) + str = (int)numArray1[index] >= 16 ? str + Convert.ToString(numArray1[index], 16) + " " : str + "0" + Convert.ToString(numArray1[index], 16) + " "; + + if ((int)numArray2[0] == (int)numArray1[bytesToRead - 2] && + (int)numArray2[1] == (int)numArray1[bytesToRead - 1]) + { + if (!string.IsNullOrEmpty(_cfgSlushMolding)) + { + var SP = _cfgSlushMolding.Split(','); + var SP_Begin = Convert.ToInt32(SP[0]); + var SP_End = Convert.ToInt32(SP[1]); + Weigh_str = str.ToUpper(); + //TBRCV.BeginInvoke(new MyInitDelegate(DelegateInitMethod), new object[] { TBRCV, str.ToUpper() }); + Weigh_str = Weigh_str.Trim(); + Weigh_str = Weigh_str.Substring(Weigh_str.Length - 11, 2) + Weigh_str.Substring(Weigh_str.Length - 8, 2); + Weigh_str = Convert.ToInt32(Weigh_str, 16).ToString(); + var Weigh_Num = Convert.ToInt32(Weigh_str); + if (SP_Begin <= Weigh_Num && Weigh_Num <= SP_End) + { + SaveProduct(); + foreach (var t in List_tSWeighRecores) + { + t.Weigh = Weigh_str; + agent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.TSWeighRecoreBLL_Insert.ToString(), t); + } + List_tSWeighRecores = new List(); + this.TBRCV.Text = str.ToUpper(); + } + else + { + this.TBRCV.Text = $"重量{Weigh_Num},超出{_cfgSlushMolding}安全区间!"; + MessageBox.Show($"重量{Weigh_Num},超出{_cfgSlushMolding}安全区间!"); + } + + } + else + { + this.TBRCV.Text = "未配置安全区间"; + MessageBox.Show("未配置安全区间!"); + } + + } + else + { + Weigh_str = "接收错误"; + this.TBRCV.Text = str.ToUpper() + "接收错误 CRC有误"; + } + } + catch + { + MessageBox.Show("serialPort1_DataReceived!"); + } + } + public static byte[] strToToHexByte(string hexString) + { + try + { + hexString = hexString.Replace(" ", ""); + + if (hexString.Length % 2 != 0) + hexString += "0"; + + byte[] numArray = new byte[hexString.Length / 2]; + + for (int index = 0; index < numArray.Length; ++index) + { + try + { + numArray[index] = Convert.ToByte(hexString.Substring(index * 2, 2), 16); + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + return numArray; + } + catch + { + MessageBox.Show("strToToHexByte!"); + return new byte[] { }; + } + + } + public static byte[] addCrcHexByte(byte[] strHexByte) + { + try + { + byte[] numArray = new byte[strHexByte.Length + 2]; + + for (int index = 0; index < strHexByte.Length; ++index) + { + try + { + numArray[index] = strHexByte[index]; + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + byte[] numArray2 = callcrc(strHexByte, strHexByte.Length); + numArray[strHexByte.Length + 0] = numArray2[0]; + numArray[strHexByte.Length + 1] = numArray2[1]; + return numArray; + } + catch + { + MessageBox.Show("addCrcHexByte!"); + return new byte[] { }; + } + + } + public static byte[] callcrc(byte[] ss, int num) + { + try + { + ushort num1 = ushort.MaxValue; + byte[] numArray = ss; + + for (byte index1 = 0; (int)index1 < num; ++index1) + { + num1 ^= (ushort)numArray[(int)index1]; + + for (byte index2 = 0; (int)index2 < 8; ++index2) + { + if (((int)num1 & 1) > 0) + num1 = (ushort)((uint)(ushort)((uint)num1 >> 1) ^ 40961U); + else + num1 >>= 1; + } + } + + byte num2 = (byte)((uint)num1 >> 8); + return new byte[2] + { + (byte)((uint) num1 & (uint) byte.MaxValue), + num2 + }; + } + catch + { + MessageBox.Show("callcrc!"); + return new byte[] { }; + } + + } + + /// + /// 打开设备通讯 + /// + /// + /// + private void btnCom_Click(object sender, EventArgs e) + { + try + { + if (CodeName == "") + { + comboBox1_SelectedIndexChanged(sender, e); + } + + serialPort1.BaudRate = Convert.ToInt32(19200); + serialPort1.Parity = Parity.None; + serialPort1.DataBits = 8; + serialPort1.StopBits = StopBits.One; + serialPort1.ReadBufferSize = 4068; + serialPort1.WriteBufferSize = 4068; + serialPort1.ReadTimeout = 200; + serialPort1.WriteTimeout = 200; + serialPort1.PortName = CodeName; + serialPort1.Open(); + + this.TBSEND.Text = "连接设备"; + } + catch + { + MessageBox.Show("btnCom_Click!"); + } + + } + + /// + /// 发送连接请求 + /// + /// + /// + private void btnCommSend_Click(object sender, EventArgs e) + { + try { + //btnCom_Click(); + if (serialPort1.IsOpen) + { + byte[] toHexByte = strToToHexByte("01" + "03" + "0FA1" + "0002"); + byte[] buffer = addCrcHexByte(toHexByte); + serialPort1.Write(buffer, 0, buffer.Length); + //TBRCV.Text = ""; + TBSEND.Text = ""; + string str = string.Empty; + + for (int index = 0; index < buffer.Length; ++index) + str = (int)buffer[index] >= 16 ? str + Convert.ToString(buffer[index], 16) + " " : str + "0" + Convert.ToString(buffer[index], 16) + " "; + + TBSEND.Text = str.ToUpper(); + } + else + { + int num1 = (int)MessageBox.Show("请打开设备连接!"); + } + } + catch + { + MessageBox.Show("btnCommSend_Click!"); + } + + } + + #endregion + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + } +} diff --git a/.svn/pristine/0a/0a28c1dce556768b05a9e74802b5c9fe461e0342.svn-base b/.svn/pristine/0a/0a28c1dce556768b05a9e74802b5c9fe461e0342.svn-base new file mode 100644 index 0000000..e4d954e --- /dev/null +++ b/.svn/pristine/0a/0a28c1dce556768b05a9e74802b5c9fe461e0342.svn-base @@ -0,0 +1,245 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.MD.Entity; +using QMFrameWork.Data; +using System.Data; +using QMAPP.DAL; +using QMAPP.Entity; + +namespace QMAPP.MD.DAL +{ + /// + /// 模块名称:缺陷表 + /// 作 者:张松男 + /// 编写日期:2021年5月26日 + /// + public class DefectDictDAL : BaseDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public DefectDict Get(DefectDict info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(DefectDict condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "MFGCODE"; //缺陷编号排序 + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + // 对应多种数据库 + //string sqlChange = this.ChangeSqlByDB(sql, session); + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取全部规则 + /// + /// + public List GetAllList() + { + try + { + string sql = "SELECT * FROM [T_AW_MENDRECORDERERP]"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(DefectDict condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,MFGCODETYPE,MFGCODETYPENAME,MFGCODE,MFGNAME,TYPE_CODE "); + sqlBuilder.Append("FROM T_AW_MENDRECORDERERP where MFGCODETYPE = 'DEFECTCODE'and TYPE_CODE = 'N/a' "); + //whereBuilder.Append(" AND ( FLGDEL<> '1' or FLGDEL is null)"); //逻辑删除字段 + //查询条件 + + //查询条件 + if (string.IsNullOrEmpty(condition.MFGCODE) == false) + { + sqlBuilder.Append($" AND MFGCODE like '%{condition.MFGCODE}%' "); + } + + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(DefectDict info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_AW_MENDRECORDERERP"); + sqlBuilder.Append(" where MFGCODE = '" + info.MFGCODE + "' and MFGCODETYPE = 'DEFECTCODE'"); + if (!string.IsNullOrEmpty(info.PID)) + sqlBuilder.Append(" and PID != '" + info.PID + "' "); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(DefectDict info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(DefectDict info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(DefectDict info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("delete T_AW_MENDRECORDERERP "); + + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/0b/0b21e73600ec3f87a40a8c09aedd65acab4396e2.svn-base b/.svn/pristine/0b/0b21e73600ec3f87a40a8c09aedd65acab4396e2.svn-base new file mode 100644 index 0000000..57254ff --- /dev/null +++ b/.svn/pristine/0b/0b21e73600ec3f87a40a8c09aedd65acab4396e2.svn-base @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + 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 + M+nrwpzaqbiqenZUyU9McxlOlu+mru+cGc9zi4fVDnajrNbFQVKe8XctTXoWBRCXlFdTW30eCdftc1WH + nglx3O45lc4KPe+GyljxpvQZdTn7Zq6Z/SnXmupQVTjF00TyeCLjoBCoEVHYkIK6fi4tqrpZcFvtLI+v + EhVOf0qSfKdEXJp6J6bJAOVEYulxM/tCWqmLxemwSSsvWX5GScq/ALjvod59BxI5t8/x7z8d3pJ1bPag + 1jykMvK3yh9dILlYbWU35ljYmlyraMs1zw9xFeQVIiKJNEupiVBaKoncaaFRPa9qbDavKtWjcoi5Kid7 + rNj6N/y79YOwuZvCZjVZvjBt+dPKQ30bfLZbhLmm+4/tz895Z4/G+GZ+/rnfTks47GKXk0fuJE+sVFWI + e1RW0aiqoCZoTfWqLMmgskJoU9uFapVNVKsrxY3qKvZkvo1957yb1cWAwubppOf+gVOWzyXlnztHebHl + Z8fZwENfP0B7qUajuah/upFnLs0xsX+kUPqahsc/qyzsagqNq/LL2VekEPlYyfnXMOe5K4HYq2T5Ajls + Fp1R3q+4JgXPvcdY4P4zy/WnDki8TZbPkZW/+yzLp5Xv/9k/yY9+OoFZKWFXnmX5D4eN/NinFxhY/oHl + 825DWHdXUvTcq/hUh82HkU7YIlJedRtQcSdIee3/G+UXLFjwPwKm4W/pt57aAAAAAElFTkSuQmCC + + + + True + + + True + + + True + + + True + + + True + + + 127, 17 + + \ No newline at end of file diff --git a/.svn/pristine/0b/0bd8b0abc498728ae674f7a38d14b53296daab86.svn-base b/.svn/pristine/0b/0bd8b0abc498728ae674f7a38d14b53296daab86.svn-base new file mode 100644 index 0000000..d14b36d --- /dev/null +++ b/.svn/pristine/0b/0bd8b0abc498728ae674f7a38d14b53296daab86.svn-base @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.DAL.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; + + +namespace QMAPP.FJC.BLL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年03月17日 + /// + public class MaterialBomConfigBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public List GetAutoInputBarCode(string pBomCode, string pWorkLoc) + { + try + { + return new MaterialBomConfigDAL().GetAutoInputBarCode(pBomCode, pWorkLoc); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public List Get(MaterialBomConfig info) + { + try + { + return new MaterialBomConfigDAL().Get(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } +} diff --git a/.svn/pristine/0c/0c430d79555a8f401727945b0e3dc3ce9ba1bbea.svn-base b/.svn/pristine/0c/0c430d79555a8f401727945b0e3dc3ce9ba1bbea.svn-base new file mode 100644 index 0000000..9673c81 Binary files /dev/null and b/.svn/pristine/0c/0c430d79555a8f401727945b0e3dc3ce9ba1bbea.svn-base differ diff --git a/.svn/pristine/0d/0d27033ada5eb7e898cb9aa8f5665e8e614253d4.svn-base b/.svn/pristine/0d/0d27033ada5eb7e898cb9aa8f5665e8e614253d4.svn-base new file mode 100644 index 0000000..a91911a --- /dev/null +++ b/.svn/pristine/0d/0d27033ada5eb7e898cb9aa8f5665e8e614253d4.svn-base @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑打印记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_RawMaterialRecord")] + public class RawMaterialRecord : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 投料ID + /// + [Description("投料ID")] + [DBColumn(ColumnName = "RawMaterialPID", DataType = DbType.String)] + public string RawMaterialPID { get; set; } + + /// + /// 注塑条码 + /// + [Description("注塑条码")] + [DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] + public string ProductCode { get; set; } + + /// + /// 物料号 + /// + [Description("物料号")] + [DBColumn(ColumnName = "MaterialCode", DataType = DbType.String)] + public string MaterialCode { get; set; } + + + /// + /// 物料名称 + /// + [Description("物料名称")] + [DBColumn(ColumnName = "MaterialName", DataType = DbType.String)] + public string MaterialName { get; set; } + + /// + /// 设备编号 + /// + [Description("设备编号")] + [DBColumn(ColumnName = "MachineCode", DataType = DbType.String)] + public string MachineCode { get; set; } + + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + /// + /// 料筒 + /// + [Description("料筒")] + public string BucketCode { get; set; } + /// + /// 零件号 + /// + [Description("零件号")] + public string PartCode { get; set; } + /// + /// 批次号 + /// + [Description("批次号")] + public string BatchCode { get; set; } + /// + /// 流水号 + /// + [Description("流水号")] + public string SerialCode { get; set; } + public string BeginTime { get; set; } + public string EndTime { get; set; } + + } +} diff --git a/.svn/pristine/0e/0eafbabd60d4de11e2bfc5e0c689975c43fee01c.svn-base b/.svn/pristine/0e/0eafbabd60d4de11e2bfc5e0c689975c43fee01c.svn-base new file mode 100644 index 0000000..533b11e --- /dev/null +++ b/.svn/pristine/0e/0eafbabd60d4de11e2bfc5e0c689975c43fee01c.svn-base @@ -0,0 +1,67 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 作废信息编辑 + + + <%=Html.QPEdit("作废信息编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + +
+ <%=Html.QV(p=>p.MFGCODE) %> + + <%=Html.QC(p => p.MFGCODE)%> +
+ <%=Html.QV(p=>p.MFGNAME) %> + + <%=Html.QC(p => p.MFGNAME)%> +
+
+ <%=Html.HiddenFor(p => p.PID)%> + <%=Html.HiddenFor(p => p.MFGCODETYPE)%> + <%=Html.HiddenFor(p => p.MFGCODETYPENAME)%> + <%=Html.HiddenFor(p => p.TYPE_CODE)%> + <%=Html.QPEnd() %> + +
+ + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%> +
+
diff --git a/.svn/pristine/0e/0ef92b452bfecc78b533023ea801d58d5544927b.svn-base b/.svn/pristine/0e/0ef92b452bfecc78b533023ea801d58d5544927b.svn-base new file mode 100644 index 0000000..0d99083 --- /dev/null +++ b/.svn/pristine/0e/0ef92b452bfecc78b533023ea801d58d5544927b.svn-base @@ -0,0 +1,227 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMFrameWork.Data.Attributes; +using QMAPP.Entity; + +namespace QMAPP.FJC.Entity.Injection +{ + /// + /// 模块编号:M3-1 + /// 作 用:投料记录数据模型 + /// 作 者:张松男 + /// 编写日期:2021年07月09日 + /// + [DBTable(TableName = "T_AW_INJECTIONRECORDER", TimeStampColumn = "UPDATEDATE")] + public class InjectionRecorderNEW : BaseEntity + { + /// + ///主键 + /// + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + /// + ///物料名称 + /// + [DBColumn(ColumnName = "MATERIALNAME", DataType = DbType.String)] + public string MATERIALNAME { get; set; } + + + /// + ///物料码 + /// + [DBColumn(ColumnName = "MATERIALCODE", DataType = DbType.String)] + public string MATERIALCODE { get; set; } + /// + ///物料码(模糊查询) + /// + public string MATERIALCODETXT { get; set; } + + /// + ///0:原材料 1:织物衬布 + /// + [DBColumn(ColumnName = "MATERIALTYPE", DataType = DbType.String)] + public string MATERIALTYPE { get; set; } + public string MATERIALTYPENAME { get; set; } + public string MATERIALTYPETXT { get; set; } + + /// + ///原材料批次号 + /// + [DBColumn(ColumnName = "MATERIALBATCH", DataType = DbType.String)] + public string MATERIALBATCH { get; set; } + + + /// + ///0:搪塑 1:注塑 2:浇注 + /// + [DBColumn(ColumnName = "MACHINETYPE", DataType = DbType.String)] + public string MACHINETYPE { get; set; } + public string MACHINETYPENAME { get; set; } + public string MACHINETYPETXT { get; set; } + + /// + ///0:搪塑 + ///1:注塑 + ///9:浇注 + /// + [DBColumn(ColumnName = "PROCESSTYPE", DataType = DbType.String)] + public string PROCESSTYPE { get; set; } + public string PROCESSTYPENAME { get; set; } + public string PROCESSTYPETXT { get; set; } + /// + /// 工序类型(Web端-搪塑投料记录使用) + /// + public string PROCESSTYPERECORD { get; set; } + /// + /// 工序类型(Web端-注塑投料记录使用) + /// + public string PROCESSTYPES { get; set; } + + /// + ///设备名称 + /// + [DBColumn(ColumnName = "MACHINENAME", DataType = DbType.String)] + public string MACHINENAME { get; set; } + + + /// + ///设备码 + /// + [DBColumn(ColumnName = "MACHINECODDE", DataType = DbType.String)] + public string MACHINECODDE { get; set; } + + + /// + ///注料顺序 + /// + [DBColumn(ColumnName = "INJECTIONINDEX", DataType = DbType.Int32)] + public int INJECTIONINDEX { get; set; } + + + /// + ///上料口 + /// + [DBColumn(ColumnName = "INJECTIONTERMINAL", DataType = DbType.Int32)] + public int INJECTIONTERMINAL { get; set; } + public string INJECTIONTERMINALNAME { get; set; } + + /// + ///投料重量 + /// + [DBColumn(ColumnName = "METERIALWEIGHT", DataType = DbType.Decimal)] + public decimal METERIALWEIGHT { get; set; } + + + /// + ///使用重量 + /// + [DBColumn(ColumnName = "USEDWEIGHTSUM", DataType = DbType.Decimal)] + public decimal USEDWEIGHTSUM { get; set; } + + + /// + ///班次名称 + /// + [DBColumn(ColumnName = "PRODUCESHIFTNAME", DataType = DbType.String)] + public string PRODUCESHIFTNAME { get; set; } + + + /// + ///班次编码 + /// + [DBColumn(ColumnName = "PRODUCESHIFTTCODE", DataType = DbType.String)] + public string PRODUCESHIFTTCODE { get; set; } + + + /// + ///生产线 + /// + [DBColumn(ColumnName = "PRODUCELINE", DataType = DbType.String)] + public string PRODUCELINE { get; set; } + + /// + ///料包号 + /// + [DBColumn(ColumnName = "PACKAGENO", DataType = DbType.String)] + public string PACKAGENO { get; set; } + + + /// + ///生产日期 + /// + [DBColumn(ColumnName = "MAKEDATE", DataType = DbType.DateTime)] + public DateTime MAKEDATE { get; set; } + + /// + ///有效期 + /// + [DBColumn(ColumnName = "LIMITTIME", DataType = DbType.Int32)] + public int LIMITTIME { get; set; } + + /// + ///有效期 + /// + [DBColumn(ColumnName = "VALIDDATE", DataType = DbType.DateTime)] + public DateTime VALIDDATE { get; set; } + + /// + ///创建人 + /// + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + public string CREATEUSERNAME { get; set; } + + /// + ///创建日期 + /// + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime)] + public DateTime CREATEDATE { get; set; } + + + /// + ///更新人 + /// + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + public string UPDATEUSERNAME { get; set; } + + /// + ///更新日期 + /// + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.DateTime)] + public DateTime UPDATEDATE { get; set; } + + /// + /// 错误信息 + /// + public string InfoError { get; set; } + /// + /// 导入时判断添加修改 + /// + public bool IsNewInfo { get; set; } + + /// + /// 查询投料时间的至 + /// + public string CreateDateStart { get; set; } + /// + /// 查询投料时间的至 + /// + public string CreateDateEnd { get; set; } + + /// + /// 本次注料重量 + /// + public string USEDWEIGHT { get; set; } + + /// + /// 产品主键 + /// + public string MPPID { get; set; } + + } + +} diff --git a/.svn/pristine/0f/0ff13fce07176acc35b3eba6769f3636b2455692.svn-base b/.svn/pristine/0f/0ff13fce07176acc35b3eba6769f3636b2455692.svn-base new file mode 100644 index 0000000..1fff8f6 --- /dev/null +++ b/.svn/pristine/0f/0ff13fce07176acc35b3eba6769f3636b2455692.svn-base @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {3AECE013-AC67-4F6F-9DB4-36577345F428} + WinExe + Stone.WinModuleTransWare + Stone.WinModuleTransWare + v4.0 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\Stone.Common.Dlls\Gm_WMS.DataAccess.DataService.dll + + + False + True + ..\..\..\..\CD-MESNEW\DLL\Interop.grproLib.dll + + + ..\..\..\..\CD-MESNEW\DLL\interop.speechlib.dll + True + + + False + ..\Stone.Common.Dlls\PlaySound.dll + + + ..\Stone.Common.Dlls\Stone.Common.dll + + + ..\Stone.Common.Dlls\Stone.Entity.dll + + + ..\Stone.Common.Dlls\Stone.User.dll + + + + + + + + + + + + + ..\Stone.Common.Dlls\WeifenLuo.WinFormsUI.Docking.dll + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/10/10444487bd0be3d04ec10a3fe5e0c8187148df7c.svn-base b/.svn/pristine/10/10444487bd0be3d04ec10a3fe5e0c8187148df7c.svn-base new file mode 100644 index 0000000..edbd4b0 --- /dev/null +++ b/.svn/pristine/10/10444487bd0be3d04ec10a3fe5e0c8187148df7c.svn-base @@ -0,0 +1,158 @@ + + + + CorpBLL + 公司信息 + QMAPP.MD.BLL.CorpBLL + QMAPP.MD.BLL.DLL + + + + FactoryBLL + 工厂信息 + QMAPP.MD.BLL.FactoryBLL + QMAPP.MD.BLL.DLL + + + + WorkCenterBLL + 工作中心 + QMAPP.MD.BLL.WorkCenterBLL + QMAPP.MD.BLL.DLL + + + + EquipmentBLL + 设备信息维护 + QMAPP.MD.BLL.EquipmentBLL + QMAPP.MD.BLL.DLL + + + + TeamBLL + 班组信息维护 + QMAPP.MD.BLL.TeamBLL + QMAPP.MD.BLL.DLL + + + + ShiftBLL + 班次信息维护 + QMAPP.MD.BLL.ShiftBLL + QMAPP.MD.BLL.DLL + + + + WorkCellBLL + 工序信息维护 + QMAPP.MD.BLL.WorkCellBLL + QMAPP.MD.BLL.DLL + + + + WorkLocBLL + 工位信息维护 + QMAPP.MD.BLL.WorkLocBLL + QMAPP.MD.BLL.DLL + + + + DaiBLL + 采集数据接口 + QMAPP.MD.BLL.DaiBLL + QMAPP.MD.BLL.DLL + + + + ProcessRouteBLL + 工艺路线 + QMAPP.MD.BLL.ProcessRouteBLL + QMAPP.MD.BLL.DLL + + + + MaterialBLL + 物料信息 + QMAPP.MD.BLL.MaterialBLL + QMAPP.MD.BLL.DLL + + + + MaterialClassBLL + 物料分类信息 + QMAPP.MD.BLL.MaterialClassBLL + QMAPP.MD.BLL.DLL + + + + + PbomBLL + PBOM + QMAPP.MD.BLL.PbomBLL + QMAPP.MD.BLL.DLL + + + + DaiBLL + 采集信息测试 + QMAPP.MD.BLL.DaiBLL + QMAPP.MD.BLL.DLL + + + + TeamMemberBLL + 班组成员 + QMAPP.MD.BLL.TeamMemberBLL + QMAPP.MD.BLL.DLL + + + + ParameterConfigEntityBLL + 加载参数设定 + QMAPP.MD.BLL.ParameterConfigEntityBLL + QMAPP.MD.BLL.DLL + + + + ScheduleBLL + 排班 + QMAPP.MD.BLL.ScheduleBLL + QMAPP.MD.BLL.DLL + + + + ProjectBLL + 项目号信息 + QMAPP.MD.BLL.ProjectBLL + QMAPP.MD.BLL.DLL + + + + UserWithMachineBLL + 能力矩阵配置 + QMAPP.MD.BLL.UserWithMachineBLL + QMAPP.MD.BLL.DLL + + + + WorkCellStateBLL + 采集点-状态码配置 + QMAPP.MD.BLL.WorkCellStateBLL + QMAPP.MD.BLL.DLL + + + + ConfigDetailBLL + 配置明细 + QMAPP.MD.BLL.ConfigDetailBLL + QMAPP.MD.BLL.DLL + + + + DefectDictBLL + 缺陷信息 + QMAPP.MD.BLL.DefectDictBLL + QMAPP.MD.BLL.DLL + + + diff --git a/.svn/pristine/12/12829bc80fb9a7a8a2305276aa96432688a8a965.svn-base b/.svn/pristine/12/12829bc80fb9a7a8a2305276aa96432688a8a965.svn-base new file mode 100644 index 0000000..f8ae3a5 --- /dev/null +++ b/.svn/pristine/12/12829bc80fb9a7a8a2305276aa96432688a8a965.svn-base @@ -0,0 +1,493 @@ +namespace QMAPP.WinForm +{ + partial class MainForm + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.btnInjectGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnInjectPrint = new System.Windows.Forms.ToolStripMenuItem(); + this.btnInjectPut = new System.Windows.Forms.ToolStripMenuItem(); // + this.btnInjectPutNEW = new System.Windows.Forms.ToolStripMenuItem(); // + this.btnInjectPrintForm = new System.Windows.Forms.ToolStripMenuItem(); + this.搪塑下线ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.btnvVWSinglePrint = new System.Windows.Forms.ToolStripMenuItem(); + this.btnvVWSinglePrintNew = new System.Windows.Forms.ToolStripMenuItem(); + this.btnSlushPut = new System.Windows.Forms.ToolStripMenuItem(); + this.浇注投料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiFoamingFeed = new System.Windows.Forms.ToolStripMenuItem(); + this.btnOperateGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnOperateStation = new System.Windows.Forms.ToolStripMenuItem(); + this.PrintCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPrintPlanlabel = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmDPAssmblyItem = new System.Windows.Forms.ToolStripMenuItem(); + this.btnMendGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnMendOperate = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPartReplace = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiCheck = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiLabelRegeneration = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiDefectRecording = new System.Windows.Forms.ToolStripMenuItem(); + this.btnUserOut = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiWarehouse = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPutIn = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiTakeOut = new System.Windows.Forms.ToolStripMenuItem(); + this.tsiShipment = new System.Windows.Forms.ToolStripMenuItem(); + this.FrmPlace = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiQuery = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiProductInfo = new System.Windows.Forms.ToolStripMenuItem(); + this.andonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.AodonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSetting = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSetStartUp = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiUserManage = new System.Windows.Forms.ToolStripMenuItem(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.tslServerHost = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslblOPCStatus = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslblIps = new System.Windows.Forms.ToolStripStatusLabel(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.menuStrip1.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Font = new System.Drawing.Font("微软雅黑", 13F); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnInjectGroup, + this.搪塑下线ToolStripMenuItem, + this.浇注投料ToolStripMenuItem, + this.btnOperateGroup, + this.btnMendGroup, + this.btnUserOut, + this.tsmiWarehouse, + this.tsiShipment, + this.tsmiQuery, + this.andonToolStripMenuItem, + this.tsmiSetting}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1203, 32); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // btnInjectGroup + // + this.btnInjectGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnInjectPrint, + this.btnInjectPut, + this.btnInjectPutNEW, + this.btnInjectPrintForm}); + this.btnInjectGroup.Name = "btnInjectGroup"; + this.btnInjectGroup.Size = new System.Drawing.Size(94, 28); + this.btnInjectGroup.Text = "注塑下线"; + // + // btnInjectPrint + // + this.btnInjectPrint.Name = "btnInjectPrint"; + this.btnInjectPrint.Size = new System.Drawing.Size(188, 28); + this.btnInjectPrint.Text = "注塑条码打印"; + this.btnInjectPrint.Click += new System.EventHandler(this.btnInjectPrint_Click); + // + // btnInjectPut + // + this.btnInjectPut.Name = "btnInjectPut"; + this.btnInjectPut.Size = new System.Drawing.Size(188, 28); + this.btnInjectPut.Text = "注塑投料"; + this.btnInjectPut.Click += new System.EventHandler(this.btnInjectPut_Click); + // + // btnInjectPutNEW + // + this.btnInjectPutNEW.Name = "btnInjectPutNEW"; + this.btnInjectPutNEW.Size = new System.Drawing.Size(188, 28); + this.btnInjectPutNEW.Text = "注塑投料新版"; + this.btnInjectPutNEW.Click += new System.EventHandler(this.btnInjectPutNEW_Click); + // + // btnInjectPutNEW + // + this.btnInjectPrintForm.Name = "btnInjectPrintForm"; + this.btnInjectPrintForm.Size = new System.Drawing.Size(188, 28); + this.btnInjectPrintForm.Text = "注塑条码补打"; + this.btnInjectPrintForm.Click += new System.EventHandler(this.btnInjectPrintForm_Click); + // + // 搪塑下线ToolStripMenuItem + // + this.搪塑下线ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnvVWSinglePrint, + this.btnvVWSinglePrintNew, + this.btnSlushPut}); + this.搪塑下线ToolStripMenuItem.Name = "搪塑下线ToolStripMenuItem"; + this.搪塑下线ToolStripMenuItem.Size = new System.Drawing.Size(94, 28); + this.搪塑下线ToolStripMenuItem.Text = "搪塑下线"; + // + // btnvVWSinglePrint + // + this.btnvVWSinglePrint.Name = "btnvVWSinglePrint"; + this.btnvVWSinglePrint.Size = new System.Drawing.Size(152, 28); + this.btnvVWSinglePrint.Text = "条码打印"; + this.btnvVWSinglePrint.Click += new System.EventHandler(this.btnvVWSinglePrint_Click); + // + // btnvVWSinglePrintNew + // + this.btnvVWSinglePrintNew.Name = "btnvVWSinglePrintNew"; + this.btnvVWSinglePrintNew.Size = new System.Drawing.Size(152, 28); + this.btnvVWSinglePrintNew.Text = "称重打印"; + this.btnvVWSinglePrintNew.Click += new System.EventHandler(this.btnvVWSinglePrintNew_Click); + // + // btnSlushPut + // + this.btnSlushPut.Name = "btnSlushPut"; + this.btnSlushPut.Size = new System.Drawing.Size(152, 28); + this.btnSlushPut.Text = "搪塑投料"; + this.btnSlushPut.Click += new System.EventHandler(this.btnSlushPut_Click); + // + // 浇注投料ToolStripMenuItem + // + this.浇注投料ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiFoamingFeed}); + this.浇注投料ToolStripMenuItem.Name = "浇注投料ToolStripMenuItem"; + this.浇注投料ToolStripMenuItem.Size = new System.Drawing.Size(94, 28); + this.浇注投料ToolStripMenuItem.Text = "浇注投料"; + // + // tsmiFoamingFeed + // + this.tsmiFoamingFeed.Name = "tsmiFoamingFeed"; + this.tsmiFoamingFeed.Size = new System.Drawing.Size(152, 28); + this.tsmiFoamingFeed.Text = "浇注投料"; + this.tsmiFoamingFeed.Click += new System.EventHandler(this.tsmiFoamingFeed_Click); + // + // btnOperateGroup + // + this.btnOperateGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnOperateStation, + this.PrintCodeToolStripMenuItem, + this.tsmiPrintPlanlabel, + this.tsmDPAssmblyItem}); + this.btnOperateGroup.Name = "btnOperateGroup"; + this.btnOperateGroup.Size = new System.Drawing.Size(94, 28); + this.btnOperateGroup.Text = "加工工位"; + // + // btnOperateStation + // + this.btnOperateStation.Name = "btnOperateStation"; + this.btnOperateStation.Size = new System.Drawing.Size(224, 28); + this.btnOperateStation.Text = "加工操作"; + this.btnOperateStation.Click += new System.EventHandler(this.btnOperateStation_Click); + // + // PrintCodeToolStripMenuItem + // + this.PrintCodeToolStripMenuItem.Name = "PrintCodeToolStripMenuItem"; + this.PrintCodeToolStripMenuItem.Size = new System.Drawing.Size(224, 28); + this.PrintCodeToolStripMenuItem.Text = "总成装配条码打印"; + this.PrintCodeToolStripMenuItem.Click += new System.EventHandler(this.PrintCodeToolStripMenuItem_Click); + // + // tsmiPrintPlanlabel + // + this.tsmiPrintPlanlabel.Name = "tsmiPrintPlanlabel"; + this.tsmiPrintPlanlabel.Size = new System.Drawing.Size(224, 28); + this.tsmiPrintPlanlabel.Text = "门板计划标签打印"; + this.tsmiPrintPlanlabel.Click += new System.EventHandler(this.tsmiPrintPlanlabel_Click); + // + // tsmDPAssmblyItem + // + this.tsmDPAssmblyItem.Name = "tsmDPAssmblyItem"; + this.tsmDPAssmblyItem.ShowShortcutKeys = false; + this.tsmDPAssmblyItem.Size = new System.Drawing.Size(224, 28); + this.tsmDPAssmblyItem.Text = "门板FIS补码"; + this.tsmDPAssmblyItem.Click += new System.EventHandler(this.tsmDPAssmblyItem_Click); + // + // btnMendGroup + // + this.btnMendGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnMendOperate, + this.tsmiPartReplace, + this.tsmiCheck, + this.tsmiLabelRegeneration, + this.tsmiDefectRecording}); + this.btnMendGroup.Name = "btnMendGroup"; + this.btnMendGroup.Size = new System.Drawing.Size(94, 28); + this.btnMendGroup.Text = "质量管理"; + // + // btnMendOperate + // + this.btnMendOperate.Name = "btnMendOperate"; + this.btnMendOperate.Size = new System.Drawing.Size(188, 28); + this.btnMendOperate.Text = "质量操作"; + this.btnMendOperate.Click += new System.EventHandler(this.btnMendOperate_Click); + // + // tsmiPartReplace + // + this.tsmiPartReplace.Name = "tsmiPartReplace"; + this.tsmiPartReplace.Size = new System.Drawing.Size(188, 28); + this.tsmiPartReplace.Text = "零件替换操作"; + this.tsmiPartReplace.Click += new System.EventHandler(this.替换操作ToolStripMenuItem_Click); + // + // tsmiCheck + // + this.tsmiCheck.Name = "tsmiCheck"; + this.tsmiCheck.Size = new System.Drawing.Size(188, 28); + this.tsmiCheck.Text = "抽检操作"; + this.tsmiCheck.Click += new System.EventHandler(this.抽检操作ToolStripMenuItem_Click); + // + // tsmiLabelRegeneration + // + this.tsmiLabelRegeneration.Name = "tsmiLabelRegeneration"; + this.tsmiLabelRegeneration.Size = new System.Drawing.Size(188, 28); + this.tsmiLabelRegeneration.Text = "总成条码替换"; + this.tsmiLabelRegeneration.Click += new System.EventHandler(this.总成条码替换ToolStripMenuItem_Click); + // + // tsmiDefectRecording + // + this.tsmiDefectRecording.Name = "tsmiDefectRecording"; + this.tsmiDefectRecording.Size = new System.Drawing.Size(188, 28); + this.tsmiDefectRecording.Text = "缺陷录入"; + this.tsmiDefectRecording.Click += new System.EventHandler(this.tsmiDefectRecording_Click); + // + // btnUserOut + // + this.btnUserOut.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.btnUserOut.Name = "btnUserOut"; + this.btnUserOut.Size = new System.Drawing.Size(58, 28); + this.btnUserOut.Text = "注销"; + this.btnUserOut.Click += new System.EventHandler(this.注销ToolStripMenuItem_Click); + // + // tsmiWarehouse + // + this.tsmiWarehouse.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiPutIn, + this.tsmiTakeOut}); + this.tsmiWarehouse.Name = "tsmiWarehouse"; + this.tsmiWarehouse.Size = new System.Drawing.Size(112, 28); + this.tsmiWarehouse.Text = "出入库管理"; + // + // tsmiPutIn + // + this.tsmiPutIn.Name = "tsmiPutIn"; + this.tsmiPutIn.Size = new System.Drawing.Size(170, 28); + this.tsmiPutIn.Text = "入库管理"; + this.tsmiPutIn.Click += new System.EventHandler(this.toolStripMenuItem2_Click); + // + // tsmiTakeOut + // + this.tsmiTakeOut.Name = "tsmiTakeOut"; + this.tsmiTakeOut.Size = new System.Drawing.Size(170, 28); + this.tsmiTakeOut.Text = "计划外出库"; + this.tsmiTakeOut.Click += new System.EventHandler(this.tsmiTakeOut_Click); + // + // tsiShipment + // + this.tsiShipment.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FrmPlace}); + this.tsiShipment.Name = "tsiShipment"; + this.tsiShipment.Size = new System.Drawing.Size(94, 28); + this.tsiShipment.Text = "发货管理"; + // + // FrmPlace + // + this.FrmPlace.Name = "FrmPlace"; + this.FrmPlace.Size = new System.Drawing.Size(152, 28); + this.FrmPlace.Text = "仪表发运"; + this.FrmPlace.Click += new System.EventHandler(this.FrmPlace_Click); + // + // tsmiQuery + // + this.tsmiQuery.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiProductInfo}); + this.tsmiQuery.Name = "tsmiQuery"; + this.tsmiQuery.Size = new System.Drawing.Size(94, 28); + this.tsmiQuery.Text = "信息查询"; + // + // tsmiProductInfo + // + this.tsmiProductInfo.Name = "tsmiProductInfo"; + this.tsmiProductInfo.Size = new System.Drawing.Size(188, 28); + this.tsmiProductInfo.Text = "产品状态查询"; + this.tsmiProductInfo.Click += new System.EventHandler(this.tsmiProductInfo_Click); + // + // andonToolStripMenuItem + // + this.andonToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.AodonToolStripMenuItem}); + this.andonToolStripMenuItem.Name = "andonToolStripMenuItem"; + this.andonToolStripMenuItem.Size = new System.Drawing.Size(116, 28); + this.andonToolStripMenuItem.Text = "Andon呼叫"; + // + // AodonToolStripMenuItem + // + this.AodonToolStripMenuItem.Name = "AodonToolStripMenuItem"; + this.AodonToolStripMenuItem.Size = new System.Drawing.Size(152, 28); + this.AodonToolStripMenuItem.Text = "报警呼叫"; + this.AodonToolStripMenuItem.Click += new System.EventHandler(this.AodonToolStripMenuItem_Click); + // + // tsmiSetting + // + this.tsmiSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiSetStartUp, + this.tsmiUserManage}); + this.tsmiSetting.Name = "tsmiSetting"; + this.tsmiSetting.Size = new System.Drawing.Size(58, 28); + this.tsmiSetting.Text = "设置"; + // + // tsmiSetStartUp + // + this.tsmiSetStartUp.Name = "tsmiSetStartUp"; + this.tsmiSetStartUp.Size = new System.Drawing.Size(260, 28); + this.tsmiSetStartUp.Text = "设置当前界面为启动页"; + this.tsmiSetStartUp.Click += new System.EventHandler(this.tsmiSetStartUp_Click); + // + // tsmiUserManage + // + this.tsmiUserManage.Name = "tsmiUserManage"; + this.tsmiUserManage.Size = new System.Drawing.Size(260, 28); + this.tsmiUserManage.Text = "用户管理"; + this.tsmiUserManage.Click += new System.EventHandler(this.tsmiUserManage_Click); + // + // statusStrip1 + // + this.statusStrip1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.tslServerHost, + this.tsslblOPCStatus, + this.tsslblIps}); + this.statusStrip1.Location = new System.Drawing.Point(0, 357); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(1203, 30); + this.statusStrip1.TabIndex = 2; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(171, 25); + this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; + // + // tslServerHost + // + this.tslServerHost.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tslServerHost.Name = "tslServerHost"; + this.tslServerHost.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tslServerHost.Size = new System.Drawing.Size(19, 25); + // + // tsslblOPCStatus + // + this.tsslblOPCStatus.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tsslblOPCStatus.Name = "tsslblOPCStatus"; + this.tsslblOPCStatus.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tsslblOPCStatus.Size = new System.Drawing.Size(99, 25); + this.tsslblOPCStatus.Text = "OPC服务:"; + this.tsslblOPCStatus.Visible = false; + // + // tsslblIps + // + this.tsslblIps.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tsslblIps.Name = "tsslblIps"; + this.tsslblIps.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tsslblIps.Size = new System.Drawing.Size(92, 25); + this.tsslblIps.Text = "本机IP:"; + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Interval = 5000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1203, 387); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.menuStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.IsMdiContainer = true; + this.MainMenuStrip = this.menuStrip1; + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "富维安道拓成都数字化工厂"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); + this.Load += new System.EventHandler(this.MainForm_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem btnInjectGroup; + private System.Windows.Forms.ToolStripMenuItem btnInjectPut; + private System.Windows.Forms.ToolStripMenuItem btnInjectPutNEW; + private System.Windows.Forms.ToolStripMenuItem btnInjectPrintForm; + private System.Windows.Forms.ToolStripMenuItem btnOperateGroup; + private System.Windows.Forms.ToolStripMenuItem btnOperateStation; + private System.Windows.Forms.ToolStripMenuItem btnMendGroup; + private System.Windows.Forms.ToolStripMenuItem btnMendOperate; + private System.Windows.Forms.ToolStripMenuItem btnUserOut; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripMenuItem PrintCodeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tsiShipment; + private System.Windows.Forms.ToolStripMenuItem FrmPlace; + private System.Windows.Forms.ToolStripMenuItem andonToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem AodonToolStripMenuItem; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ToolStripMenuItem tsmiSetting; + private System.Windows.Forms.ToolStripMenuItem tsmiSetStartUp; + private System.Windows.Forms.ToolStripMenuItem tsmiWarehouse; + private System.Windows.Forms.ToolStripMenuItem tsmiPutIn; + private System.Windows.Forms.ToolStripStatusLabel tslServerHost; + private System.Windows.Forms.ToolStripMenuItem tsmiPrintPlanlabel; + private System.Windows.Forms.ToolStripMenuItem tsmiTakeOut; + private System.Windows.Forms.ToolStripMenuItem tsmiPartReplace; + private System.Windows.Forms.ToolStripMenuItem tsmiCheck; + private System.Windows.Forms.ToolStripMenuItem tsmiLabelRegeneration; + private System.Windows.Forms.ToolStripMenuItem tsmiQuery; + private System.Windows.Forms.ToolStripMenuItem tsmiProductInfo; + private System.Windows.Forms.ToolStripMenuItem 搪塑下线ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem btnvVWSinglePrint; + private System.Windows.Forms.ToolStripMenuItem btnvVWSinglePrintNew; + private System.Windows.Forms.ToolStripMenuItem btnInjectPrint; + private System.Windows.Forms.ToolStripMenuItem tsmDPAssmblyItem; + private System.Windows.Forms.ToolStripMenuItem 浇注投料ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tsmiFoamingFeed; + private System.Windows.Forms.ToolStripMenuItem btnSlushPut; + private System.Windows.Forms.ToolStripStatusLabel tsslblOPCStatus; + private System.Windows.Forms.ToolStripStatusLabel tsslblIps; + private System.Windows.Forms.ToolStripMenuItem tsmiUserManage; + private System.Windows.Forms.ToolStripMenuItem tsmiDefectRecording; + } +} + diff --git a/.svn/pristine/13/13231281ba8fb315b9581ce62b1190a03641c1cc.svn-base b/.svn/pristine/13/13231281ba8fb315b9581ce62b1190a03641c1cc.svn-base new file mode 100644 index 0000000..d205a34 --- /dev/null +++ b/.svn/pristine/13/13231281ba8fb315b9581ce62b1190a03641c1cc.svn-base @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Stone.WinModuleTransWare.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/.svn/pristine/13/132c686370ed5f381a5aa2b18e13a886d9a9905e.svn-base b/.svn/pristine/13/132c686370ed5f381a5aa2b18e13a886d9a9905e.svn-base new file mode 100644 index 0000000..8374349 --- /dev/null +++ b/.svn/pristine/13/132c686370ed5f381a5aa2b18e13a886d9a9905e.svn-base @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_RawMaterial")] + public class RawMaterial : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 投料桶 + /// + [Description("投料桶")] + [DBColumn(ColumnName = "BucketCode", DataType = DbType.String)] + public string BucketCode { get; set; } + + /// + /// 零件号 + /// + [Description("零件号")] + [DBColumn(ColumnName = "PartCode", DataType = DbType.String)] + public string PartCode { get; set; } + + /// + /// 批次号 + /// + [Description("批次号")] + [DBColumn(ColumnName = "BatchCode", DataType = DbType.String)] + public string BatchCode { get; set; } + + /// + /// 流水号 + /// + [Description("流水号")] + [DBColumn(ColumnName = "SerialCode", DataType = DbType.String)] + public string SerialCode { get; set; } + public string MaterialCode { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + public string CreateDateStart { get; set; } + public string CreateDateEnd { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/13/137f5591f24af8967c73d38483d2cae88b2d27a2.svn-base b/.svn/pristine/13/137f5591f24af8967c73d38483d2cae88b2d27a2.svn-base new file mode 100644 index 0000000..f2a613d --- /dev/null +++ b/.svn/pristine/13/137f5591f24af8967c73d38483d2cae88b2d27a2.svn-base @@ -0,0 +1,395 @@ + + + + + <_PublishTargetUrl>C:\Users\Administrator\Desktop\发布\CDMES\MainDataWeb + + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:46 + + + 07/19/2012 10:59:52 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 05/24/2021 10:19:00 + + + 05/24/2021 10:19:00 + + + 05/24/2021 10:19:00 + + + 05/24/2021 10:19:00 + + + 05/24/2021 10:17:37 + + + 05/24/2021 10:17:37 + + + 05/24/2021 10:17:35 + + + 05/24/2021 10:17:35 + + + 05/24/2021 10:18:59 + + + 05/24/2021 10:18:59 + + + 05/24/2021 10:18:59 + + + 05/24/2021 10:18:59 + + + 05/24/2021 10:19:01 + + + 05/24/2021 10:19:01 + + + 05/24/2021 10:17:35 + + + 02/26/2021 09:27:15 + + + 05/24/2021 10:17:35 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/01/2012 09:06:22 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:28 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:29 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:30 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 02/26/2021 09:16:31 + + + 03/19/2021 09:13:40 + + + \ No newline at end of file diff --git a/.svn/pristine/14/14c28b2506320904c9cc261965f487e03e08aaf4.svn-base b/.svn/pristine/14/14c28b2506320904c9cc261965f487e03e08aaf4.svn-base new file mode 100644 index 0000000..85e6f0a --- /dev/null +++ b/.svn/pristine/14/14c28b2506320904c9cc261965f487e03e08aaf4.svn-base @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.BZD +{ + /// + /// 模块名称 补打条码 + /// 作 者 张松男 + /// 编写日期 2021年05月24日 + /// + public class BarCodeReplacementModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 补打类型 + /// + [Description("补打类型")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200, JsonUtl = "/Dict/GetFixedComboxSource?kind=BarCodeType")] + [InputType(inputType.combobox)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string Type { get; set; } + /// + /// 补打条码 + /// + [Description("补打条码")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string ProductCode { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string CreateTime { get; set; } + + /// + /// 结束时间 + /// + [Description("结束时间")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.dateTimeBox)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center, Hidden = true)] + public string EndTime { get; set; } + + /// + /// 开始时间 + /// + [Description("开始时间")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.dateTimeBox)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] + public string BeginTime { get; set; } + /// + /// 创建用户 + /// + [Description("创建用户")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string CreateUser { get; set; } + + } +} diff --git a/.svn/pristine/15/158ded0043aa6c8e618348c1fab060cee7a975fe.svn-base b/.svn/pristine/15/158ded0043aa6c8e618348c1fab060cee7a975fe.svn-base new file mode 100644 index 0000000..fc9901e --- /dev/null +++ b/.svn/pristine/15/158ded0043aa6c8e618348c1fab060cee7a975fe.svn-base @@ -0,0 +1,240 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {063B6316-7154-4BD9-B546-21CCE4685235} + Library + Properties + QMAPP.FJC.DAL + QMAPP.FJC.DAL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/15/15baf5514d4ae97fbd4b588df10818202ceb26dc.svn-base b/.svn/pristine/15/15baf5514d4ae97fbd4b588df10818202ceb26dc.svn-base new file mode 100644 index 0000000..7fbbedd --- /dev/null +++ b/.svn/pristine/15/15baf5514d4ae97fbd4b588df10818202ceb26dc.svn-base @@ -0,0 +1,1890 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628} + WinExe + Properties + QMAPP.WinForm + QMAPP.WinForm + v4.0 + + + 512 + SAK + SAK + SAK + SAK + true + E:\Deploy\CDMES\Winform\ + true + Web + true + Foreground + 7 + Days + true + true + true + http://10.111.144.97:8088/ + http://10.111.144.97:8088/ + Trace System + ADIENT + 1.0.0.0 + true + Default.htm + true + 35 + 1.0.1.%2a + false + true + true + true + Relative + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\QMAPP.WinForm.XML + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + D7B0D251F30AE957B8EE42D7C0AD873E0F75B094 + + + + + + + true + + + false + + + cfaa-mes.ico + + + + false + + + QMSetupKey.pfx + + + + True + + + ..\..\DLL\BarcodeLib.dll + + + + + + False + ..\..\DLL\FastReport\FastReport.dll + + + ..\..\DLL\Interop.gregn6Lib.dll + True + + + False + True + bin\Debug\Interop.Microsoft.Office.Core.dll + + + False + True + bin\Debug\Interop.Microsoft.Office.Interop.Excel.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + False + ..\..\DLL\PlaySound.dll + + + False + ..\..\DLL\QMCommon.dll + + + False + ..\..\DLL\QMConfig.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + False + ..\..\DLL\QMWinCommon.dll + + + + + + + + + + + + + + + + + + ..\..\DLL\ThoughtWorks.QRCode.dll + + + + + + + + + Component + + + UserControl + + + Pager.cs + + + + + + + + + + + + + + + + + + + + + Form + + + CallManageForm.cs + + + + Form + + + frmAlertConfirm.cs + + + Form + + + LeakInspection.cs + + + Form + + + DefaultDataSetNum.cs + + + + Form + + + FrmCarCardDetail.cs + + + Form + + + FrmCarCardPrintShow.cs + + + Form + + + FrmItemList.cs + + + Form + + + frmLineSetting.cs + + + Form + + + FrmPlace.cs + + + True + True + PastCard.rpt + Component + + + + + Form + + + ResetSendIndexForm.cs + + + Form + + + DPShipment.cs + + + Form + + + InjectPasswordForm.cs + + + Form + + + InjectPrintForm.cs + + + Form + + + InjectionCodePrint.cs + + + Form + + + MaterialTreeForm.cs + + + + Form + + + DPLabelRegenerate.cs + + + Form + + + InjectIntoBarcode.cs + + + Form + + + InjectPlat.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + MainCodeChangeEditForm.cs + + + Form + + + MainCodeChangeForm.cs + + + Form + + + MendReasonSubDefects.cs + + + Form + + + MendRecorderWasteForm.cs + + + Form + + + ProductCheckAddForm.cs + + + Form + + + ProductCheckDetailForm.cs + + + Form + + + ProductCheckForm.cs + + + Form + + + ProductCheckValuesFrom.cs + + + Form + + + ReplaceForm.cs + + + Form + + + MendRecorderReasonForm.cs + + + Form + + + BZDPasswordForm.cs + + + Form + + + BZDRePrintForm.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + frmInspectSkipping.cs + + + Form + + + PrintPlanLabel.cs + + + Form + + + frmFISBreakConfirm.cs + + + Form + + + ProductInForm.cs + + + Form + + + ProductInSendCodeForm.cs + + + Form + + + ProductInfo.cs + + + Form + + + DPAssemblyCodePrintForm.cs + + + Form + + + DoorFrameForm.cs + + + Form + + + EquipmentAlarmForm.cs + + + Form + + + FisM100ListForm.cs + + + Form + + + CastCounterSet.cs + + + Form + + + InjectionCheckForm.cs + + + Form + + + InjectionCheckListForm.cs + + + Form + + + InjectionScarpForm.cs + + + Form + + + SingleSlushMoldConfig.cs + + + Form + + + SingleSlushMoldConfigEdit.cs + + + Form + + + SlushMoldingEditForm.cs + + + Form + + + SlushMoldingForm.cs + + + Form + + + SlushMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForm.cs + + + Form + + + EquipmentMaintainEditForm.cs + + + Form + + + EquipmentMaintainForm.cs + + + Form + + + InjectionMoldingEditForm.cs + + + Form + + + InjectionMoldingForm.cs + + + Form + + + InjectionMoldingPrintForm.cs + + + Form + + + ProductBundleForm.cs + + + Form + + + InjectionMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForOldForm.cs + + + Form + + + PouringMoldingEditForm.cs + + + Form + + + PouringMoldingForm.cs + + + Form + + + SlushMoldingPrintLotForm.cs + + + Form + + + InjectionMoldingPrintLotForm.cs + + + Form + + + SlushMoldSet.cs + + + Form + + + SlushScarpForm.cs + + + Form + + + MachineCheckEditForm.cs + + + Form + + + MachineCheckForm.cs + + + Form + + + ItemForm.cs + + + Form + + + MendRecorderForm.cs + + + Form + + + MendRecorderCreateForm.cs + + + Form + + + MendRecorderFinishForm.cs + + + Form + + + MendStaticForm.cs + + + Form + + + SpecifyForm.cs + + + Form + + + TestForm.cs + + + Form + + + VideoTypeEditForm.cs + + + Form + + + MediaPlayerForm.cs + + + Form + + + MediaPlayerSubForm.cs + + + Form + + + MediaPlayerEditForm.cs + + + Form + + + VideoTypeForm.cs + + + Form + + + MainOperationSearchForm.cs + + + Form + + + PrintForm.cs + + + + Form + + + ProductAddForm.cs + + + Form + + + RepairForm.cs + + + Form + + + OperationForm.cs + + + Form + + + SetProcessPassForm.cs + + + Form + + + SPCControlForm.cs + + + Form + + + MainOperationStaticForm.cs + + + Form + + + SlushPlanEditForm.cs + + + Form + + + SlushPlanForm.cs + + + Form + + + ReprintForm.cs + + + Form + + + OutWarehouseForm.cs + + + Form + + + SendPlanSearchEditForm.cs + + + Form + + + SendPlanSearchForm.cs + + + Form + + + SendPlanPrintForm.cs + + + Form + + + EditUserForm.cs + + + Form + + + ManageUserForm.cs + + + Form + + + InWarehouseForm.cs + + + Form + + + SendCodeForm.cs + + + Form + + + SendFinalForm.cs + + + Form + + + MainForm.cs + + + Form + + + LoginForm.cs + + + + + + + + + + + + + + + True + True + Resource1.resx + + + Form + + + ServerSwitch.cs + + + True + True + Reference.svcmap + + + UserControl + + + BaseHole.cs + + + UserControl + + + DetailHole.cs + + + + + + + + + Pager.cs + + + CallManageForm.cs + + + frmAlertConfirm.cs + + + LeakInspection.cs + + + DefaultDataSetNum.cs + + + FrmCarCardDetail.cs + + + FrmCarCardPrintShow.cs + + + FrmItemList.cs + + + frmLineSetting.cs + + + FrmPlace.cs + + + CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator + PastCard.cs + + + ResetSendIndexForm.cs + + + DPShipment.cs + + + InjectPasswordForm.cs + + + InjectPrintForm.cs + + + InjectIntoBarcode.cs + + + InjectionCodePrint.cs + + + MaterialTreeForm.cs + + + DPLabelRegenerate.cs + + + InjectPlat.cs + + + DPLabelReplace.cs + + + MainCodeChangeEditForm.cs + + + MainCodeChangeForm.cs + + + MendReasonSubDefects.cs + + + MendRecorderWasteForm.cs + + + ProductCheckAddForm.cs + + + ProductCheckDetailForm.cs + + + ProductCheckForm.cs + + + ProductCheckValuesFrom.cs + + + ReplaceForm.cs + + + MendRecorderReasonForm.cs + + + BZDPasswordForm.cs + + + BZDRePrintForm.cs + + + DPLabelReplace.cs + + + frmInspectSkipping.cs + + + PrintPlanLabel.cs + + + frmFISBreakConfirm.cs + + + ProductInForm.cs + Designer + + + ProductInSendCodeForm.cs + + + ProductInfo.cs + + + DPAssemblyCodePrintForm.cs + + + DoorFrameForm.cs + + + EquipmentAlarmForm.cs + + + FisM100ListForm.cs + + + CastCounterSet.cs + + + InjectionCheckForm.cs + + + InjectionCheckListForm.cs + + + InjectionScarpForm.cs + + + SingleSlushMoldConfig.cs + + + SingleSlushMoldConfigEdit.cs + + + SlushMoldingEditForm.cs + + + SlushMoldingForm.cs + + + SlushMoldingPrintEditForm.cs + + + SlushMoldingPrintForm.cs + + + EquipmentMaintainEditForm.cs + + + EquipmentMaintainForm.cs + + + InjectionMoldingEditForm.cs + + + InjectionMoldingForm.cs + + + InjectionMoldingPrintForm.cs + Designer + + + ProductBundleForm.cs + + + InjectionMoldingPrintEditForm.cs + + + SlushMoldingPrintForOldForm.cs + + + PouringMoldingEditForm.cs + + + PouringMoldingForm.cs + + + SlushMoldingPrintLotForm.cs + + + InjectionMoldingPrintLotForm.cs + + + SlushMoldSet.cs + + + SlushScarpForm.cs + + + MachineCheckEditForm.cs + + + MachineCheckForm.cs + + + ItemForm.cs + + + MendRecorderForm.cs + + + MendRecorderCreateForm.cs + + + MendRecorderFinishForm.cs + + + MendStaticForm.cs + + + SpecifyForm.cs + + + TestForm.cs + + + VideoTypeEditForm.cs + + + MediaPlayerForm.cs + + + MediaPlayerSubForm.cs + + + MediaPlayerEditForm.cs + + + VideoTypeForm.cs + + + MainOperationSearchForm.cs + + + PrintForm.cs + + + ProductAddForm.cs + + + RepairForm.cs + + + OperationForm.cs + Designer + + + SetProcessPassForm.cs + + + SPCControlForm.cs + + + MainOperationStaticForm.cs + + + SlushPlanEditForm.cs + + + SlushPlanForm.cs + + + ReprintForm.cs + + + OutWarehouseForm.cs + Designer + + + SendPlanSearchEditForm.cs + + + SendPlanSearchForm.cs + + + SendPlanPrintForm.cs + + + EditUserForm.cs + + + ManageUserForm.cs + + + InWarehouseForm.cs + Designer + + + SendCodeForm.cs + + + SendFinalForm.cs + + + LoginForm.cs + + + MainForm.cs + + + PublicResXFileCodeGenerator + Designer + Resource1.Designer.cs + + + ServerSwitch.cs + + + BaseHole.cs + + + DetailHole.cs + + + Designer + + + + PreserveNewest + + + + + PreserveNewest + + + Always + + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {706750E7-6D42-4FE2-95BF-99E90F84BE07} + QMAPP.FJC.TRACING + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + Always + Designer + + + Always + + + Always + + + Always + + + + + WCF Proxy Generator + Reference.cs + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + Always + + + Designer + + + Always + Designer + + + Always + + + Always + + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + + + + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + aximp + False + + + {F5078F18-C551-11D3-89B9-0000F81FE221} + 3 + 0 + 0 + tlbimp + False + True + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + tlbimp + False + True + + + + + False + 追溯系统 + 1 + cfaa-mes.ico + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/15/15e215d202263b319f019e113ac6e69ab20aa659.svn-base b/.svn/pristine/15/15e215d202263b319f019e113ac6e69ab20aa659.svn-base new file mode 100644 index 0000000..e30f2f8 --- /dev/null +++ b/.svn/pristine/15/15e215d202263b319f019e113ac6e69ab20aa659.svn-base @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.DAL.ProduceManage; +using QMAPP.FJC.Entity.ProduceManage; +using QMFrameWork.Data; +using QMFrameWork.Log; +using QMAPP.FJC.Entity; +using QMAPP.MD.Entity.Bucket; +using QMAPP.FJC.DAL.Bucket; + +namespace QMAPP.FJC.BLL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialBLL : BaseBLL + { + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BucketMaterial model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BucketMaterialDAL().Get(model); + result.IsSuccess = true; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取异常"; + } + + return result; + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BucketMaterial condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + DataPage dataPage = new BucketMaterialDAL().GetList(condition, page); + + result.IsSuccess = true; + result.Result = dataPage; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取列表异常!"; + } + + return result; + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 全部集合 + public DataPage GetAllList(BucketMaterial condition,DataPage page) + { + try + { + //获取信息列表 + DataPage list = new BucketMaterialDAL().GetList(condition, page); + return list; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + throw ex; + } + } + + + #endregion + + #region + + public List GetBucketMaterialList(BucketMaterial info) + { + try + { + return new BucketMaterialDAL().GetBucketMaterialList(info); + + + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + return new List(); + } + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(BucketMaterial info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = info.CREATEUSER; + info.UPDATEDATE = info.CREATEDATE; + info.IsCheck = "0"; + BucketMaterialDAL cmdDAL = new BucketMaterialDAL(); + result.Result = cmdDAL.Insert(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult Update(BucketMaterial model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + BucketMaterial info = new BucketMaterialDAL().Get(model); + + //基本信息 + info.IsCheck = model.IsCheck; + info.BucketCode = model.BucketCode; + info.Line = model.Line; + info.RawMaterial = model.RawMaterial; + info.CREATEUSER = model.CREATEUSER; + info.CREATEDATE = model.CREATEDATE; + info.UPDATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = this.LoginUser.UserID; + int temp = new BucketMaterialDAL().Update(info); + + if (temp == 0) + { + result.IsSuccess = false; + result.Msg = "更新失败!"; + return result; + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "更新异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "更新异常"; + } + return result; + } + #endregion + + #region 删除 + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int Delete(string model) + { + int count = 0; + try + { + count = new BucketMaterialDAL().Delete(model); + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/16/163c6b313d5cad8d19d1eb8bd44a51629c9bd1e2.svn-base b/.svn/pristine/16/163c6b313d5cad8d19d1eb8bd44a51629c9bd1e2.svn-base new file mode 100644 index 0000000..3d50412 --- /dev/null +++ b/.svn/pristine/16/163c6b313d5cad8d19d1eb8bd44a51629c9bd1e2.svn-base @@ -0,0 +1,235 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMFrameWork.Common.Encrypt; +using QMFrameWork.Data; +using QMAPP.FJC.DAL.Operation; +using QMAPP.FJC.Entity.Operation; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.BLL.Basic; +using QMAPP.Entity; +using QMFrameWork.Log; +using QMAPP.FJC.Entity.Injection; +using QMAPP.FJC.DAL.FeedInManage; +namespace QMAPP.FJC.BLL.Operation +{ + /// + /// 模块编号: + /// 作 用:成品信息查询 + /// 作 者:郭兆福 + /// 编写日期:2018年03月12日 + /// + public class ProductEndBLL : BaseBLL + { + #region 成品信息查询 + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public ProductEnd Get(ProductEnd model) + { + try + { + return new ProductEndDAL().Get(model); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + //public ProductEnd GetByCondition(ProductEnd model) + //{ + // try + // { + // List list = new ProductEndDAL().GetList(model); + // if (list.Count > 0) + // { + // return list[0]; + // } + // return null; + // } + // catch (Exception ex) + // { + // throw ex; + // } + //} + + public QMAPP.FJC.Entity.Basic.MaterialCodeInit GetMaterialSetByCondition(QMAPP.FJC.Entity.Basic.MaterialCodeInit condition) + { + return new QMAPP.FJC.DAL.Basic.MaterialCodeInitDAL().GetByCondition(condition); + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(ProductEnd condition, DataPage page) + { + DataResult result = new DataResult(); + + try + { + result.IsSuccess = true; + + page = new ProductEndDAL().GetAllList(condition, page); + List list = page.Result as List; + + //处理字典信息 + DictManageBLL dictPROCESSTYPE = new DictManageBLL(DictKind.PROCESSTYPE); + DictManageBLL dictColor = new DictManageBLL(DictKind.COLOR); + DictManageBLL dictSTATUS = new DictManageBLL(DictKind.LJSTATUS); + DictManageBLL dictOUTFLAG = new DictManageBLL(DictKind.OUTFLAG); + DictManageBLL dictHL = new DictManageBLL(DictKind.HAndL); + DictManageBLL dictYN = new DictManageBLL(DictKind.ValidFlg); + foreach (var info in list) + { + //替换工序类别显示值 + info.CURRENTPROCESS = dictPROCESSTYPE.GetDictValue(info.CURRENTPROCESS); + //替换零件类别显示值 + //info.COLOR = dictColor.GetDictValue(info.COLOR); + //替换零件类别显示值 + info.STATUS = dictSTATUS.GetDictValue(info.STATUS); + //替换出库标记显示值 + info.OUTFLAG = dictOUTFLAG.GetDictValue(info.OUTFLAG); + //替换使用状态显示值 + //info.HB = dictHL.GetDictValue(info.HB); + + //info.COMPLETEFLAG = dictYN.GetDictValue(info.COMPLETEFLAG); + + ////info.COMPLETETIMESTR = dictColor.GetDictValue(info.COLOR); + //info.COMPLETEDATE = (info.COMPLETETIME == System.DateTime.MinValue) ? "" + // : info.COMPLETETIME.ToString("yyyy-MM-dd HH:mm:ss"); + + } + + page.Result = list; + + result.Result = page; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "本体信息获取列表错误!" + }); + result.IsSuccess = false; + result.Msg = "本体信息获取列表错误!"; + } + return result; + } + + /// + /// 获取列表 + /// + /// 条件 + /// 全部数据 + //public List GetAllList(ProductEnd condition) + //{ + // try + // { + // return new ProductEndDAL().GetList(condition); + // } + // catch (Exception ex) + // { + // throw ex; + // } + //} + #endregion + + #region 加载零件列表 + /// + /// 加载零件列表11111111111 + /// + /// 条件 + /// 数据页 + public DataResult> GetListWithProduct(ProductEnd condition) + { + DataResult> result = new DataResult>(); + result.IsSuccess = true; + try + { + result.Result = new ProductEndDAL().GetListWithProduct(condition); + + } + catch (Exception ex) + { + throw ex; + } + return result; + } + #endregion + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataResult GetExportData(ProductEnd model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + result.Result = new ProductEndDAL().GetExportData(model); + + //处理字典信息 + DictManageBLL dictPROCESSTYPE = new DictManageBLL(DictKind.PROCESSTYPE); + DictManageBLL dictColor = new DictManageBLL(DictKind.COLOR); + DictManageBLL dictSTATUS = new DictManageBLL(DictKind.LJSTATUS); + DictManageBLL dictOUTFLAG = new DictManageBLL(DictKind.OUTFLAG); + DictManageBLL dictHL = new DictManageBLL(DictKind.HAndL); + DictManageBLL dictYN = new DictManageBLL(DictKind.ValidFlg); + + foreach (DataRow dr in result.Result.Rows) + { + //替换工序类别显示值 + //dr["CURRENTPROCESS"] = dictPROCESSTYPE.GetDictValue(dr["CURRENTPROCESS"].ToString()); + //替换零件类别显示值 + dr["COLOR"] = dictColor.GetDictValue(dr["COLOR"].ToString()); + //替换零件类别显示值 + dr["STATUS"] = dictSTATUS.GetDictValue(dr["STATUS"].ToString()); + //替换出库标记显示值 + dr["OUTFLAG"] = dictOUTFLAG.GetDictValue(dr["OUTFLAG"].ToString()); + //替换使用状态显示值 + dr["HB"] = dictHL.GetDictValue(dr["HB"].ToString()); + } + } + catch (Exception ex) + { + throw ex; + } + return result; + } + #endregion + + #endregion + + } +} + + + + + + diff --git a/.svn/pristine/16/16693cf9f197216d44ce984c1a3fefbce76a2dd1.svn-base b/.svn/pristine/16/16693cf9f197216d44ce984c1a3fefbce76a2dd1.svn-base new file mode 100644 index 0000000..d26e36d --- /dev/null +++ b/.svn/pristine/16/16693cf9f197216d44ce984c1a3fefbce76a2dd1.svn-base @@ -0,0 +1,1020 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QMAPP.WinForm.Forms.Injection; +using QMAPP.WinForm.Forms.Operation; +using QMAPP.WinForm.Forms.EquipmentAlarm; +using QMAPP.WinForm.Forms.InformationSearch; +using QMAPP.WinForm.Forms.Mend; +using QMAPP.WinForm.Forms.WarehouseManage; +using QMAPP.ServicesAgent.LoginService; +using QMAPP.WinForm.Common; +using QMAPP.WinForm.Forms.Andon; +using QMAPP.WinForm.Forms.Andon.Enum; +using QMAPP.WinForm.Forms.SlushPlanForm; +using QMAPP.WinForm.Forms.DisPatch; +using QMAPP.WinForm.Forms.MachineCheck; +using QMAPP.WinForm.Forms.ODS; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Forms.ProductIn; +using System.Configuration; +using System.ServiceModel.Configuration; +using QMAPP.WinForm.Forms.RePrint; + + +namespace QMAPP.WinForm +{ + /// + /// 主窗体 + /// + public partial class MainForm : Form + { + + public MainForm() + { + InitializeComponent(); + } + + public MainForm(LoginInfo login) + { + InitializeComponent(); + SetLoginInfo(login); + + } + /// + /// 设置登录信息 + /// + /// + public void SetLoginInfo(LoginInfo login) + { + ClientContext.AuthList = new Dictionary(); + List powerIDList = new List(); + XmlReader reader = new XmlReader(); + if (login.LoginUserID.ToUpper().Trim() != "ADMIN") + { + //到菜单配置文件中获取按钮信息 + + //在web系统中权限配置文件中工控机 + + List powerIDListTemp = login.Powers.ToList() + .Where(o => + Convert.ToInt32(o.Substring(2, 2)) >= 80 && Convert.ToInt32(o.Substring(2, 2)) <= 95 + ).ToList(); + foreach (var item in powerIDListTemp) + { + powerIDList.Add(item); + if (!powerIDList.Contains(item.Substring(0, 6).PadRight(8, '0'))) + { + powerIDList.Add(item.Substring(0, 6).PadRight(8, '0')); + } + } + + List btnIDList = reader.GetMenuBtnFromPower(powerIDList); + + + + //btnIDList.Add("btnUserOut");//注销 + foreach (ToolStripMenuItem menu in menuStrip1.Items) + { //一级菜单. + + //该模块下按钮总数 + int btnSum = menu.DropDownItems.Count; + if (btnSum == 0) + { + continue; + } + + //隐藏按钮数量 + int hideSum = 0; + + foreach (ToolStripDropDownItem subMenu in menu.DropDownItems) + { //一级菜单下的子菜单. + + //对权限不包含的按钮进行隐藏 + if (!btnIDList.Contains(subMenu.Name)) + { + subMenu.Visible = false; + hideSum++; + } + } + + //隐藏模块按钮 + if (btnSum == hideSum) + { + menu.Visible = false; + } + } + } + else + { + reader.GetMenuBtnFromPower(powerIDList); + } + + //显示登录人信息 + string loginInfo = "当前用户:" + login.UserName + " "; + if (ClientContext.produceShift != null) + { + loginInfo += "班次:" + ClientContext.produceShift.PRODUCESHIFTNAME + " "; + } + this.toolStripStatusLabel1.Text = loginInfo; + } + + private void MainForm_FormClosed(object sender, FormClosedEventArgs e) + { + Application.Exit(); + } + + private void btnInjectPut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionMoldingForm form = new InjectionMoldingForm(); + ClientContext.SetUserAuth(form); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectPrintForm_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectPasswordForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectPasswordForm form = new InjectPasswordForm(); + ClientContext.SetUserAuth(form); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectionCheck_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionCheckListForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionCheckListForm form = new InjectionCheckListForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + + private void btnInjectCodePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionMoldingPrintForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionMoldingPrintForm form = new InjectionMoldingPrintForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectEquipMaintain_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentMaintainForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentMaintainForm form = new EquipmentMaintainForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOperateStation_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OperationForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OperationForm form = new OperationForm(); + new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOperateEquipMaintain_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentMaintainForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentMaintainForm form = new EquipmentMaintainForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectPack_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductBundleForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductBundleForm form = new ProductBundleForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnEquipAlarm_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentAlarmForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentAlarmForm form = new EquipmentAlarmForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnFisInfoShow_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["FisM100ListForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + FisM100ListForm form = new FisM100ListForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnSPCMonitor_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["SPCControlForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SPCControlForm form = new SPCControlForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOpeInfoShow_Click(object sender, EventArgs e) + { + + //Form f = Application.OpenForms["MainOperationSearchForm"]; //查找是否打开过Form1窗体 + //if (f == null) //没打开过 + //{ + // MainOperationSearchForm form = new MainOperationSearchForm(); + // new KeyEvent().SetKeyToTxt(form); + // form.MdiParent = this; + // form.Show(); //重新new一个Show出来 + //} + //else + //{ + // f.WindowState = FormWindowState.Normal; + // f.Focus(); //打开过就让其获得焦点 + //} + } + + private void btnMendOperate_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["MendRecorderForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MendRecorderForm form = new MendRecorderForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OutWarehouseForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OutWarehouseForm form = new OutWarehouseForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnIn_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InWarehouseForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InWarehouseForm form = new InWarehouseForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + public void ThreadProc() + { + Application.Run(new LoginForm()); + } + + private void 注销ToolStripMenuItem_Click(object sender, EventArgs e) + { + if (MessageBox.Show(Resource1.LogOff, Resource1.ConfirmTitle, MessageBoxButtons.OKCancel) != DialogResult.OK) + return; + this.Close(); + System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc)); + t.Start(); + } + + + private void m135外购件注册ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductAddForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductAddForm form = new ProductAddForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void m181ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushPlanForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushPlanForm form = new SlushPlanForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiTakeOut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SendFinalForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SendFinalForm form = new SendFinalForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (MessageBox.Show("是否关闭窗口", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No) + e.Cancel = true; + } + + private void MainForm_Load(object sender, EventArgs e) + { + + LoadServerHost(); + var startup = Common.LocalSetting.Settings["StartUp", ""]; + if (!string.IsNullOrWhiteSpace(startup)) + { + var formtype = Type.GetType(startup); + if (formtype != null) + { + Form startupform = (Form)Activator.CreateInstance(formtype); + ClientContext.SetUserAuth(startupform); + if (startupform != null) + { + //ClientContext.SetUserAuth(((ToolStripMenuItem)sender).Name, startupform); + startupform.MdiParent = this; + startupform.WindowState = FormWindowState.Maximized; + startupform.Show(); + } + } + } + } + private void LoadServerHost() + { + Configuration cfg = ConfigurationManager.OpenExeConfiguration(""); + var clientSecion = cfg.GetSection("system.serviceModel/client") as ClientSection; + + tslServerHost.Text = "WCF服务器:" + GetEndointByName(clientSecion, "BasicHttpBinding_IGeneralService").Address.Host; + } + + private ChannelEndpointElement GetEndointByName(ClientSection section, string endpointname) + { + foreach (ChannelEndpointElement endpoint in section.Endpoints) + { + if (string.Equals(endpoint.Name, endpointname)) + { + return endpoint; + } + } + return null; + } + + private void PrintCodeToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["PrintForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + PrintForm form = new PrintForm(); + ClientContext.SetUserAuth(form); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void FrmPlace_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["FrmPlace"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + FrmPlace form = new FrmPlace(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void VedioToolStripMenuItem1_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MediaPlayerForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MediaPlayerForm form = new MediaPlayerForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void TypeToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["VideoTypeForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + VideoTypeForm form = new VideoTypeForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void AodonToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.mainForm = this; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + + //private void tsmiCallReason_Click(object sender, EventArgs e) + //{ + // Form f = Application.OpenForms["CallReasonForm"]; //查找是否打开过Form1窗体 + // if (f == null) //没打开过 + // { + // CallReasonForm form = new CallReasonForm(); + // form.MdiParent = this; + // form.WindowState = FormWindowState.Maximized; + // form.Show(); //重新new一个Show出来 + // } + // else + // { + // //先关闭 + // f.Close(); + // //重新打开 + // CallReasonForm form = new CallReasonForm(); + // form.MdiParent = this; + // form.WindowState = FormWindowState.Maximized; + // form.Show(); //重新new一个Show出来 + // } + //} + + private void EquipToolStripMenuItem1_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MachineCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MachineCheckForm form = new MachineCheckForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + MachineCheckForm form = new MachineCheckForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + + private void tsmiFISBreak_Click(object sender, EventArgs e) + { + + QMAPP.WinForm.Forms.PlanSearch.frmFISBreakConfirm form = new QMAPP.WinForm.Forms.PlanSearch.frmFISBreakConfirm(); + //form.MdiParent = this; + //form.WindowState = FormWindowState.Maximized; + form.ShowDialog(); //重新new一个Show出来 + + } + + private void timer1_Tick(object sender, EventArgs e) + { + QMAPP.ServicesAgent.ServiceAgent agent1 = ClientContext.GetServiceAgent(); + var shift = agent1.InvokeServiceFunction(B9BasicService.ProduceShiftBLL_GetWorkingShift.ToString(), ClientContext.MachineInfo != null ? ClientContext.MachineInfo.WORKCENTER_CODE : ""); + if (shift != null) + { + ClientContext.produceShift = shift; + } + //显示登录人信息 + string loginInfo = this.toolStripStatusLabel1.Text.Substring(0, this.toolStripStatusLabel1.Text.LastIndexOf(':') + 1); + if (ClientContext.produceShift != null) + { + loginInfo += ClientContext.produceShift.PRODUCESHIFTNAME + " "; + } + this.toolStripStatusLabel1.Text = loginInfo; + tsslblIps.Text = "本机IP:" + string.Join(",", System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).Where(p => p.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).Select(p => p.ToString())); + + if (ClientContext.OpcState > 0) + { + tsslblOPCStatus.Visible = true; + string statetext = ""; + switch (ClientContext.OpcState) + { + case 1: + { + statetext = "连接正常"; + break; + } + case 2: + { + statetext = "连接断开"; + break; + } + case 3: + { + statetext = "连接断开"; + break; + } + case 4: + { + statetext = "正在连接"; + break; + } + } + tsslblOPCStatus.Text = "OPC服务状态:" + statetext; + } + else + { + tsslblOPCStatus.Visible = false; + } + + } + + private void tsmiSetStartUp_Click(object sender, EventArgs e) + { + if (this.ActiveMdiChild != null) + { + Common.LocalSetting.Settings["StartUp"] = this.ActiveMdiChild.GetType().FullName; + MessageBox.Show(string.Format("已将\"{0}\"设置未启动页!\r\n当登录成功时将自动开启此界面。", this.ActiveMdiChild.Text)); + } + } + + private void toolStripMenuItem2_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductInForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductInForm form = new ProductInForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiPrintPlanlabel_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["PrintPlanLabel"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + PrintPlanLabel form = new PrintPlanLabel(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiInspectSkipping_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["frmInspectSkipping"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + frmInspectSkipping form = new frmInspectSkipping(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 替换操作ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ReplaceForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ReplaceForm form = new ReplaceForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 抽检操作ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductCheckForm form = new ProductCheckForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + + } + + private void 总成条码替换ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainCodeChangeForm form = new MainCodeChangeForm(); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiProductInfo_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductInfo"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + QMAPP.WinForm.Forms.Query.ProductInfo form = new Forms.Query.ProductInfo(); + form.WindowState = FormWindowState.Maximized; + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Maximized; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 投料平台ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectPlat"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectPlat form = new InjectPlat(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnvVWSinglePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingPrintForOldForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingPrintForOldForm form = new SlushMoldingPrintForOldForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + + } + + private void btnSlushCodePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingPrintForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingPrintForm form = new SlushMoldingPrintForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectPrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionCodePrint"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionCodePrint form = new InjectionCodePrint(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmDPAssmblyItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["DPAssemblyCodePrint"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + DPAssemblyCodePrintForm form = new DPAssemblyCodePrintForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiFoamingFeed_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["PouringMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + PouringMoldingForm form = new PouringMoldingForm(); + new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnSlushPut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingForm form = new SlushMoldingForm(); + ClientContext.SetUserAuth(form); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiDPShipment_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["DPShipment"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + DPShipment form = new DPShipment(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiUserManage_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ManageUserForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + Forms.Sys.ManageUserForm form = new QMAPP.WinForm.Forms.Sys.ManageUserForm(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiDefectRecording_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MendRecorderReasonForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MendRecorderReasonForm form = new QMAPP.WinForm.Forms.Mend.MendRecorderReasonForm(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + } +} diff --git a/.svn/pristine/17/1757931311b205e83a9bc07908b6e1fc59401b01.svn-base b/.svn/pristine/17/1757931311b205e83a9bc07908b6e1fc59401b01.svn-base new file mode 100644 index 0000000..80db98f Binary files /dev/null and b/.svn/pristine/17/1757931311b205e83a9bc07908b6e1fc59401b01.svn-base differ diff --git a/.svn/pristine/17/176ba11d1320bcb9025bd4952fa658091bf0cfcb.svn-base b/.svn/pristine/17/176ba11d1320bcb9025bd4952fa658091bf0cfcb.svn-base new file mode 100644 index 0000000..56ea0d6 --- /dev/null +++ b/.svn/pristine/17/176ba11d1320bcb9025bd4952fa658091bf0cfcb.svn-base @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; + +using QMFrameWork.Data; + +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.FJC.BLL.BZD +{ + /// + /// 模块名称:条码补打记录 + /// 作 者:张松男 + /// 编写日期:2021年05月21日 + /// + public class BarCodeReplacementBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BarCodeReplacement model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BarCodeReplacementDAL().Get(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + public BarCodeReplacement GetRecord(BarCodeReplacement model) + { + DataResult result = new DataResult(); + try + { + return new BarCodeReplacementDAL().GetRecord(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + + } + + } + + #endregion + + #region 获取列表(分页) + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BarCodeReplacement condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + //获取物料信息列表 + DataPage dataPage = new BarCodeReplacementDAL().GetList(condition, page); + + result.Result = dataPage; + } + catch (Exception ex) + { + result.IsSuccess = false; + throw ex; + } + result.IsSuccess = true; + return result; + + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BarCodeReplacement info) + { + + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CreateUser = this.LoginUser.UserName; + + BarCodeReplacementDAL cmdDAL = new BarCodeReplacementDAL(); + return new BarCodeReplacementDAL().Insert(info); + + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/18/18c9194f9b4a24332279d702719deae64253dc40.svn-base b/.svn/pristine/18/18c9194f9b4a24332279d702719deae64253dc40.svn-base new file mode 100644 index 0000000..8c08723 --- /dev/null +++ b/.svn/pristine/18/18c9194f9b4a24332279d702719deae64253dc40.svn-base @@ -0,0 +1,233 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {063B6316-7154-4BD9-B546-21CCE4685235} + Library + Properties + QMAPP.FJC.DAL + QMAPP.FJC.DAL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/1a/1ac9db4a5dac43cc61641aae4b314c1d01a2eefc.svn-base b/.svn/pristine/1a/1ac9db4a5dac43cc61641aae4b314c1d01a2eefc.svn-base new file mode 100644 index 0000000..bdcfa08 --- /dev/null +++ b/.svn/pristine/1a/1ac9db4a5dac43cc61641aae4b314c1d01a2eefc.svn-base @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMFrameWork.Common.Encrypt; +using QMFrameWork.Data; +using QMAPP.FJC.DAL.Operation; +using QMAPP.FJC.Entity.Operation; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.BLL.Basic; +using QMAPP.FJC.Entity; +using QMFrameWork.Log; +using QMAPP.FJC.DAL.Injection; +using QMAPP.FJC.Entity.Injection; +using System.Configuration; +using QMAPP.BLL.Sys; +using QMAPP.FJC.DAL.Basic; +using QMAPP.FJC.Entity.QT; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; +using PbomItem = QMAPP.FJC.Entity.Operation.PbomItem; + +namespace QMAPP.FJC.BLL.Operation +{ + /// + /// 模块编号:M13-1 + /// 作 用:零件条码表 + /// 作 者:王庆男 + /// 编写日期:2015年05月29日 + /// + public class PbomItemBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public List Get(string code) + { + try + { + return new PbomItemDAL().Get(code); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public Bom GetBom(string PbomCode) + { + try + { + return new PbomItemDAL().GetBom(PbomCode); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } +} + + + + + + diff --git a/.svn/pristine/1a/1ad4e19c6e65ab54c0ce0e593be1085d6b9f5fa3.svn-base b/.svn/pristine/1a/1ad4e19c6e65ab54c0ce0e593be1085d6b9f5fa3.svn-base new file mode 100644 index 0000000..46c2622 --- /dev/null +++ b/.svn/pristine/1a/1ad4e19c6e65ab54c0ce0e593be1085d6b9f5fa3.svn-base @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("QMAPP.WinForm")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("QMAPP.WinForm")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("c459ec4f-c1ba-448a-909a-e9c4fc023688")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 内部版本号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("2021.08.22.01")] +[assembly: AssemblyFileVersion("2021.08.22.01")] diff --git a/.svn/pristine/1b/1b3b534a8fa24b9ff78f8f081416ff03aed14dc2.svn-base b/.svn/pristine/1b/1b3b534a8fa24b9ff78f8f081416ff03aed14dc2.svn-base new file mode 100644 index 0000000..c7ef21b --- /dev/null +++ b/.svn/pristine/1b/1b3b534a8fa24b9ff78f8f081416ff03aed14dc2.svn-base @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_BUCKETINFO")] + public class BucketInfo : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 编号 + /// + [Description("编号")] + [DBColumn(ColumnName = "BucketCode", DataType = DbType.String)] + public string BucketCode { get; set; } + + /// + /// 名称 + /// + [Description("名称")] + [DBColumn(ColumnName = "BucketName", DataType = DbType.String)] + public string BucketName { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/1b/1bb233204781a553e6a88a9807677a6d3677f590.svn-base b/.svn/pristine/1b/1bb233204781a553e6a88a9807677a6d3677f590.svn-base new file mode 100644 index 0000000..08b0beb --- /dev/null +++ b/.svn/pristine/1b/1bb233204781a553e6a88a9807677a6d3677f590.svn-base @@ -0,0 +1,3536 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + //private string _cfgAutoProduct = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + private string _371BiaoPiBarCodeRegex = string.Empty; //表皮码 + private string _316BiaoPiBarCodeRegex = string.Empty; //表皮码 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = GetAppConfigValue("AutoInput条码正则表达式"); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + _371BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则371"]; + _316BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则316"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //if(string.IsNullOrEmpty(_cfgAutoProduct)) + // _cfgAutoProduct = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE) && result.Success) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + else + { + if ((System.Text.RegularExpressions.Regex.IsMatch(productCode, _371BiaoPiBarCodeRegex) || System.Text.RegularExpressions.Regex.IsMatch(productCode, _316BiaoPiBarCodeRegex)) + && processMainCode != productCode) + { + processMainCode = productCode; + } + } + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是过程主码 + { + if (!string.IsNullOrEmpty(result.WorkOrderID)) + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr })) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() + { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + //else + //{ + // this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + // this.lblError.ForeColor = Color.Black; + // MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + //} + } + else + { + this.lblError.Text = "result.WorkOrderID为空,未进行后续填充!"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"result.WorkOrderID为空,未进行后续填充!"); + } + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _bentiBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); + if (filterList.Count > 0) + { + string PBOM_CODE = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), PBOM_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + } + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr || "IP_ASSEMBLING,GWASSEMBLE_VW371PA".Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码失败!缺少list[3];planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码异常!list=null;planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + if (record == null) + { + //record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_Get316Record.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + //var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetMaterial.ToString(), new BZDConfig() { MATERIALCODDE = record.MPID }); + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + else + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/1b/1bce5dfb2e2712970ffce0de4368a19d45b320dd.svn-base b/.svn/pristine/1b/1bce5dfb2e2712970ffce0de4368a19d45b320dd.svn-base new file mode 100644 index 0000000..3f79bf1 --- /dev/null +++ b/.svn/pristine/1b/1bce5dfb2e2712970ffce0de4368a19d45b320dd.svn-base @@ -0,0 +1,91 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + + + + + + + +
+ <%=Html.QV(p => p.ProductCode)%> + + <%=Html.QC(p => p.ProductCode)%> + + <%=Html.QV(p => p.PartCode)%> + + <%=Html.QC(p => p.PartCode)%> + + <%=Html.QV(p => p.BeginTime)%> + + <%=Html.QC(p => p.BeginTime)%> + + <%=Html.QV(p => p.EndTime)%> + + <%=Html.QC(p => p.EndTime)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("BucketMaterial", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%--<%=Html.QTButtonAdd("BucketMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("BucketMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("BucketMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%> +
+
diff --git a/.svn/pristine/1c/1c1cd264369bf02466f2e467c76e486c42dca745.svn-base b/.svn/pristine/1c/1c1cd264369bf02466f2e467c76e486c42dca745.svn-base new file mode 100644 index 0000000..45158da --- /dev/null +++ b/.svn/pristine/1c/1c1cd264369bf02466f2e467c76e486c42dca745.svn-base @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using QMFrameWork.Data; +using QMAPP.Entity; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.DAL; +using QMFrameWork.Log; +using QMAPP.FJC.Entity.Stocktaking; + +namespace QMAPP.FJC.DAL.Operation +{ + /// + /// 模块名称:Bom详细信息 + /// 作 者:张松男 + /// 编写日期:2021年03月17日 + /// + public class PbomItemDAL : BaseDAL + { + + /// + /// 获取全部规则 + /// + /// + public List Get(string MATERIAL_CODE) + { + try + { + string sql = $"SELECT * FROM [T_MD_PBOM_ITEM] where MATERIAL_CODE = '{MATERIAL_CODE}'"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取全部规则 + /// + /// + public Bom GetBom(string PbomCode) + { + try + { + string sql = $"SELECT PID,PBOM_CODE,MATERIAL_CODE FROM [T_MD_PBOM] where PBOM_CODE = '{PbomCode}'"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql, parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + + } + +} diff --git a/.svn/pristine/1c/1c442b23566d9bf45426d0c979b5ab12f6c41b0e.svn-base b/.svn/pristine/1c/1c442b23566d9bf45426d0c979b5ab12f6c41b0e.svn-base new file mode 100644 index 0000000..5db403a --- /dev/null +++ b/.svn/pristine/1c/1c442b23566d9bf45426d0c979b5ab12f6c41b0e.svn-base @@ -0,0 +1,80 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + + + + +
+ <%=Html.QV(p => p.ProductCode)%> + + <%=Html.QC(p => p.ProductCode)%> + + <%=Html.QV(p => p.MATERIAL_CODE)%> + + <%=Html.QC(p => p.MATERIAL_CODE)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("TSWeighRecore", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%--<%=Html.QTButtonAdd("BucketMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("BucketMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("BucketMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%>--%> +
+
diff --git a/.svn/pristine/1e/1e663ed887ee9bb94cead7ff6347a505d73ba7af.svn-base b/.svn/pristine/1e/1e663ed887ee9bb94cead7ff6347a505d73ba7af.svn-base new file mode 100644 index 0000000..8687e12 --- /dev/null +++ b/.svn/pristine/1e/1e663ed887ee9bb94cead7ff6347a505d73ba7af.svn-base @@ -0,0 +1,62 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + +
+ <%=Html.QV(p=>p.BucketCode) %> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QV(p => p.BucketName)%> + + <%=Html.QC(p => p.BucketName)%> +
+
+ <%=Html.HiddenFor(p=>p.PID) %> + <%=Html.HiddenFor(p => p.IsCheck)%> + <%=Html.HiddenFor(p=>p.CREATEDATE) %> + <%=Html.HiddenFor(p=>p.CREATEUSER) %> + <%=Html.HiddenFor(p=>p.UPDATEDATE)%> + <%=Html.HiddenFor(p=>p.UPDATEUSER) %> + <%=Html.QPEnd() %> +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "BucketInfo", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/20/20e7e813245abed1e2b85f7597f7d95db977e355.svn-base b/.svn/pristine/20/20e7e813245abed1e2b85f7597f7d95db977e355.svn-base new file mode 100644 index 0000000..6eff401 --- /dev/null +++ b/.svn/pristine/20/20e7e813245abed1e2b85f7597f7d95db977e355.svn-base @@ -0,0 +1,497 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMAPP.DAL; +using QMAPP.FJC.Entity.Common.Constants; +using QMAPP.FJC.Entity.CompleteStatistics; +using QMFrameWork.Data; + +namespace QMAPP.FJC.DAL.CompleteStatistics +{ + public class CompleteStatisticsDAL : BaseDAL + { + public DataPage GetList(CompleteStatisticsEntity condition, DataPage page) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(condition, out parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + page.SortExpression = "ORDERNO ASC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) { + page = session.GetDataPage(sql, parameters, page); + } + return page; + + } + + public List GetList(CompleteStatisticsEntity condition) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(condition, out parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters).ToList(); + } + } + + public CompleteStatisticsEntity Get(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Get(model); + } + } + + public int Insert(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Insert(model); + } + } + + public bool ExistCompleteStatistics(CompleteStatisticsEntity model) + { + throw new NotImplementedException(); + } + + protected string ExistQureySql() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT *"); + sql.AppendLine(" FROM T_AW_MAINOPERATION T"); + sql.AppendLine(" WHERE INFO.BARCODEIDENTIFY IS NOT NULL"); + sql.AppendLine(" AND T.OPERATEDDATE > @StartTime"); + sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime"); + return sql.ToString(); + } + + public int Update(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Update(model); + } + } + + public int GenericCompleteStatistics(DateTime starTime, DateTime endTime) + { + int count; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + + DataParameter[] parameters = { + new DataParameter {ParameterName = "StartTime", DataType = DbType.DateTime, Value = starTime}, + new DataParameter {ParameterName = "EndTime", DataType = DbType.DateTime, Value = endTime} + }; + try { + session.OpenTs(); + //string location = this.GetSystemConfig(CompleteStatisticsConstants.COMP_STATIS_SITE).CODEVALUE; + //string sql = location.Equals("080121") ? this.GetGenericStatisticsSqlForCC() : this.GetGenericStatisticsSqlForCD(); + //成品 + string sql = GetGenericStatisticsSqlForBORA(); + count = session.ExecuteSql(sql, parameters); + //注塑件 + sql = GetGenericStatisticsSqlForINJECT(); + count += session.ExecuteSql(sql, parameters); + + + this.UpdateLastGenericTime(endTime, session); + session.CommitTs(); + } + catch (Exception) { + session.RollbackTs(); + throw; + } + } + return count; + } + + public SystemConfig GetSystemConfig(string codeType) + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT *"); + sql.AppendLine(" FROM T_SYSTEM_CONFIG"); + sql.AppendLine(" WHERE CODETYPE = @CodeType"); + DataParameter[] parameters = { + new DataParameter {ParameterName = "CodeType", DataType = DbType.String, Value = codeType} + }; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters); + } + } + + protected int UpdateLastGenericTime(DateTime endTime, IDataSession session) + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("UPDATE T_SYSTEM_CONFIG"); + sql.AppendLine(" SET CODEVALUE = @EndTime"); + sql.AppendLine(" WHERE CODETYPE = @CodeType"); + DataParameter[] parameters = + { + new DataParameter {ParameterName = "EndTime", DataType = DbType.String, Value = endTime.ToString("yyyy/MM/dd HH:mm:ss")}, + new DataParameter {ParameterName = "CodeType", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_LSTTIME} + }; + return session.ExecuteSql(sql.ToString(), parameters); + } + /// + /// 成都工厂适用SQL + /// + /// + protected string GetGenericStatisticsSqlForCD() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("INSERT INTO T_AW_COMPLETE_STATISTICS"); + sql.AppendLine("SELECT NEWID(),"); + sql.AppendLine(" REPLACE(T.CUSTOMERSPAREPARTS, ' ', '') AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" CNFG.CODEVALUE + "); + sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) +"); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY T.CUSTOMERSPAREPARTS))) + CAST (ROW_NUMBER() OVER (ORDER BY T.CUSTOMERSPAREPARTS) AS VARCHAR) AS ORDERNO,"); + sql.AppendLine(" GETDATE() AS CREATETIME,"); + sql.AppendLine(" USR.USERID AS CREATEUSER,"); + sql.AppendLine(" GETDATE() AS UPDATETIME,"); + sql.AppendLine(" USR.USERID AS UPDATEUSER,"); + sql.AppendLine(" '0' AS DELFLAG"); + sql.AppendLine(" FROM T_DAS_BARCODEVIBPAR T"); + sql.AppendLine(" LEFT JOIN T_QM_USER USR"); + sql.AppendLine(" ON USR.USERID = 'SYSTEM'"); + sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG"); + sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER'"); + sql.AppendLine(" WHERE T.SCANTIME > @StartTime"); + sql.AppendLine(" AND T.SCANTIME <= @EndTime"); + sql.AppendLine(" AND SUBSTRING(T.ABARCODE, 9, 2) <> '99'"); + sql.AppendLine(" GROUP BY T.CUSTOMERSPAREPARTS, USR.USERID, CNFG.CODEVALUE"); + return sql.ToString(); + } + //长春 + protected string GetGenericStatisticsSqlForCC() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("INSERT INTO T_AW_COMPLETE_STATISTICS"); + sql.AppendLine("SELECT NEWID(),"); + sql.AppendLine(" INFO.MATERIALNO AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" CNFG.CODEVALUE + "); + sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) +"); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY INFO.MATERIALNO))) + CAST (ROW_NUMBER() OVER (ORDER BY INFO.MATERIALNO) AS VARCHAR) AS ORDERNO,"); + sql.AppendLine(" GETDATE() AS CREATETIME,"); + sql.AppendLine(" USR.USERID AS CREATEUSER,"); + sql.AppendLine(" GETDATE() AS UPDATETIME,"); + sql.AppendLine(" USR.USERID AS UPDATEUSER,"); + sql.AppendLine(" '0' AS DELFLAG"); + sql.AppendLine(" FROM T_AW_MAINOPERATION T"); + sql.AppendLine(" LEFT JOIN T_BD_BARCODE_PRODUCT_RELATION RELATION"); + sql.AppendLine(" ON T.PRODUCTTYPE = RELATION.PRODUCTTYPE"); + sql.AppendLine(" AND T.PROCESSTYPE = RELATION.PROCESSTYPE"); + sql.AppendLine(" LEFT JOIN T_BD_MATERIAL_BARCODE_INFO INFO"); + sql.AppendLine(" ON INFO.PROCESSTYPE = RELATION.PROCESSTYPE"); + sql.AppendLine(" AND INFO.PRODUCTTYPE = RELATION.PRODUCTTYPE"); + sql.AppendLine(" AND SUBSTRING(T.PRODUCTCODE, RELATION.STARTINDEX, RELATION.SUBLENGTH) = INFO.BARCODEIDENTIFY"); + sql.AppendLine(" LEFT JOIN T_QM_USER USR"); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM'"); + sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG"); + sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER'"); + sql.AppendLine(" WHERE INFO.BARCODEIDENTIFY IS NOT NULL"); + sql.AppendLine(" AND T.OPERATEDDATE > @StartTime"); + sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime"); + sql.AppendLine(" GROUP BY INFO.MATERIALNO, USR.USERID, CNFG.CODEVALUE"); + return sql.ToString(); + } + //青岛仪表板/门板的成品 + //protected string GetGenericStatisticsSqlForBORA() + //{ + // StringBuilder sql = new StringBuilder(); + // sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + // sql.AppendLine(" SELECT NEWID(), "); + // sql.AppendLine(" T.MATERIAL_CODE AS MATERIALNO, "); + // sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT, "); + // sql.AppendLine(" COUNT(*) AS COMPLETECOUNT, "); + // sql.AppendLine(" @StartTime AS STARTTIME, "); + // sql.AppendLine(" @EndTime AS ENDTIME, "); + // sql.AppendLine(" CNFG.CODEVALUE + "); + // sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) + "); + // sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + // sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY T.MATERIAL_CODE))) + CAST (ROW_NUMBER() OVER (ORDER BY T.MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + // sql.AppendLine(" GETDATE() AS CREATETIME, "); + // sql.AppendLine(" USR.USERID AS CREATEUSER, "); + // sql.AppendLine(" GETDATE() AS UPDATETIME, "); + // sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + // sql.AppendLine(" '0' AS DELFLAG "); + // sql.AppendLine(" FROM T_AW_MAINOPERATION T "); + // sql.AppendLine(" LEFT JOIN T_MD_MATERIAL_CLASS C ON C.MATERIAL_TYPE_CODE=T.MATERIAL_TYPE_CODE "); + // sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + // sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG "); + // sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER' "); + // sql.AppendLine(" WHERE T.OPERATEDDATE > @StartTime "); + // sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime "); + // sql.AppendLine(" AND C.MATERIAL_ATTRIBUTE='2' "); + // sql.AppendLine(" GROUP BY T.MATERIAL_CODE, USR.USERID, CNFG.CODEVALUE "); + // return sql.ToString(); + //} + //青岛注塑件 + protected string GetGenericStatisticsSqlForBORA() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + sql.AppendLine(" SELECT NEWID(),"); + sql.AppendLine(" C.MFG_MATERIAL_CODE AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" C.ORDERIDENTITY + "); + sql.AppendLine(" REPLACE(substring(CONVERT(VARCHAR(100), GETDATE(), 112),3,6) + "); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE))) + CAST (ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + sql.AppendLine(" GETDATE() AS CREATETIME, "); + sql.AppendLine(" USR.USERID AS CREATEUSER, "); + sql.AppendLine(" GETDATE() AS UPDATETIME, "); + sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + sql.AppendLine(" '0' AS DELFLAG "); + sql.AppendLine(" FROM T_AW_PRODUCT T "); + sql.AppendLine(" LEFT JOIN T_MD_MATERIAL_CLASS S ON S.MATERIAL_TYPE_CODE=T.MATERIAL_TYPE "); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C ON C.MES_MATERIAL_CODE = T.MATERIAL_CODE "); + sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + sql.AppendLine(" WHERE S.MATERIAL_ATTRIBUTE='2' "); + sql.AppendLine(" AND C.MFG_MATERIAL_CODE IS NOT NULL "); + sql.AppendLine(" AND T.CREATEDATE > @StartTime "); + sql.AppendLine(" AND T.CREATEDATE <= @EndTime "); + sql.AppendLine(" AND T.MACHINECODDE IS NOT NULL "); + sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY "); + return sql.ToString(); + } + protected string GetGenericStatisticsSqlForINJECT() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + sql.AppendLine(" SELECT NEWID(), "); + sql.AppendLine(" C.MFG_MATERIAL_CODE AS MATERIALNO, "); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT, "); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT, "); + sql.AppendLine(" @StartTime AS STARTTIME, "); + sql.AppendLine(" @EndTime AS ENDTIME, "); + sql.AppendLine(" C.ORDERIDENTITY + "); + sql.AppendLine(" REPLACE(substring(CONVERT(VARCHAR(100), GETDATE(), 112),3,6) + "); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE))) + "); + sql.AppendLine(" CAST (ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + sql.AppendLine(" GETDATE() AS CREATETIME, "); + sql.AppendLine(" USR.USERID AS CREATEUSER, "); + sql.AppendLine(" GETDATE() AS UPDATETIME, "); + sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + sql.AppendLine(" '0' AS DELFLAG "); + sql.AppendLine(" FROM T_TM_MonitorCode T "); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C "); + sql.AppendLine(" ON C.MES_MATERIAL_CODE = T.MATERIAL_CODE "); + sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + sql.AppendLine(" WHERE T.CurrentMode='3' "); + sql.AppendLine(" AND C.MFG_MATERIAL_CODE IS NOT NULL "); + sql.AppendLine(" AND T.CREATEDATE > @StartTime "); + sql.AppendLine(" AND T.CREATEDATE <= @EndTime "); + sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY "); + return sql.ToString(); + } + protected string GetQuerySql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT T.PID, "); + sql.AppendLine(" T.MATERIALNO, "); + sql.AppendLine(" MAT.MATERIALNAME, "); + sql.AppendLine(" MAT.PRODUCTLINE, "); + sql.AppendLine(" T.SYSCOMPLETECOUNT,"); + sql.AppendLine(" T.COMPLETECOUNT,"); + sql.AppendLine(" T.STARTTIME, "); + sql.AppendLine(" T.ENDTIME, "); + sql.AppendLine(" T.ORDERNO, "); + sql.AppendLine(" T.CREATETIME,"); + sql.AppendLine(" T.CREATEUSER,"); + sql.AppendLine(" T.UPDATETIME,"); + sql.AppendLine(" T.UPDATEUSER,"); + sql.AppendLine(" T.DELFLAG,"); + sql.AppendLine(" CUSER.USERNAME AS CREATEUSER_DISPLAY,"); + sql.AppendLine(" UUSER.USERNAME AS UPDATEUSER_DISPLAY"); + sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + sql.AppendLine(" LEFT JOIN T_QM_USER CUSER"); + sql.AppendLine(" ON T.CREATEUSER = CUSER.USERID"); + sql.AppendLine(" LEFT JOIN T_QM_USER UUSER"); + sql.AppendLine(" ON T.UPDATEUSER = UUSER.USERID"); + sql.AppendLine(" INNER JOIN T_BD_MATERIAL_BARCODE_INFO MAT"); + sql.AppendLine(" ON T.MATERIALNO = MAT.MATERIALNO"); + sql.AppendLine(" WHERE 1 = 1"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.EENDTIME) }); + } + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + public List GetExportData(CompleteStatisticsEntity model, IDataSession session) + { + DataParameter[] parameters; + string sql = this.GetExportSql(model, out parameters); + DataParameter[] unableParameters; + string unableSql = this.unableExportDataString(model, out unableParameters); + + List rtn = session.GetList(sql, parameters).ToList(); + session.ExecuteSql(unableSql, unableParameters); + return rtn; + } + + private string unableExportDataString(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("UPDATE T_AW_COMPLETE_STATISTICS"); + sql.AppendLine(" SET DELFLAG = '1'"); + sql.AppendLine(" WHERE DELFLAG = '0'"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.EENDTIME) }); + } + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + //protected string GetExportSql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + //{ + // List parametersList = new List(); + // StringBuilder sql = new StringBuilder(); + // sql.AppendLine("SELECT EM.CODEVALUE AS EMPLOYEE, "); + // sql.AppendLine(" SI.CODEVALUE AS SITE, "); + // sql.AppendLine(" '' AS SHIFT, "); + // sql.AppendLine(" T.MATERIALNO, "); + // sql.AppendLine(" MAT.PRODUCTLINE, "); + // sql.AppendLine(" '' AS EDIMAT, "); + // sql.AppendLine(" '' AS SERIAL, "); + // sql.AppendLine(" USR.CODEVALUE AS USERID, "); + // sql.AppendLine(" T.ORDERNO, "); + // sql.AppendLine(" T.COMPLETECOUNT,"); + // sql.AppendLine(" T.STARTTIME"); + // sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + // sql.AppendLine(" INNER JOIN T_BD_MATERIAL_BARCODE_INFO MAT"); + // sql.AppendLine(" ON T.MATERIALNO = MAT.MATERIALNO"); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG EM"); + // sql.AppendLine(" ON EM.CODETYPE = @Employee"); + // parametersList.Add(new DataParameter { ParameterName = "Employee", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_EMPLOYEE }); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG SI"); + // sql.AppendLine(" ON SI.CODETYPE = @Site"); + // parametersList.Add(new DataParameter { ParameterName = "Site", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_SITE }); + + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG USR"); + // sql.AppendLine(" ON USR.CODETYPE = @UserId"); + // parametersList.Add(new DataParameter { ParameterName = "UserId", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_USER }); + + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG ORD"); + // sql.AppendLine(" ON ORD.CODETYPE = @OrderNo"); + // parametersList.Add(new DataParameter { ParameterName = "OrderNo", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_ORDER }); + + // sql.AppendLine(" WHERE T.DELFLAG = '0'"); + // if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + // { + // sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + // parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + // } + // if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + // { + // sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + // parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + // } + // if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + // { + // sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + // parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = string.Format("{0}", condition.EENDTIME) }); + // } + // sql.AppendLine(" ORDER BY T.ORDERNO ASC"); + + // parameters = parametersList.ToArray(); + // return sql.ToString(); + //} + protected string GetExportSql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT C.MFG_USERCODE AS EMPLOYEE, "); + sql.AppendLine(" C.MFG_LOCATIONCODE AS SITE, "); + sql.AppendLine(" '' AS SHIFT, "); + sql.AppendLine(" T.MATERIALNO, "); + sql.AppendLine(" C.PRODUCELINECODE AS PRODUCTLINE, "); + sql.AppendLine(" '' AS EDIMAT, "); + sql.AppendLine(" '' AS SERIAL, "); + sql.AppendLine(" C.USERID, "); + sql.AppendLine(" T.ORDERNO, "); + sql.AppendLine(" T.COMPLETECOUNT,"); + sql.AppendLine(" T.STARTTIME,"); + sql.AppendLine(" T.ENDTIME"); + sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C"); + sql.AppendLine(" ON T.MATERIALNO = C.MFG_MATERIAL_CODE"); + + sql.AppendLine(" WHERE T.DELFLAG = '0'"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = string.Format("{0}", condition.EENDTIME) }); + } + sql.AppendLine(" ORDER BY T.ORDERNO ASC"); + + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + public DataTable ExportExcelData(CompleteStatisticsEntity model) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(model, out parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetTable(sql, parameters); + } + } + } +} diff --git a/.svn/pristine/21/21b8ac8caa1522c98c80eeeb8469d1ddefa08bae.svn-base b/.svn/pristine/21/21b8ac8caa1522c98c80eeeb8469d1ddefa08bae.svn-base new file mode 100644 index 0000000..3755998 --- /dev/null +++ b/.svn/pristine/21/21b8ac8caa1522c98c80eeeb8469d1ddefa08bae.svn-base @@ -0,0 +1,3421 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["AutoInput条码正则表达式"]?.Trim(); + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + ispass = true; + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex))//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.MATERIAL_CODE)).ToList(); + if (filterList.Count > 0) + { + string bomCode = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabe(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + + #region 总成装配打印 + + rePrintBzd.barcode = main.MAINCODE; + rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + rePrintBzd.color = mcinit.COLOR; + + try + { + Report = new GridppReport(); + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + } + + + //新增 + private BZD rePrintBzd = new BZD(); + + private void ReadFetchRecordBox2() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// + public void Print052QRCODE() + { + try + { + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["PBOM_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + #endregion + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + if (record != null) + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/22/2285338eb67bbbf5a975dbae8c556d04b2c0c86a.svn-base b/.svn/pristine/22/2285338eb67bbbf5a975dbae8c556d04b2c0c86a.svn-base new file mode 100644 index 0000000..b34c8f1 --- /dev/null +++ b/.svn/pristine/22/2285338eb67bbbf5a975dbae8c556d04b2c0c86a.svn-base @@ -0,0 +1,96 @@ +namespace QMAPP.WinForm +{ + partial class FormSplash + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSplash)); + this.lbClose = new System.Windows.Forms.LinkLabel(); + this.lblLog = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // lbClose + // + this.lbClose.ActiveLinkColor = System.Drawing.Color.White; + this.lbClose.AutoSize = true; + this.lbClose.BackColor = System.Drawing.Color.Transparent; + this.lbClose.Font = new System.Drawing.Font("宋体", 16F); + this.lbClose.ForeColor = System.Drawing.Color.White; + this.lbClose.LinkColor = System.Drawing.Color.White; + this.lbClose.Location = new System.Drawing.Point(463, 292); + this.lbClose.Name = "lbClose"; + this.lbClose.Size = new System.Drawing.Size(54, 22); + this.lbClose.TabIndex = 0; + this.lbClose.TabStop = true; + this.lbClose.Text = "关闭"; + this.lbClose.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lbClose_LinkClicked); + // + // lblLog + // + this.lblLog.BackColor = System.Drawing.Color.Transparent; + this.lblLog.Font = new System.Drawing.Font("宋体", 16F); + this.lblLog.ForeColor = System.Drawing.Color.White; + this.lblLog.Location = new System.Drawing.Point(12, 292); + this.lblLog.Margin = new System.Windows.Forms.Padding(3); + this.lblLog.Name = "lblLog"; + this.lblLog.Size = new System.Drawing.Size(327, 23); + this.lblLog.TabIndex = 2; + this.lblLog.Text = "1234567890"; + // + // FormSplash + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Gray; + this.BackgroundImage = global::QMAPP.WinForm.Resource1.splash; + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.ClientSize = new System.Drawing.Size(524, 318); + this.ControlBox = false; + this.Controls.Add(this.lblLog); + this.Controls.Add(this.lbClose); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormSplash"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Load += new System.EventHandler(this.FormLogin_Load); + this.Shown += new System.EventHandler(this.FormSplash_Shown); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.LinkLabel lbClose; + private System.Windows.Forms.Label lblLog; + } +} \ No newline at end of file diff --git a/.svn/pristine/22/22f78adbc38ff94001b612793c98581649469615.svn-base b/.svn/pristine/22/22f78adbc38ff94001b612793c98581649469615.svn-base new file mode 100644 index 0000000..ea0c6f4 --- /dev/null +++ b/.svn/pristine/22/22f78adbc38ff94001b612793c98581649469615.svn-base @@ -0,0 +1,99 @@ +namespace QMAPP.WinForm +{ + partial class FormFoundUpdate + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.btnCancel = new System.Windows.Forms.Button(); + this.txtDesc = new System.Windows.Forms.TextBox(); + this.btnOk = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(7, 243); + this.btnCancel.Margin = new System.Windows.Forms.Padding(2); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(60, 30); + this.btnCancel.TabIndex = 6; + this.btnCancel.Text = "取消"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // txtDesc + // + this.txtDesc.Dock = System.Windows.Forms.DockStyle.Top; + this.txtDesc.Location = new System.Drawing.Point(5, 5); + this.txtDesc.Margin = new System.Windows.Forms.Padding(5); + this.txtDesc.Multiline = true; + this.txtDesc.Name = "txtDesc"; + this.txtDesc.ReadOnly = true; + this.txtDesc.Size = new System.Drawing.Size(596, 231); + this.txtDesc.TabIndex = 8; + // + // btnOk + // + this.btnOk.Location = new System.Drawing.Point(535, 243); + this.btnOk.Margin = new System.Windows.Forms.Padding(2); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(60, 30); + this.btnOk.TabIndex = 9; + this.btnOk.Text = "确定"; + this.btnOk.UseVisualStyleBackColor = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // FormFoundUpdate + // + this.AcceptButton = this.btnOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(606, 284); + this.Controls.Add(this.btnOk); + this.Controls.Add(this.txtDesc); + this.Controls.Add(this.btnCancel); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "FormFoundUpdate"; + this.Padding = new System.Windows.Forms.Padding(5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "自动更新"; + this.Load += new System.EventHandler(this.FormAutoUpdate_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.TextBox txtDesc; + private System.Windows.Forms.Button btnOk; + } +} + diff --git a/.svn/pristine/23/23900feb38316a144f315a25b085975abc5aea76.svn-base b/.svn/pristine/23/23900feb38316a144f315a25b085975abc5aea76.svn-base new file mode 100644 index 0000000..f0c412d --- /dev/null +++ b/.svn/pristine/23/23900feb38316a144f315a25b085975abc5aea76.svn-base @@ -0,0 +1,2288 @@ + + + + + <_PublishTargetUrl>C:\Users\Administrator\Desktop\发布\CDMES\APPWeb + + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:18:55 + + + 05/24/2021 10:16:21 + + + 02/26/2021 09:31:12 + + + 05/24/2021 10:16:21 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:46 + + + 07/19/2012 10:59:52 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:20 + + + 05/26/2021 10:49:20 + + + 05/24/2021 10:16:23 + + + 05/24/2021 10:16:23 + + + 05/24/2021 10:16:21 + + + 05/24/2021 10:16:21 + + + 05/26/2021 10:49:21 + + + 02/26/2021 09:19:26 + + + 05/26/2021 10:49:21 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:17 + + + 05/26/2021 10:49:17 + + + 05/26/2021 10:49:23 + + + 05/26/2021 10:49:23 + + + 05/26/2021 10:49:21 + + + 05/26/2021 10:49:21 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:19 + + + 05/26/2021 10:49:18 + + + 05/26/2021 10:49:18 + + + 05/26/2021 10:49:20 + + + 03/19/2021 09:13:40 + + + 05/26/2021 10:49:20 + + + 05/26/2021 10:45:41 + + + 05/26/2021 10:45:41 + + + 05/26/2021 10:49:17 + + + 02/26/2021 09:27:17 + + + 05/26/2021 10:49:17 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/01/2012 09:06:22 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 05/25/2021 15:34:18 + + + 02/26/2021 09:20:37 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 05/25/2021 15:10:43 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/24/2021 21:46:03 + + + 05/24/2021 21:41:10 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 03/22/2021 10:06:47 + + + \ No newline at end of file diff --git a/.svn/pristine/23/23ef7fc68674f0ec76670b670e9babdec19bcd36.svn-base b/.svn/pristine/23/23ef7fc68674f0ec76670b670e9babdec19bcd36.svn-base new file mode 100644 index 0000000..c012a70 --- /dev/null +++ b/.svn/pristine/23/23ef7fc68674f0ec76670b670e9babdec19bcd36.svn-base @@ -0,0 +1,582 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMAPP.BLL; +using QMFrameWork.Data; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.DAL.Operation; +using QMAPP.Entity; +using QMAPP.FJC.DAL.ProductIn; +using QMAPP.FJC.Entity; +using QMFrameWork.Log; +using QMAPP.FJC.DAL.ProductionPlan; +using QMAPP.FJC.Entity.ProductionPlan; +using System.Text.RegularExpressions; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; + +namespace QMAPP.FJC.BLL.Operation +{ + public class MainCodeChangeBLL : BaseBLL + { + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(MainCodeChange condition, DataPage page) + { + try + { + page = new MainCodeChangeDAL().GetList(condition, page); + + List list = page.Result as List; + page.Result = list; + + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取列表web + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetListWeb(MainCodeChange condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + //获取信息列表 + page = new MainCodeChangeDAL().GetList(condition, page); + + #region 转换状态显示类型 + //List fisOrderList = page.Result as List; + ////处理字典信息 + //DictManageBLL dictSCANSTATE = new DictManageBLL(DictKind.SCANSTATE); + + //foreach (var info in fisOrderList) + //{ + // info.SCANSTATE = dictSCANSTATE.GetDictValue(info.SCANSTATE); + //} + #endregion + + result.Result = page; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "成品信息逻辑层-获取列表!" + }); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(MainCodeChange model) + { + try + { + //基本信息 + model.PID = Guid.NewGuid().ToString(); + model.CREATEUSER = this.LoginUser.UserID; + model.CREATEDATE = DateTime.Now; + MainDAL cmdDAL = new MainDAL(); + if (ExistsMain(model) == true) + return -1; + return new MainCodeChangeDAL().Insert(model); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool ExistsMain(MainCodeChange model) + { + try + { + return new MainCodeChangeDAL().ExistsMain(model); + } + catch (Exception ex) + { + throw ex; + } + } + + + #endregion + + #region 获取生成新的Maincode + /// + /// 获取生成新的Maincode + /// + /// + public DataResult Generate(string materialCode) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + DataResult result = new DataResult(); + DAL.Operation.MainDAL maindal = new DAL.Operation.MainDAL(); + maindal.BaseSession = session; + PrintCode condition = maindal.GetMaxMainCode(materialCode); + + string newcode = "1"; + if (!string.IsNullOrEmpty(condition.MAINCODE)) + { + string mainCode = (Convert.ToInt32(condition.MAINCODE.Substring(1, 6))).ToString(); + newcode = (Convert.ToInt32(mainCode) + 1) + ""; + } + newcode = "052 4XR" + condition.MAINCODE.Substring(0, 1) + newcode.PadLeft(6, '0'); + result.Result = newcode + CalculateChecksum(newcode); + + PrintCode pc = new PrintCode(); + pc.PID = condition.PID; + pc.MAINCODE = result.Result; + pc.PRODUCTCODE = condition.PRODUCTCODE; + pc.ISCOMPLETE = 0; + pc.CREATETIME = System.DateTime.Now; + DAL.Operation.PrintCodeDAL dal = new DAL.Operation.PrintCodeDAL(); + dal.BaseSession = session; + dal.UpdateForChangeCode(pc); + + session.CommitTs(); + return result; + } + catch (Exception ex) + { + session.RollbackTs(); + return new DataResult { IsSuccess = false, Ex = ex, Msg = ex.Message }; + } + } + } + /// + /// 计算验证码 + /// + /// + public static string CalculateChecksum(string barcode) + { + string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"; + int sum = 0; + foreach (var c in barcode) + { + sum += chars.IndexOf(c); + } + int rem = sum % chars.Length; + return chars[rem].ToString(); + } + #endregion + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataResult GetExportData(MainCodeChange model) + { + DataResult result = new DataResult(); + try + { + result.IsSuccess = true; + result.Result = new MainCodeChangeDAL().GetExportData(model); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "导出错误!" + }); + result.IsSuccess = false; + result.Msg = "导出错误!"; + } + return result; + } + #endregion + + #region 门板条码重新生成 + + public Product DPRegenerate(Product product) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + string oldcode=product.PRODUCTCODE; + product.OUTFLAG = "2"; + string regexp="(?<=\\d)R\\d"; + var flag=System.Text.RegularExpressions.Regex.Match(oldcode,regexp); + if(flag.Success) + { + var nflag = "R" + (int.Parse(flag.Value[1] + "") + 1); + product.PRODUCTCODE = System.Text.RegularExpressions.Regex.Replace(oldcode, regexp, nflag); + } + else + { + product.PRODUCTCODE = oldcode.Insert(oldcode.Length - 6, "R0"); + } + + //GenerateCode(product.MATERIAL_CODE, product.CREATEDATE); + var changelog = new MainCodeChange + { + CREATEDATE = DateTime.Now, + CREATEUSER = LoginUser.UserID, + MATERIAL_NAME = product.MATERIAL_NAME, + MATERIALCODE = product.MATERIAL_CODE, + NEWMAINCODE = product.PRODUCTCODE, + ORIGMAINCODE = oldcode, + PRODUCELINE = product.PRODUCELINE, + PRODUCTCODE = product.PRODUCTCODE, + PID = Guid.NewGuid().ToString() + }; + + DAL.Operation.ProductDAL dal = new ProductDAL(); + dal.BaseSession = session; + DAL.QT.ProductStructureDAL psdal = new DAL.QT.ProductStructureDAL(); + psdal.BaseSession = session; + DAL.Operation.MainCodeChangeDAL cdal = new MainCodeChangeDAL(); + cdal.BaseSession = session; + DAL.Operation.MainOperationDAL modal = new MainOperationDAL(); + modal.BaseSession = session; + + session.OpenTs(); + + dal.ReplaceBarcode(oldcode, product.PRODUCTCODE); + psdal.ReplaceProcesscode(oldcode, product.PRODUCTCODE); + modal.ReplaceBarcode(oldcode, product.PRODUCTCODE); + modal.DPParamReplace(oldcode, product.PRODUCTCODE); + + cdal.Insert(changelog); + + session.CommitTs(); + return product; + } + catch (Exception ex) + { + session.RollbackTs(); + throw ex; + } + } + } + + private string GenerateCode(string materialcode, DateTime time) + { + QMAPP.FJC.DAL.MD.MaterialDAL mdal = new QMAPP.FJC.DAL.MD.MaterialDAL(); + var material = mdal.Get(new QMAPP.FJC.Entity.MD.Material { MATERIAL_CODE = materialcode }); + if (material == null) + { + throw new Exception("查找物料信息失败!"); + } + DAL.Basic.MaterialCodeInitDAL mcdal = new DAL.Basic.MaterialCodeInitDAL(); + var materialinit = mcdal.GetByCondition(new Entity.Basic.MaterialCodeInit { MATERIAL_TYPE = material.MATERIAL_TYPE_CODE }); + + string prefix = ""; + if (materialinit != null) + { + prefix = materialinit.PRODUCT_TYPES; + } + + var productdal = new DAL.Produce.ProductDAL(); + + string maxcode = productdal.GetMaxCode(material.MATERIAL_TYPE_CODE, time); + string newcode = "1"; + if (!string.IsNullOrEmpty(maxcode)) + { + newcode = (Convert.ToInt32(maxcode) + 1) + ""; + } + newcode = prefix + time.ToString("yyyyMMdd") + newcode.PadLeft(6, '0'); + + return newcode; + } + + #endregion + + public DataResult ReplacePlanNo(Product product,string newplanno) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + var changelog = new MainCodeChange + { + CREATEDATE = DateTime.Now, + CREATEUSER = LoginUser.UserID, + MATERIAL_NAME = product.MATERIAL_NAME, + MATERIALCODE = product.MATERIAL_CODE, + NEWMAINCODE = newplanno, + ORIGMAINCODE = product.PLAN_NO, + PRODUCELINE = product.PRODUCELINE, + PRODUCTCODE = product.PRODUCTCODE, + PID = Guid.NewGuid().ToString() + }; + + DAL.Operation.ProductDAL dal = new ProductDAL(); + dal.BaseSession = session; + DAL.Operation.MainCodeChangeDAL cdal = new MainCodeChangeDAL(); + cdal.BaseSession = session; + + + + if (product.ENDOFLINE != "1") + { + var order = SetOrder(session, newplanno, product); + dal.ReplacePlanNo(product.PRODUCTCODE, newplanno, order.ORDERPLANID); + } + else + { + dal.ReplacePlanNo(product.PRODUCTCODE, newplanno, ""); + } + + cdal.Insert(changelog); + + session.CommitTs(); + return new DataResult { IsSuccess = true }; + } + catch (Exception ex) + { + session.RollbackTs(); + return new DataResult { IsSuccess = false, Ex = ex, Msg = ex.Message }; + } + } + } + + public DataResult ExchangePlanNo(Product oproduct, Product nproduct) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + var changelog = new MainCodeChange + { + CREATEDATE = DateTime.Now, + CREATEUSER = LoginUser.UserID, + MATERIAL_NAME = oproduct.MATERIAL_NAME, + MATERIALCODE = oproduct.MATERIAL_CODE, + NEWMAINCODE = nproduct.PLAN_NO, + ORIGMAINCODE = oproduct.PLAN_NO, + PRODUCELINE = oproduct.PRODUCELINE, + PRODUCTCODE = oproduct.PRODUCTCODE, + PID = Guid.NewGuid().ToString() + }; + var changelog1 = new MainCodeChange + { + CREATEDATE = DateTime.Now, + CREATEUSER = LoginUser.UserID, + MATERIAL_NAME = nproduct.MATERIAL_NAME, + MATERIALCODE = nproduct.MATERIAL_CODE, + NEWMAINCODE = oproduct.PLAN_NO, + ORIGMAINCODE = nproduct.PLAN_NO, + PRODUCELINE = nproduct.PRODUCELINE, + PRODUCTCODE = nproduct.PRODUCTCODE, + PID = Guid.NewGuid().ToString() + }; + + DAL.Operation.ProductDAL dal = new ProductDAL(); + dal.BaseSession = session; + DAL.Operation.MainCodeChangeDAL cdal = new MainCodeChangeDAL(); + cdal.BaseSession = session; + + + + if (nproduct.ENDOFLINE != "1") + { + var norder= SetOrder(session, oproduct.PLAN_NO, nproduct); + dal.ReplacePlanNo(nproduct.PRODUCTCODE, oproduct.PLAN_NO,norder.ORDERPLANID); + } + else + { + dal.ReplacePlanNo(nproduct.PRODUCTCODE, oproduct.PLAN_NO,""); + } + if (oproduct.ENDOFLINE != "1") + { + var oorder = SetOrder(session, nproduct.PLAN_NO, oproduct); + dal.ReplacePlanNo(oproduct.PRODUCTCODE, nproduct.PLAN_NO,oorder.ORDERPLANID); + } + else + { + dal.ReplacePlanNo(oproduct.PRODUCTCODE, nproduct.PLAN_NO,""); + } + + + + cdal.Insert(changelog); + + session.CommitTs(); + return new DataResult { IsSuccess = true }; + } + catch (Exception ex) + { + session.RollbackTs(); + return new DataResult { IsSuccess = false, Ex = ex, Msg = ex.Message }; + } + } + } + + private Entity.ProductionPlan.WorkOrder SetOrder(IDataSession session , string orderno,Product product) + { + string regexp_full = "^D\\d{2}\\w+[RF][LR]\\d{2}(10|11|12|0[1-9])(30|31|2\\d|1\\d|0[1-9])\\w\\d{5}$"; + string regexp_prefix = "^D\\d{2}\\w+(?=[RF][LR]\\d{6})"; + string regexp_position = "[RF][LR](?=\\d{6})"; + string regexp_date = "(?<=[RF][LR])\\d{2}(10|11|12|0[1-9])(30|31|2\\d|1\\d|0[1-9])"; + string regexp_seq = "\\d{5}$"; + string regexp_sdSeq = "(?<=SD)\\d{4}$"; + var plandal = new DAL.FIS.OrderPlanDAL(); + var workorderdal = new DAL.ProductionPlan.WorkOrderDAL(); + //Entity.FIS.OrderPlan plan = null; + Entity.ProductionPlan.WorkOrder order = null; + order = workorderdal.GetOneByOrderNO(orderno); + + if (order == null) + { + var plan=plandal.GetInfo(new Entity.FIS.OrderPlan { PLAN_NO = Regex.Replace(orderno,regexp_sdSeq, "") }); + if (plan == null) + { + + + + string codeprefix = Regex.Match(orderno, regexp_prefix).Value; + string positioncode = Regex.Match(orderno, regexp_position).Value; + string date = Regex.Match(orderno, regexp_date).Value; + string seq = ""; + if (Regex.IsMatch(orderno, regexp_full)) + { + seq = Regex.Match(orderno, regexp_seq).Value; + } + else + { + seq = Regex.Match(orderno, regexp_sdSeq).Value; + } + + string materialcode = new DAL.FIS.FISPhraseDAL().GetMESModulCode(codeprefix, positioncode); + if (string.IsNullOrWhiteSpace(materialcode)) + { + throw new Exception("FIS短语字典配置不准确或未更新!"); + } + + DateTime plandate + = new DateTime(2000 + int.Parse(date.Substring(0, 2)) + , int.Parse(date.Substring(2, 2)) + , int.Parse(date.Substring(4, 2))); + + plandal.BaseSession = session; + plan = new Entity.FIS.OrderPlan + { + CREATEDATE = DateTime.Now, + COMPLETE_QTY = 0, + CREATEUSER = "", + MATERIAL_CODE = materialcode,////////////////// + PID = Guid.NewGuid().ToString(), + PLAN_DATE = plandate,//////////// + PLAN_NO = orderno, + PLAN_SEQ = seq,////////////////// + PLAN_STATE = "1", + PLANSOURCE = Regex.IsMatch(orderno, regexp_full)?"0":"1", + QTY = 1, + UPDATEUSER = "", + UPDATEDATE = DateTime.Now, + }; + + Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = plan.MATERIAL_CODE }); + if (pbomcode != null) + { + plan.PBOM_CODE = pbomcode.PBOM_CODE; + } + QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(plan.MATERIAL_CODE); + if (routecode != null) + { + plan.ROUTE_CODE = routecode.ROUTE_CODE; + } + string workcentercode = new WorkCellDAL().GetWorkcenterWithMaterial(plan.MATERIAL_CODE); + if (workcentercode != null) + { + plan.WORKCENTER_CODE = workcentercode; + } + //赋值新session后插入 zxd20171101 + plandal.Insert(plan); + } + + + + + var wodDal = new WorkOrderDAL(); + //List list = new WorkCellDAL().GetFirstWorkCell(plan.PBOM_CODE); + + wodDal.BaseSession = session; + + //DataRow workOrder = workOrderDt.NewRow(); + order = new WorkOrder(); + + order.PID = Guid.NewGuid().ToString(); + order.ORDERPLANID = plan.PID; + order.ORDERPLAN_NO = plan.PLAN_NO; + if (Regex.IsMatch(orderno, regexp_full)) + order.ORDER_TYPE = EnumGeter.WORKORDERTYPE.FIS.GetHashCode().ToString(); + else + order.ORDER_TYPE = EnumGeter.WORKORDERTYPE.STOCK.GetHashCode().ToString(); + order.SEQ = plan.PLAN_SEQ; + order.MATERIAL_CODE = plan.MATERIAL_CODE; + order.PBOM_CODE = plan.PBOM_CODE; + order.QTY = 1; + order.COMPLETE_QTY = 0; + order.PLAN_DATE = plan.PLAN_DATE; + order.SHIFT_CODE = plan.SHIFT_CODE; + order.WORKCENTER_CODE = plan.WORKCENTER_CODE; + //WorkCell workcellcode = new WorkCellDAL().Get(new WorkCell { WORKCENTER_CODE = info.WORKCENTER_CODE }); + order.WORKCELL_CODE = product.WORKCELL_CODE; + order.WORKLOC_CODE = ""; + order.REMARK = product.PRODUCTCODE; + order.EQPT_NAME = ""; + order.EQPT_CODE = ""; + order.STATE = EnumGeter.WORKPLANSTATE.READY.GetHashCode(); + order.PRI = 1; + //order.UPDATEDATE = DateTime.Now; + order.PRINTED = "1"; + wodDal.Insert(order); + } + else + { + order.WORKCELL_CODE = product.WORKCELL_CODE; + order.REMARK = product.PRODUCTCODE; + var wodDal = new WorkOrderDAL(); + + wodDal.BaseSession = session; + wodDal.Update(order); + } + return order; + } + } +} diff --git a/.svn/pristine/24/244855c9fb95f4aafec7da791da81cb82568566f.svn-base b/.svn/pristine/24/244855c9fb95f4aafec7da791da81cb82568566f.svn-base new file mode 100644 index 0000000..4995db3 --- /dev/null +++ b/.svn/pristine/24/244855c9fb95f4aafec7da791da81cb82568566f.svn-base @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/24/24dd4d06c59c813aeeaa4d4a485c67011238ae2e.svn-base b/.svn/pristine/24/24dd4d06c59c813aeeaa4d4a485c67011238ae2e.svn-base new file mode 100644 index 0000000..8a359a6 --- /dev/null +++ b/.svn/pristine/24/24dd4d06c59c813aeeaa4d4a485c67011238ae2e.svn-base @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.Basic; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; + +namespace QMAPP.FJC.DAL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年05月14日 + /// + public class MaterialBomConfigDAL + { + + /// + /// 查询自动输入的输入条码 + /// + /// + /// + /// + public List GetAutoInputBarCode(string pBomCode, string pWorkLoc) + { + List parameter = new List(); + List list = new List(); + var data = new DataTable(); + //var sqlScript = $"select Product_Code from T_MD_MaterialBomConfig_QD where workloc = '{pWorkLoc}' and material_code = '{pBomCode}'"; + + string sqlScript = $@"select Product_Code from T_MD_MaterialBomConfig_QD + where material_code is not null and material_code in + (select material_code from T_MD_PBOM_ITEM where pbom_code = '{pBomCode}' + INTERSECT + select material_code from T_MD_MaterialBomConfig_QD where workloc = '{pWorkLoc}' ) and workloc ='{pWorkLoc}'"; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); + data = session.GetTable(sqlScript, parameter.ToArray()); + } + if (data.Rows.Count > 0) + { + foreach (DataRow dataRow in data.Rows) + { + string pbom = dataRow["Product_Code"].ToString(); + if (!list.Contains(pbom) && !string.IsNullOrEmpty(pbom)) + { + list.Add(pbom); + } + } + } + return list; + } + + /// + /// 获取全部规则 + /// + /// + public List Get(MaterialBomConfig MaterialBomConfig) + { + try + { + string sql = $"SELECT PID,Material_Code,Workloc,Product_Code,Material_Name FROM [T_MD_ScanIPConfig_QD] where Workloc = '{MaterialBomConfig.Workloc}' and Material_Code = '{MaterialBomConfig.Material_Code}' "; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + } +} diff --git a/.svn/pristine/25/252aa7cebc75f7d064fd9f439d6508c0100332bc.svn-base b/.svn/pristine/25/252aa7cebc75f7d064fd9f439d6508c0100332bc.svn-base new file mode 100644 index 0000000..1dd9e61 Binary files /dev/null and b/.svn/pristine/25/252aa7cebc75f7d064fd9f439d6508c0100332bc.svn-base differ diff --git a/.svn/pristine/26/26031d4df39dcad82b1504c894bc666f40580460.svn-base b/.svn/pristine/26/26031d4df39dcad82b1504c894bc666f40580460.svn-base new file mode 100644 index 0000000..29c3eda --- /dev/null +++ b/.svn/pristine/26/26031d4df39dcad82b1504c894bc666f40580460.svn-base @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.FJC.Entity.Operation; +using QMAPP.Entity; +using QMAPP.ServicesAgent; +using QMAPP.MD.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.WinForm.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// + /// + public partial class InjectPasswordForm : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + //List _bzdConfig = null; + + //Product _CurrentProduct = null; + + /// + /// + /// + public InjectPasswordForm() + { + InitializeComponent(); + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + + } + + #region 打印按钮 + + /// + /// 打印按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + string MakeUpBZD = ""; + DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "MakeUpBZD"); + if (dataTable.Rows.Count > 0) + { + MakeUpBZD = dataTable.Rows[0]["Value"].ToString(); + } + + if (string.IsNullOrEmpty(MakeUpBZD)) + MakeUpBZD = "admin"; + if (string.IsNullOrEmpty(txtMainCode.Text)) + { + infolabel.Text = "请输入密码!"; + this.Show(); + + } + if (txtMainCode.Text == MakeUpBZD) + { + this.Close(); + + InjectPrintForm frm = new InjectPrintForm(this); + frm.ShowDialog(); + + //this.DialogResult = DialogResult.OK; + + + } + else + { + infolabel.Text = "密码输入错误!"; + this.Show(); + + } + + } + catch (Exception exception) + { + //MessageBox.Show("打印失败!"); + throw; + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/26/2676967275c3ba305a1a7fabee568ae3f62bae90.svn-base b/.svn/pristine/26/2676967275c3ba305a1a7fabee568ae3f62bae90.svn-base new file mode 100644 index 0000000..3d7e4eb --- /dev/null +++ b/.svn/pristine/26/2676967275c3ba305a1a7fabee568ae3f62bae90.svn-base @@ -0,0 +1,73 @@ +namespace Stone.WinModuleTransWare +{ + partial class Form1 + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.textBox1 = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(103, 56); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(536, 163); + this.textBox1.TabIndex = 0; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(321, 300); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Speek"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.button1); + this.Controls.Add(this.textBox1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.Button button1; + } +} + diff --git a/.svn/pristine/27/2729cfeb74ee8f07cfca15c8e80a6d0bbd946fea.svn-base b/.svn/pristine/27/2729cfeb74ee8f07cfca15c8e80a6d0bbd946fea.svn-base new file mode 100644 index 0000000..4e5bfd1 --- /dev/null +++ b/.svn/pristine/27/2729cfeb74ee8f07cfca15c8e80a6d0bbd946fea.svn-base @@ -0,0 +1,225 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Injection; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M12-1 + /// 作 用:投料记录 + /// 作 者:王庆男 + /// 编写日期:2015年06月08日 + /// + public partial class InjectionMoldingNEWForm : Form + { + InjectionRecorder searchModel = new InjectionRecorder();//查询条件 + public InjectionMoldingNEWForm() + { + InitializeComponent(); + } + + #region 窗体载入 + + private void Form_Load(object sender, EventArgs e) + { + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + ////加载注塑设备列表 + //this.comMachine.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType_M.Injection.GetHashCode().ToString() }, true); + //this.comMachine.DisplayMember = "MACHINENAME"; + //this.comMachine.ValueMember = "MACHINECODDE"; + //加载原材料类别 + this.comMaterialCode.DataSource = basicData.GetMaterielInfoList("RAW_INJECT", true); + this.comMaterialCode.DisplayMember = "MATERIAL_NAME"; + this.comMaterialCode.ValueMember = "MATERIAL_CODE"; + //加载操作人 + this.comOpereator.DataSource = basicData.GetOperatorInfoList(EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(), true); ; + this.comOpereator.DisplayMember = "OPERATOR"; + this.comOpereator.ValueMember = "PID"; + #endregion + //初始化条件 + this.dtpCreateUserStart.ValueX = DateTime.Now.AddDays(-10); + this.dtpCreateUserEnd.ValueX = DateTime.Now; + //初始化分页 + this.pager1.Init(); + //加载默认查询条件 + SetSearchModel(); + BindGirdData(); + } + + + #endregion + + #region 绑定数据 + + private DataPage BindGirdData() + { + List recorders = null;//查询结果列表 + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage = pager1.DataPage; + try + { + #region 服务查询 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + dataPage = agent.InvokeServiceFunction(B9BasicService.InjectionRecorderBLL_GetList.ToString(), searchModel, dataPage); + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGView.DataSource = recorders; + this.pager1.DataPage = dataPage; + } + catch (Exception ex) + { + throw ex; + } + return dataPage; + } + + #endregion + /// + /// 分页事件 + /// + /// + /// + private DataPage pager1_EventPaging(Controls.EventPagingArg e) + { + return BindGirdData(); + } + + /// + /// 查询事件 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + SetSearchModel(); + this.pager1.Init(); + BindGirdData(); + } + + /// + /// 设置查询条件 + /// + private void SetSearchModel() + { + searchModel = new InjectionRecorder(); + searchModel.MACHINETYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString();//默认条件为注塑 + ////设备 + //if (this.comMachine.SelectedValue != null && string.IsNullOrEmpty(this.comMachine.SelectedValue.ToString().Trim()) == false) + //{ + // searchModel.MACHINECODDE = this.comMachine.SelectedValue.ToString().Trim(); + //} + //原材料物料号 + if (this.comMaterialCode.SelectedValue != null && string.IsNullOrEmpty(this.comMaterialCode.SelectedValue.ToString().Trim()) == false) + { + searchModel.MATERIALCODE = this.comMaterialCode.SelectedValue + ""; + } + //批次 + if (string.IsNullOrEmpty(this.txtBatch.Text.Trim()) == false) + { + searchModel.MATERIALBATCH = this.txtBatch.Text.Trim(); + } + //开始时间 + if (string.IsNullOrEmpty(this.dtpCreateUserStart.Text.Trim()) == false) + { + searchModel.CreateDateStart = Convert.ToDateTime(this.dtpCreateUserStart.Text).ToString("yyyy-MM-dd").Trim(); + } + //结束时间 + if (string.IsNullOrEmpty(this.dtpCreateUserEnd.Text.Trim()) == false) + { + searchModel.CreateDateEnd = Convert.ToDateTime(this.dtpCreateUserEnd.Text).AddDays(1).ToString("yyyy-MM-dd").Trim(); + } + //操作人 + if (this.comOpereator.SelectedValue != null && string.IsNullOrEmpty(this.comOpereator.SelectedValue.ToString()) == false) + { + searchModel.CREATEUSER = this.comOpereator.SelectedValue.ToString(); + } + } + + /// + /// 删除 + /// + /// + /// + private void tsbDelete_Click(object sender, EventArgs e) + { + if (this.DGView.SelectedRows.Count <= 0) + return; + if (MessageBox.Show(Resource1.ConfirmDelete, Resource1.ConfirmTitle, MessageBoxButtons.OKCancel) != DialogResult.OK) + return; + + #region 执行删除 + string selectKey = this.DGView.SelectedRows[0].Cells["Pid"].Value.ToString(); + //删除校验判断该投料批次号是否已经生产出产品,如果已生产出产品则不允许删除,如果不允许则弹出提示'该批次号物料已使用,不能删除!' + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_DeleteSingle.ToString(), selectKey); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + BindGirdData(); + } + + #endregion + } + + /// + /// 打开投料 + /// + /// + /// + private void tsbAdd_Click(object sender, EventArgs e) + { + InjectionMoldingEditForm editForm = new InjectionMoldingEditForm(); + DialogResult result = editForm.ShowDialog(); + if (result == System.Windows.Forms.DialogResult.OK)//判断是否投料窗口已做操作 + { + this.pager1.Init(); + BindGirdData(); + } + } + + /// + /// 打开编辑 + /// + /// + /// + private void tsbEdit_Click(object sender, EventArgs e) + { + if (this.DGView.SelectedRows.Count > 0) + { + string selectKey = this.DGView.SelectedRows[0].Cells["Pid"].Value.ToString(); + InjectionMoldingEditForm editForm = new InjectionMoldingEditForm(selectKey); + DialogResult result = editForm.ShowDialog(); + if (result == System.Windows.Forms.DialogResult.OK)//判断是否投料窗口已做操作 + { + this.pager1.Init(); + BindGirdData(); + } + } + } + + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + } +} diff --git a/.svn/pristine/28/2842c78d3ef208a2d740de48f5d8912271010384.svn-base b/.svn/pristine/28/2842c78d3ef208a2d740de48f5d8912271010384.svn-base new file mode 100644 index 0000000..374abdb --- /dev/null +++ b/.svn/pristine/28/2842c78d3ef208a2d740de48f5d8912271010384.svn-base @@ -0,0 +1,274 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; + +using QMFrameWork.Data; + +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.FJC.BLL.BZD +{ + /// + /// 模块名称:BZD条码配置 + /// 作 者:宁红钢 + /// 编写日期:2019年10月12日 + /// + public class BZDRecorderBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BZDRecorder2 model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BZDRecorderDAL().Get(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + public BZDRecorder2 GetRecord(BZDRecorder2 model) + { + DataResult result = new DataResult(); + try + { + return new BZDRecorderDAL().GetRecord(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + + } + + } + + public BZDRecorder2 Get316Record(BZDRecorder2 model) + { + DataResult result = new DataResult(); + try + { + return new BZDRecorderDAL().Get316Record(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + + } + + } + + #endregion + + #region 获取列表(分页) + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BZDRecorder2 condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + //获取物料信息列表 + DataPage dataPage = new BZDRecorderDAL().GetList(condition, page); + + result.Result = dataPage; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + + } + /// + /// 获取全部条码格式规则 + /// + /// + public List GetAllList() + { + return new BZDRecorderDAL().GetAllList(); + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// 信息 + /// true:已存在;fasel:不存在。 + public bool Exists(BZDRecorder info) + { + try + { + return new BZDRecorderDAL().Exists(info); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + //public List getMaxSeq(string BZDCODE) + //{ + // List list = new List(); + // list.Add(new BZDRecorderDAL().getMaxSeq(BZDCODE)); + // return list; + //} + + public List CreateBZDCode(List paramList) + { + return new BZDRecorderDAL().CreateBZDCode(paramList, this.LoginUser.UserID); + } + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BZDRecorder info) + { + + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); +// info.MPID = ""; + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now; + //info.UPDATEUSER = info.CREATEUSER; + //info.UPDATEDATE = info.CREATEDATE; + //info.FLGDEL = "0"; + BZDRecorderDAL cmdDAL = new BZDRecorderDAL(); + return new BZDRecorderDAL().Insert(info); + + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// 信息 + /// 更新行数 + public DataResult Update(BZDRecorder info) + { + DataResult result = new DataResult(); + try + { + //info.UPDATEUSER = this.LoginUser.UserID; + //info.UPDATEDATE = DateTime.Now; + //info.FLGDEL = "0"; + result.Result = new BZDRecorderDAL().Update(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除信息 + /// + /// 主键串 + /// 删除个数 + public DataResult Delete(string strs) + { + int count = 0; + DataResult result = new DataResult(); + string[] list = strs.Split(":".ToCharArray()); + try + { + foreach (string str in list) + { + count += this.DeleteBarcodeRules(new BZDRecorder { PID = str }); + } + result.Result = count; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int DeleteBarcodeRules(BZDRecorder info) + { + try + { + return new BZDRecorderDAL().Delete(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(BZDRecorder2 info) + { + try + { + return new BZDRecorderDAL().GetExportData(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + } +} diff --git a/.svn/pristine/28/28456699235dd1442364ab92025c3dbcd1e12bcc.svn-base b/.svn/pristine/28/28456699235dd1442364ab92025c3dbcd1e12bcc.svn-base new file mode 100644 index 0000000..138964e --- /dev/null +++ b/.svn/pristine/28/28456699235dd1442364ab92025c3dbcd1e12bcc.svn-base @@ -0,0 +1,235 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {063B6316-7154-4BD9-B546-21CCE4685235} + Library + Properties + QMAPP.FJC.DAL + QMAPP.FJC.DAL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/29/291a17b91ff786921134293087a1ca4574050397.svn-base b/.svn/pristine/29/291a17b91ff786921134293087a1ca4574050397.svn-base new file mode 100644 index 0000000..3c157ec --- /dev/null +++ b/.svn/pristine/29/291a17b91ff786921134293087a1ca4574050397.svn-base @@ -0,0 +1,284 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + Library + Properties + QMAPP.FJC.BLL + QMAPP.FJC.BLL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLL\BarcodeLib.dll + + + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\XGate\Ptl.Device.dll + + + ..\..\DLL\XGate\Ptl.Device.XmlSerializers.dll + + + ..\..\QMFrameWork\QMFrameWork.Cache.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {8A50A215-C033-42DC-A656-BC1F117DA6BA} + QM.Exchange.Adapters + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + Always + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/29/29939cff80c9ce1f20f3a65643e82bc94a563f27.svn-base b/.svn/pristine/29/29939cff80c9ce1f20f3a65643e82bc94a563f27.svn-base new file mode 100644 index 0000000..b014a3f --- /dev/null +++ b/.svn/pristine/29/29939cff80c9ce1f20f3a65643e82bc94a563f27.svn-base @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.Bucket +{ + /// + /// 模块名称:搪塑称重记录 + /// 作 者:张松男 + /// 编写日期:2021年08月24日 + /// + public class TSWeighRecoreModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 注塑条码 + /// + [Description("注塑条码")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 150, DataAlign = DataAlign.center)] + public string ProductCode { get; set; } + + + /// + /// 颜色 + /// + [Description("颜色")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string PColour { get; set; } + + /// + /// 物料号 + /// + [Description("物料号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 300)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 300, DataAlign = DataAlign.center)] + public string MATERIAL_CODE { get; set; } + + /// + /// 重量 + /// + [Description("重量")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string Weigh { get; set; } + + /// + /// 创建人 + /// + [Description("创建用户")] + public string CREATEUSER { get; set; } + + /// + /// 创建日期 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime CREATEDATE { get; set; } + + /// + /// 更新人 + /// + [Description("更新用户")] + public string UPDATEUSER { get; set; } + + /// + /// 更新日期 + /// + [Description("更新时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime UPDATEDATE { get; set; } + + ///// + ///// 开始时间 + ///// + //[Description("开始时间")] + //[HTMLInput(UpdateRead = true, MaxLength = 20)] + //[InputType(inputType.dateTimeBox)] + //[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss", Hidden = true)] + //public DateTime BeginTime { get; set; } + + ///// + ///// 结束时间 + ///// + //[Description("结束时间")] + //[HTMLInput(UpdateRead = true, MaxLength = 20)] + //[InputType(inputType.dateTimeBox)] + //[DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss",Hidden = true)] + //public DateTime EndTime { get; set; } + } +} diff --git a/.svn/pristine/2c/2cdaf16fe5363db09835e192a2ad216f5319dd5b.svn-base b/.svn/pristine/2c/2cdaf16fe5363db09835e192a2ad216f5319dd5b.svn-base new file mode 100644 index 0000000..306b677 --- /dev/null +++ b/.svn/pristine/2c/2cdaf16fe5363db09835e192a2ad216f5319dd5b.svn-base @@ -0,0 +1,258 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketMaterial Get(BucketMaterial info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketMaterial Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_BucketMaterial] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BucketMaterial condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BucketMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,Line,BucketCode,RawMaterial,IsCheck,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_BucketMaterial "); + whereBuilder.Append(" AND IsCheck<> '1' "); + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BucketMaterial info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_BucketMaterial"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BucketMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BucketMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_BucketMaterial "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/2f/2f783cb02a82551b579e967bb670ab50c0dcf7d4.svn-base b/.svn/pristine/2f/2f783cb02a82551b579e967bb670ab50c0dcf7d4.svn-base new file mode 100644 index 0000000..145ce05 Binary files /dev/null and b/.svn/pristine/2f/2f783cb02a82551b579e967bb670ab50c0dcf7d4.svn-base differ diff --git a/.svn/pristine/31/31b747fb9e2c19a9bab3b1e40e7394ec31815caf.svn-base b/.svn/pristine/31/31b747fb9e2c19a9bab3b1e40e7394ec31815caf.svn-base new file mode 100644 index 0000000..02dd441 --- /dev/null +++ b/.svn/pristine/31/31b747fb9e2c19a9bab3b1e40e7394ec31815caf.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_BucketMaterial")] + public class BucketMaterial : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 产线 + /// + [Description("产线")] + [DBColumn(ColumnName = "Line", DataType = DbType.String)] + public string Line { get; set; } + + /// + /// 编号 + /// + [Description("编号")] + [DBColumn(ColumnName = "BucketCode", DataType = DbType.String)] + public string BucketCode { get; set; } + + /// + /// 原料零件号 + /// + [Description("原料零件号")] + [DBColumn(ColumnName = "RawMaterial", DataType = DbType.String)] + public string RawMaterial { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/32/32d7fc9548ded6ef720054bc4977371c80c39294.svn-base b/.svn/pristine/32/32d7fc9548ded6ef720054bc4977371c80c39294.svn-base new file mode 100644 index 0000000..9de5ab8 --- /dev/null +++ b/.svn/pristine/32/32d7fc9548ded6ef720054bc4977371c80c39294.svn-base @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.Basic; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.FJC.Entity.MD; + +namespace QMAPP.FJC.DAL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年03月17日 + /// + public class AppConfigDAL + { + + /// + /// 获取全部规则 + /// + /// + public AppConfig Get(string Code) + { + try + { + string sql = $"SELECT * FROM [T_MD_AppConfig_QD] where Code = '{Code}'"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql, parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取全部规则 + /// + /// + public MaterialClass GetMATERIAL(string MATERIALCode,ref string msg) + { + try + { + var sql = $" select MATERIAL_TYPE_NAME,LAYER_NUM,UP_MATERIAL_TYPE_CODE from T_MD_MATERIAL_CLASS where MATERIAL_TYPE_CODE = '{MATERIALCode}'"; + var MaterialClass = new MaterialClass(); + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + MaterialClass = session.Get(sql, parameters.ToArray()); + } + + if (MaterialClass.LAYER_NUM == "2") + { + msg = MaterialClass.MATERIAL_TYPE_NAME; + return MaterialClass; + } + else + { + GetMATERIAL(MaterialClass.UP_MATERIAL_TYPE_CODE,ref msg); + } + return MaterialClass; + } + catch (Exception ex) + { + throw ex; + } + } + } +} diff --git a/.svn/pristine/33/3351e880b5323cf3f4a009a364e879b2cc3b7461.svn-base b/.svn/pristine/33/3351e880b5323cf3f4a009a364e879b2cc3b7461.svn-base new file mode 100644 index 0000000..045cdea --- /dev/null +++ b/.svn/pristine/33/3351e880b5323cf3f4a009a364e879b2cc3b7461.svn-base @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年08月11日 + /// + [DBTable(TableName = "T_MD_BucketMaterialClass")] + public class BucketMaterialClass : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 物料编号 + /// + [Description("物料编号")] + [DBColumn(ColumnName = "MaterialCode", DataType = DbType.String)] + public string MaterialCode { get; set; } + + /// + /// 原料零件号 + /// + [Description("原料零件号")] + [DBColumn(ColumnName = "RawMaterial", DataType = DbType.String)] + public string RawMaterial { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/34/34945d855769f954a96a9eb418840a5bacf4df0f.svn-base b/.svn/pristine/34/34945d855769f954a96a9eb418840a5bacf4df0f.svn-base new file mode 100644 index 0000000..05127c8 Binary files /dev/null and b/.svn/pristine/34/34945d855769f954a96a9eb418840a5bacf4df0f.svn-base differ diff --git a/.svn/pristine/35/35495c15bd637ae0020710a11f7a2a5c757ea63e.svn-base b/.svn/pristine/35/35495c15bd637ae0020710a11f7a2a5c757ea63e.svn-base new file mode 100644 index 0000000..ed135ea --- /dev/null +++ b/.svn/pristine/35/35495c15bd637ae0020710a11f7a2a5c757ea63e.svn-base @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMFrameWork.Data.Attributes; +using QMAPP.Entity; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.FJC.Entity.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年05月14日 + /// + [DBTable(TableName = "T_MD_MaterialBomConfig_QD")] + public class MaterialBomConfig : BaseEntity + { + /// + /// 主键 + /// + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 物料号 + /// + [DBColumn(ColumnName = "Material_Code", DataType = DbType.String)] + public string Material_Code { get; set; } + + /// + /// 序号 + /// + [DBColumn(ColumnName = "Product_Code", DataType = DbType.Int32)] + public string Product_Code { get; set; } + + /// + /// 工位 + /// + [DBColumn(ColumnName = "Workloc", DataType = DbType.String)] + public string Workloc { get; set; } + + /// + /// 物料号 + /// + [DBColumn(ColumnName = "Material_Name", DataType = DbType.String)] + public string Material_Name { get; set; } + + } + +} diff --git a/.svn/pristine/35/35504c2e672e59b70695ed9fb913379bb8ee3fc6.svn-base b/.svn/pristine/35/35504c2e672e59b70695ed9fb913379bb8ee3fc6.svn-base new file mode 100644 index 0000000..491ea88 --- /dev/null +++ b/.svn/pristine/35/35504c2e672e59b70695ed9fb913379bb8ee3fc6.svn-base @@ -0,0 +1,229 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.MD.Web.Models; +using QMFrameWork.Data; +using QMAPP.ServicesAgent; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.FJC.Web.Models; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.Entity.CheckTime; +using QMAPP.FJC.Web.Models.CheckTime; + +namespace QMAPP.FJC.Web.Controllers +{ + /// + /// 模块名称:本地库无记录的 时间验证 + /// 作 者:张松男 + /// 编写日期:2020年03月00日 + /// + /// + public class CHECKTIMEController : QController + { + #region 获取列表 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callBack) + { + CHECKTIMEModel seachModel = new CHECKTIMEModel(); + if (callBack == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.url = "/CHECKTIME/GetList"; + return View("CHECKTIMEList", seachModel); + } + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + CHECKTIMEModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + CHECKTIME condition = null; + DataResult pageResult = new DataResult(); + + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + pageResult = wcfAgent.InvokeServiceFunction>("CHECKTIMEBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + + string tempstr = ""; + tempstr = result.GetJsonSource(); + return Content(tempstr); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 编辑 + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult Edit() + { + CHECKTIMEModel model = new CHECKTIMEModel(); + string ID = Request.Params["PID"]; + CHECKTIME Entity = new CHECKTIME(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + if (string.IsNullOrEmpty(ID) == false) + { + //修改获取原数据 + Entity.PID = ID; + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9IPCService.CHECKTIMEBLL_Get.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return View("CHECKTIMEEdit", model); + } + model = CopyToModel(result.Result); + //根据工位信息获得工序信息 + + + //string kind = model.WORKLOC_CODE; + //var WORKCELL_CODE = ""; + //ServiceAgent wcfAgent1 = this.GetServiceAgent(); + //if (string.IsNullOrEmpty(kind) == false) + //{ + // var dataResult = wcfAgent1.InvokeServiceFunction> + // ("WorkLocBLL_GetWorkCellFromWorkLocList", new WorkLoc(), kind); + // foreach (WorkLoc item in dataResult) + // { + // WORKCELL_CODE = item.WORKCELL_CODE; + // } + //} + //model.WORKCELL_CODE = WORKCELL_CODE; + + } + return View("CHECKTIMEEdit", model); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// 处理结果 + [HttpPost] + [HandleException] + [ValidateInput(false)] + public ActionResult Save(CHECKTIMEModel saveModel) + { + CHECKTIME Entity = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + Entity = CopyToModel(saveModel); + if (string.IsNullOrEmpty(Entity.PID) == true) + { + //新增 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9IPCService.CHECKTIMEBLL_Insert.ToString(), Entity); + } + else + { + //修改 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9IPCService.CHECKTIMEBLL_Update.ToString(), Entity); + } + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return View("CHECKTIMEEdit", saveModel); + } + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除 + /// + /// 结果 + [HttpPost] + [HandleException] + public ActionResult Delete(CHECKTIMEModel saveModel) + { + string selectKey = Request.Form["selectKey"]; + CHECKTIME Entity = null; + Entity = CopyToModel(saveModel); + Entity.PID = selectKey; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + result = wcfAgent.InvokeServiceFunction>("CHECKTIMEBLL_Delete", selectKey); + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return List(true); + } + SetMessage(AppResource.DeleteMessage); + return List(true); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/36/36c170a9629d51bd137b35a935075e224dd8531d.svn-base b/.svn/pristine/36/36c170a9629d51bd137b35a935075e224dd8531d.svn-base new file mode 100644 index 0000000..80be0d8 Binary files /dev/null and b/.svn/pristine/36/36c170a9629d51bd137b35a935075e224dd8531d.svn-base differ diff --git a/.svn/pristine/37/3759033a43c7b69f332b7d8c701af241c05e8d4d.svn-base b/.svn/pristine/37/3759033a43c7b69f332b7d8c701af241c05e8d4d.svn-base new file mode 100644 index 0000000..27b4cab --- /dev/null +++ b/.svn/pristine/37/3759033a43c7b69f332b7d8c701af241c05e8d4d.svn-base @@ -0,0 +1,106 @@ + <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + 条码规则信息列表 + + + + <%=Html.QPSeach(100,true) %> + + + + + + + + + + + + + + +
+ <%=Html.QV(p => p.Type)%> + + <%=Html.QC(p => p.Type)%> + + <%=Html.QV(p => p.ProductCode)%> + + <%=Html.QC(p => p.ProductCode)%> + + <%=Html.QV(p=>p.BeginTime) %> + + <%=Html.QC(p => p.BeginTime)%> + + <%=Html.QV(p => p.EndTime)%> + + <%=Html.QC(p => p.EndTime)%> +
+
+ + <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("PID")%> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("MPID")%> + <%-- <%=Html.Hidden("Line_code")%> + <%=Html.Hidden("Line_name")%>--%> + +
+ + + + + +
+ <%=Html.QTButtonSearch("BZDConfig", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
+ diff --git a/.svn/pristine/37/37735b87cc892240873c50db4f9bbf541cb80c1c.svn-base b/.svn/pristine/37/37735b87cc892240873c50db4f9bbf541cb80c1c.svn-base new file mode 100644 index 0000000..2f2028b --- /dev/null +++ b/.svn/pristine/37/37735b87cc892240873c50db4f9bbf541cb80c1c.svn-base @@ -0,0 +1,281 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.CheckTime; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; + +namespace QMAPP.FJC.DAL.CheckTime +{ + /// + /// 模块名称:本地库无记录的 时间验证 + /// 作 者:张松男 + /// 编写日期:2020年03月00日 + /// + public class CHECKTIMEDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public CHECKTIME Get(CHECKTIME info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public CHECKTIME Get(string PID) + { + try + { + string sql = "SELECT * FROM [T_MD_PRODUCT_TIMECHECK_Product] WHERE [PID]=@PID"; + List parameters = new List(); + parameters.Add(new DataParameter("PID", PID)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(CHECKTIME condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(CHECKTIME condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,WorkLoc_Code,CodeTimeStart,CodeTimeNumber,State,Check_Value,Operator,Check_Type,Remark,Check_ValueTo,DAI_Code,Column1,Column2 "); + sqlBuilder.Append("FROM T_MD_PRODUCT_TIMECHECK_Product "); + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 根据工位,采集点查找记录 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public List SelectCheck(string LocWorkCode ,string DAI_CODE) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + + try + { + sqlBuilder.Append($"SELECT PID,WorkLoc_Code,CodeTimeStart,CodeTimeNumber,State,Check_Value,Operator,Check_Type,Remark,Check_ValueTo,DAI_Code,Column1,Column2 FROM T_MD_PRODUCT_TIMECHECK_Product WHERE WorkLoc_Code = '{LocWorkCode}' AND DAI_Code = '{DAI_CODE}' and State = '0'"); + + //添加进行无重复字段判断代码 + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sqlBuilder.ToString(), parameters.ToArray()).ToList(); + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(CHECKTIME info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_PRODUCT_TIMECHECK_Product"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(CHECKTIME info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(CHECKTIME info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + public DateTime GetServiceDateTime() + { + StringBuilder sql = new StringBuilder(); + try + { + List parameters = new List(); + string sqlScript = @"select GetDATE() as time "; + DataTable datatable = new DataTable(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + datatable = session.GetTable(sqlScript, parameters.ToArray()); + } + + if (datatable.Rows.Count > 0) + { + string datetimestr = datatable.Rows[0]["time"].ToString(); + return DateTime.Parse(datetimestr); + } + + return DateTime.Now; + } + catch (Exception ex) + { + throw ex; + } + } + + } +} diff --git a/.svn/pristine/37/37c8b5e8183f6968c4850d91494b58f1b4d13fc3.svn-base b/.svn/pristine/37/37c8b5e8183f6968c4850d91494b58f1b4d13fc3.svn-base new file mode 100644 index 0000000..ab58672 --- /dev/null +++ b/.svn/pristine/37/37c8b5e8183f6968c4850d91494b58f1b4d13fc3.svn-base @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/38/3821d73a021b048714cd5dfbe864aa61d5950e6d.svn-base b/.svn/pristine/38/3821d73a021b048714cd5dfbe864aa61d5950e6d.svn-base new file mode 100644 index 0000000..22c1f93 --- /dev/null +++ b/.svn/pristine/38/3821d73a021b048714cd5dfbe864aa61d5950e6d.svn-base @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.FJC.Web.Models.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.MD.Web.Models; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.FJC.Web.Models.Bucket; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.Web.Controllers +{ + public class BucketMaterialController : QController + { + #region 获取信息 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callback) + { + BucketMaterialModel seachModel = new BucketMaterialModel(); + if (callback == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.url = "/BucketMaterial/GetList"; + return View("BucketMaterialList", seachModel); + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + BucketMaterialModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + BucketMaterial condition = null; + DataResult pageResult = new DataResult(); + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + + pageResult = wcfAgent.InvokeServiceFunction>("BucketMaterialBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + return Content(result.GetJsonSource()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 编辑 + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult Edit() + { + BucketMaterialModel model = new BucketMaterialModel(); + string ID = Request.Params["PID"]; + BucketMaterial Entity = new BucketMaterial(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + if (string.IsNullOrEmpty(ID) == false) + { + //修改获取原数据 + Entity.PID = ID; + result = wcfAgent.InvokeServiceFunction>("BucketMaterialBLL_Get", Entity); + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return View("BucketMaterialEdit", model); + } + model = CopyToModel(result.Result); + } + return View("BucketMaterialEdit", model); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 保存 + /// + /// + /// 处理结果 + [HttpPost] + [HandleException] + [ValidateInput(false)] + public ActionResult Save(BucketMaterialModel saveModel) + { + BucketMaterial Entity = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + Entity = CopyToModel(saveModel); + if (string.IsNullOrEmpty(Entity.PID) == true) + { + //新增 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketMaterialBLL_Insert.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketMaterialEdit", saveModel); + } + } + else + { + //修改 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketMaterialBLL_Update.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketMaterialEdit", saveModel); + } + } + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除 + /// + /// 结果 + [HttpPost] + [HandleException] + public ActionResult Delete(BucketMaterial model) + { + string selectKey = Request.Form["selectKey"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + + try + { + var result = wcfAgent.InvokeServiceFunction(QMAPP.ServicesAgent.DictService.BucketMaterialBLL_Delete.ToString(), selectKey); + if (result == 0) + { + SetMessage("信息有关联,删除失败!"); + return List(true); + } + SetMessage(AppResource.DeleteMessage); + return List(true); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } +} diff --git a/.svn/pristine/38/3837e8f733fcfcf91bd14127e4367588fa44336f.svn-base b/.svn/pristine/38/3837e8f733fcfcf91bd14127e4367588fa44336f.svn-base new file mode 100644 index 0000000..a862cc5 Binary files /dev/null and b/.svn/pristine/38/3837e8f733fcfcf91bd14127e4367588fa44336f.svn-base differ diff --git a/.svn/pristine/38/389e1542c529a5edf9b4b834ffa287aedcd89865.svn-base b/.svn/pristine/38/389e1542c529a5edf9b4b834ffa287aedcd89865.svn-base new file mode 100644 index 0000000..8fe7619 Binary files /dev/null and b/.svn/pristine/38/389e1542c529a5edf9b4b834ffa287aedcd89865.svn-base differ diff --git a/.svn/pristine/3a/3a5188930b3e60455f30f0c616b0f05768b48336.svn-base b/.svn/pristine/3a/3a5188930b3e60455f30f0c616b0f05768b48336.svn-base new file mode 100644 index 0000000..2954d3c --- /dev/null +++ b/.svn/pristine/3a/3a5188930b3e60455f30f0c616b0f05768b48336.svn-base @@ -0,0 +1,394 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; + +namespace QMAPP.FJC.DAL.MD +{ + /// + /// 模块名称:物料信息 + /// 作 者:张鹏 + /// 编写日期:2017年09月08日 + /// + public class MaterialDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Material Get(Material info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Material Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_MATERIAL] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Material GetWithAnyFormate(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_MATERIAL] WHERE REPLACE(REPLACE(REPLACE([MATERIAL_CODE],'.',''),' ',''),'-','')=@materialcode"; + List parameters = new List(); + materialcode = materialcode.Replace(".", "").Replace("-", "").Replace(" ", ""); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Material GetWithAnyFormateTo(string materialcode) + { + try + { + List parameters = new List(); + var valuestr = materialcode.Split('/'); + var code = string.Empty; + var code2 = string.Empty; + if (valuestr.Count() > 1) + { + code = valuestr[0]; + code2 = valuestr[1]; + } + var sql2 = $" select * from T_MD_BARCODERULES where REGEX = '{code}' or REGEX = '{code2}'"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var table = session.GetTable(sql2, parameters.ToArray()); + if (table.Rows.Count > 0) + { + using (IDataSession session2 = AppDataFactory.CreateMainSession()) + { + string sql = $"SELECT * FROM [T_MD_MATERIAL] WHERE MATERIAL_CODE='{table.Rows[0]["MATERIAL_CODE"].ToString()}'"; + + //获取信息 + var info = session2.Get(sql, parameters.ToArray()); + return info; + } + } + else + return null; + } + + + + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(Material condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(Material condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,MATERIAL_CODE,MATERIAL_TYPE_CODE,UNIT_CODE,MATERIAL_NAME,MATERIAL_COMP,REMARK,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE,OUTSOURCE,STD_QTY "); + sqlBuilder.Append("FROM T_MD_MATERIAL "); + whereBuilder.Append(" AND FLGDEL<> '1' "); + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(Material info) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql(info, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "Material"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(Material info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_MATERIAL"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(Material info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(Material info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(Material info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_MATERIAL "); + sqlBuilder.Append("SET FLGDEL = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入 + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (Material info in list) + { + if (info.IsNewInfo) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + #endregion + + } +} diff --git a/.svn/pristine/3a/3ad277c960ce3d5b8eff855bb0e92fd94abeffa4.svn-base b/.svn/pristine/3a/3ad277c960ce3d5b8eff855bb0e92fd94abeffa4.svn-base new file mode 100644 index 0000000..a323f8e --- /dev/null +++ b/.svn/pristine/3a/3ad277c960ce3d5b8eff855bb0e92fd94abeffa4.svn-base @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + ///  + /// 作 用:投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月24日 + /// + public partial class InjectionMoldingNEWForm : Form + { + RawMaterial searchModel = new RawMaterial();//查询条件 + + /// + /// + /// + public InjectionMoldingNEWForm() + { + InitializeComponent(); + } + + #region 窗体载入 + + private void Form_Load(object sender, EventArgs e) + { + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + ////加载注塑设备列表 + //this.comMachine.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType_M.Injection.GetHashCode().ToString() }, true); + //this.comMachine.DisplayMember = "MACHINENAME"; + //this.comMachine.ValueMember = "MACHINECODDE"; + //加载操作人 + //this.comOpereator.DataSource = basicData.GetOperatorInfoList(EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(), true); ; + //this.comOpereator.DisplayMember = "OPERATOR"; + //this.comOpereator.ValueMember = "PID"; + #endregion + //初始化条件 + this.dtpCreateUserStart.ValueX = DateTime.Now.AddDays(-10); + this.dtpCreateUserEnd.ValueX = DateTime.Now; + //初始化分页 + this.pager1.Init(); + //加载默认查询条件 + SetSearchModel(); + BindGirdData(); + } + + + #endregion + + #region 绑定数据 + + private DataPage BindGirdData() + { + List recorders = null;//查询结果列表 + DataPage dataPage = new DataPage(); + var dataresle = new DataResult(); + //获取前台分页设置信息 + dataPage = pager1.DataPage; + try + { + #region 服务查询 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + dataresle = agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_GetList.ToString(), searchModel, dataPage); + dataPage = dataresle.Result; + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGView.DataSource = recorders; + this.pager1.DataPage = dataPage; + } + catch (Exception ex) + { + throw ex; + } + return dataPage; + } + + #endregion + /// + /// 分页事件 + /// + /// + /// + private DataPage pager1_EventPaging(Controls.EventPagingArg e) + { + return BindGirdData(); + } + + /// + /// 查询事件 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + SetSearchModel(); + this.pager1.Init(); + BindGirdData(); + } + + /// + /// 设置查询条件 + /// + private void SetSearchModel() + { + searchModel = new RawMaterial(); + + //料筒 + if (string.IsNullOrEmpty(this.txtBucketCode.Text.Trim()) == false) + { + searchModel.BucketCode = this.txtBucketCode.Text.Trim(); + } + //批次 + if (string.IsNullOrEmpty(this.txtBatch.Text.Trim()) == false) + { + searchModel.BatchCode = this.txtBatch.Text.Trim(); + } + //开始时间 + if (string.IsNullOrEmpty(this.dtpCreateUserStart.Text.Trim()) == false) + { + searchModel.CreateDateStart = Convert.ToDateTime(this.dtpCreateUserStart.Text).ToString("yyyy-MM-dd").Trim(); + } + //结束时间 + if (string.IsNullOrEmpty(this.dtpCreateUserEnd.Text.Trim()) == false) + { + searchModel.CreateDateEnd = Convert.ToDateTime(this.dtpCreateUserEnd.Text).AddDays(1).ToString("yyyy-MM-dd").Trim(); + } + } + + /// + /// 删除 + /// + /// + /// + private void tsbDelete_Click(object sender, EventArgs e) + { + if (this.DGView.SelectedRows.Count <= 0) + return; + if (MessageBox.Show(Resource1.ConfirmDelete, Resource1.ConfirmTitle, MessageBoxButtons.OKCancel) != DialogResult.OK) + return; + + #region 执行删除 + string selectKey = this.DGView.SelectedRows[0].Cells["Pid"].Value.ToString(); + //删除校验判断该投料批次号是否已经生产出产品,如果已生产出产品则不允许删除,如果不允许则弹出提示'该批次号物料已使用,不能删除!' + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult result = agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Delete.ToString(), selectKey); + MessageBox.Show(result.Msg); + if (result.IsSuccess && result.Result >0) + { + BindGirdData(); + } + + #endregion + } + + /// + /// 打开投料 + /// + /// + /// + private void tsbAdd_Click(object sender, EventArgs e) + { + InjectionMoldingNEWEditForm editForm = new InjectionMoldingNEWEditForm(); + DialogResult result = editForm.ShowDialog(); + if (result == System.Windows.Forms.DialogResult.OK)//判断是否投料窗口已做操作 + { + this.pager1.Init(); + BindGirdData(); + } + } + + /// + /// 打开编辑 + /// + /// + /// + private void tsbEdit_Click(object sender, EventArgs e) + { + if (this.DGView.SelectedRows.Count > 0) + { + string selectKey = this.DGView.SelectedRows[0].Cells["Pid"].Value.ToString(); + InjectionMoldingNEWEditForm1 editForm = new InjectionMoldingNEWEditForm1(selectKey); + DialogResult result = editForm.ShowDialog(); + if (result == System.Windows.Forms.DialogResult.OK)//判断是否投料窗口已做操作 + { + this.pager1.Init(); + BindGirdData(); + } + } + } + + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + } +} diff --git a/.svn/pristine/3c/3c2d2d09d3cdd23c6c862a492083a107275b1b6b.svn-base b/.svn/pristine/3c/3c2d2d09d3cdd23c6c862a492083a107275b1b6b.svn-base new file mode 100644 index 0000000..6fc5d43 --- /dev/null +++ b/.svn/pristine/3c/3c2d2d09d3cdd23c6c862a492083a107275b1b6b.svn-base @@ -0,0 +1,78 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + + +
+ <%=Html.QV(p => p.BucketCode)%> + + <%=Html.QC(p => p.BucketCode)%> + + <%=Html.QV(p => p.PartCode)%> + + <%=Html.QC(p => p.PartCode)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("RawMaterial", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("RawMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("RawMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("RawMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/3c/3cb6e493c00861174fa2d48123dc86c6bcfd39f3.svn-base b/.svn/pristine/3c/3cb6e493c00861174fa2d48123dc86c6bcfd39f3.svn-base new file mode 100644 index 0000000..4436f46 --- /dev/null +++ b/.svn/pristine/3c/3cb6e493c00861174fa2d48123dc86c6bcfd39f3.svn-base @@ -0,0 +1,82 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + +
+ <%=Html.QV(p => p.MaterialCode)%> + + <%=Html.QC(p => p.MaterialCode)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("BucketMaterialClass", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("BucketMaterialClass", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("BucketMaterialClass", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("BucketMaterialClass", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/3c/3cd3dd3a4239d1483a06c7a5065cb8070fb9e573.svn-base b/.svn/pristine/3c/3cd3dd3a4239d1483a06c7a5065cb8070fb9e573.svn-base new file mode 100644 index 0000000..90672b5 Binary files /dev/null and b/.svn/pristine/3c/3cd3dd3a4239d1483a06c7a5065cb8070fb9e573.svn-base differ diff --git a/.svn/pristine/3c/3cf26521083b3cce2fb0f291a5b4ba6f82458269.svn-base b/.svn/pristine/3c/3cf26521083b3cce2fb0f291a5b4ba6f82458269.svn-base new file mode 100644 index 0000000..8bed05b --- /dev/null +++ b/.svn/pristine/3c/3cf26521083b3cce2fb0f291a5b4ba6f82458269.svn-base @@ -0,0 +1,316 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + 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 + + + + True + + + True + + + True + + + True + + + True + + + True + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFJRTUZyYW1lV29yay5EYXRhLkF0dHJpYnV0ZXMsIFZlcnNpb249 + MS4zLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAZUU1GcmFtZVdv + cmsuRGF0YS5EYXRhUGFnZQoAAAAaPFBhZ2VJbmRleD5rX19CYWNraW5nRmllbGQZPFBhZ2VTaXplPmtf + X0JhY2tpbmdGaWVsZBo8UGFnZUNvdW50PmtfX0JhY2tpbmdGaWVsZBw8UmVjb3JkQ291bnQ+a19fQmFj + a2luZ0ZpZWxkGDxLZXlOYW1lPmtfX0JhY2tpbmdGaWVsZB88U29ydEV4cHJlc3Npb24+a19fQmFja2lu + Z0ZpZWxkFzxSZXN1bHQ+a19fQmFja2luZ0ZpZWxkGTxDb3VudFNxbD5rX19CYWNraW5nRmllbGQbPElz + UGFyYWxsZWw+a19fQmFja2luZ0ZpZWxkIjxBY2N1cmF0ZVBhcnRpdGlvbj5rX19CYWNraW5nRmllbGQA + AAAAAQECAQAACAgICAEBAgAAAAEAAAAyAAAAAAAAAAAAAAAKCgoKAAAL + + + + 25 + + \ No newline at end of file diff --git a/.svn/pristine/3d/3d13cfbeb62be84878a48af03f4af7905c0be346.svn-base b/.svn/pristine/3d/3d13cfbeb62be84878a48af03f4af7905c0be346.svn-base new file mode 100644 index 0000000..1eadf45 --- /dev/null +++ b/.svn/pristine/3d/3d13cfbeb62be84878a48af03f4af7905c0be346.svn-base @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using SpeechLib; + +namespace Stone.WinModuleTransWare +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + public void Speek(string txt) + { + try + { + SpVoice m_spVoice = new SpVoice(); + m_spVoice.Volume = 100; + m_spVoice.Rate = 0; + m_spVoice.Speak(txt, SpeechVoiceSpeakFlags.SVSFlagsAsync);//开始 + + //SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine(); + //SpeechSynthesizer speech = new SpeechSynthesizer(); + //speech.Rate = 0;//速度 + //speech.Volume = 100;//音量,0-100 + + //speech.SpeakAsync("欢迎使用电力安全工器具集约化智能管控系统");//异步播放 + //Thread.Sleep(2000); + //speech.SpeakAsyncCancelAll();//停止前面的所有播放 + //speech.SpeakAsync("中华人民共和国");//异步播放,但是要等到前面的发音完成后才会播放该发音 + + //speech.Speak("欢迎使用电力安全工器具集约化智能管控系统"); + //speech.Speak("中华人民共和国"); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + + private void button1_Click(object sender, EventArgs e) + { + Speek(textBox1.Text); + } + } +} diff --git a/.svn/pristine/3e/3e42fe56b587e21c022e57aa0af77537df476252.svn-base b/.svn/pristine/3e/3e42fe56b587e21c022e57aa0af77537df476252.svn-base new file mode 100644 index 0000000..291f7db --- /dev/null +++ b/.svn/pristine/3e/3e42fe56b587e21c022e57aa0af77537df476252.svn-base @@ -0,0 +1,528 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Basic; +using QMFrameWork.Data; +using QMFrameWork.Common.Serialization; +using System.Linq; +using QMAPP.WinForm.Forms.Operation; +using System.IO.Ports; +using System.Management; +using System.Threading; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M11-2 + /// 作 用:搪塑条码打印 + /// 作 者:王庆男 + /// 编写日期:2015年05月28日 + /// + public partial class SlushMoldingPrintForOldForm : Form + { + + + /// + /// 车型,A:B9车型,B:Q5车型 + /// + public string CarType { set; get; } + + List moldConfigList; + + /// + /// 新建 + /// + public SlushMoldingPrintForOldForm() + { + InitializeComponent(); + moldConfigList = new List(); + } + + /// + /// 窗体初始化 + /// + private void InitForm() + { + //预留方法,用于B9\Q5功能差异 + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + InitForm(); + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + List recorders = null; + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + recorders = recorders.OrderBy(o => o.INDEXVALUE).ToList(); + moldConfigList = recorders; + + #region 绑定下拉列表 + + BasicData basicData = new BasicData(); + //加载搪塑设备列表 + //this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType.tangsu.GetHashCode().ToString() }, true); + //this.comMachineCode.DisplayMember = "MACHINENAME"; + //this.comMachineCode.ValueMember = "MACHINECODDE"; + //this.comMachineCode.SelectedIndex = 1; + //this.comMachineCode.Enabled = false; + + var machinelist = basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachineCode.DataSource = machinelist; + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + + + + //颜色 + this.comColor.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.COLOR.ToString()); + this.comColor.DisplayMember = "VALUE"; + this.comColor.ValueMember = "KEY"; + this.comColor.SelectedValue = "1"; + //this.comColor.Enabled = false; + ////AB腔 + this.comPosition.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.CAVITYTYPE.ToString()); + this.comPosition.DisplayMember = "VALUE"; + this.comPosition.ValueMember = "KEY"; + //this.comPosition.SelectedIndex = 0; + //this.comPosition.Enabled = false; + + + #endregion + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text)) + { + this.dtpDate.Text = DateTime.Now.ToString(); + } + + SetMouldStation(); + + + #region 打印模板拷贝 + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("SlushMoldingPrintForOldForm"); + + #endregion + } + + #region 设置模架号 + /// + /// + /// + private void SetMouldStation() + { + this.cBoxModelCode.DisplayMember = "VALUE"; + this.cBoxModelCode.ValueMember = "KEY"; + List cBoxModelCodeList = new List(); + foreach (var m in moldConfigList) + { + cBoxModelCodeList.Add(new { VALUE = m.MOLDVALUE, KEY = m.MOLDVALUE }); + } + this.cBoxModelCode.DataSource = cBoxModelCodeList; + this.cBoxModelCode.SelectedIndex = 0; + cBoxModelCode.Enabled = false; + + + this.comMouldNumber.DisplayMember = "VALUE"; + this.comMouldNumber.ValueMember = "KEY"; + List comMouldNumberList = new List(); + foreach (var m in moldConfigList) + { + comMouldNumberList.Add(new { VALUE = m.MOLDSTATION, KEY = m.MOLDSTATION }); + } + this.comMouldNumber.DataSource = comMouldNumberList; + this.comMouldNumber.SelectedIndex = 0; + + //判断是否有正在使用的模腔配置信息 + if (moldConfigList.Count(o => o.USED == 1) > 0) + { + //获取该对象 + MoldConfig m = moldConfigList.First(o => o.USED == 1); + //设置模架选择项 + comMouldNumber.SelectedValue = m.MOLDSTATION; + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + } + #endregion + + #region 窗体保存事件 + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + string message = this.ErrorCheck(); + if (!string.IsNullOrEmpty(message)) + { + this.ErrorMessage.Text = message; + return; + } + List listRecorder = new List(); + //窗体数据校验 + //老搪塑只出黑色表皮,模腔号2 为高配B腔 模腔号3 为低配A腔,老搪塑只有一套模具,固定即可 + //搪塑机 + MachineInfo machineInfo = this.comMachineCode.SelectedItem as MachineInfo; + + #region 加载保存信息 + //for (int i = 0; i < 2; i++)//一次出2个码 + //{ + //零件属性 + Product recorder = new Product(); + ProductAttribute productAttribute = new ProductAttribute(); + //搪塑机编号 + productAttribute.VAL1 = machineInfo.MACHINENUM; + //产品类型(车型)成都固定 + productAttribute.VAL2 = "V"; + //高低配 成都无,且固定 + productAttribute.VAL3 = "B"; + //颜色 + productAttribute.VAL4 = this.comColor.SelectedValue.ToString(); + + string[] cb = new string[] { }; + if (!string.IsNullOrEmpty(this.cBoxModelCode.Text)) + { + cb = this.cBoxModelCode.Text.Split('+'); + } + if (cb.Length <= 0) + { + MessageBox.Show("模腔出错!"); + return; + } + + //腔 + //if (i == 0)//第一个为模腔号2 + //{ + // //腔 + // productAttribute.VAL5 = "B"; + + // //模腔 + // productAttribute.VAL6 = cb[0].PadLeft(2,'0'); + //} + //else + //{ + // //腔 + // productAttribute.VAL5 = "A"; + // //模腔 + // productAttribute.VAL6 = cb[1].PadLeft(2, '0'); + //} + + if (this.comPosition.Text == "搪塑B腔")//第一个为模腔号2 + { + //腔 + productAttribute.VAL5 = "B"; + + //模腔 + productAttribute.VAL6 = cb[0].PadLeft(2, '0'); + } + else if (this.comPosition.Text == "搪塑A腔") + { + //腔 + productAttribute.VAL5 = "A"; + //模腔 + productAttribute.VAL6 = cb[1].PadLeft(2, '0'); + } + + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text.Trim())) + { + productAttribute.VAL7 = Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + productAttribute.VAL7 = Convert.ToDateTime(this.dtpDate.Text.Trim()).ToString("yyyy-MM-dd HH:mm:ss"); + } + + recorder.MACHINECODDE = machineInfo.MACHINECODDE; + recorder.MACHINENAME = machineInfo.MACHINENAME; + recorder.PRODUCTSOURCE = EnumGeter.PRODUCTSOURCE.SELFMADE.GetHashCode().ToString(); + recorder.PRODUCTTYPE = EnumGeter.ProductType.biaopi.GetHashCode().ToString(); + + ////添加加物料号 + //QMAPP.ServicesAgent.ServiceAgent agents = ClientContext.GetServiceAgent(); + //DataResult materialcode = agents.InvokeServiceFunction>(B9BasicService.MaterialCodeBLL_GetMaterialCode.ToString(), productAttribute.VAL2); + //recorder.MATERIAL_CODE = materialcode.Result.ToString(); + + recorder.STATUS = EnumGeter.PRODUCTSTAUTS.QUALIFIED.GetHashCode().ToString(); + recorder.CURRENTPROCESS = EnumGeter.ProcessType.lengdaoruohua.GetHashCode().ToString(); + //ToDo:选择生产线 + //成都固定生产线 + recorder.PRODUCELINE = "IPVW371"; + + recorder.OUTFLAG = EnumGeter.PRODUCTOUTFLAG.INLIBRARY.GetHashCode().ToString(); + recorder.USINGSTATE = EnumGeter.PRODUCTUSESTATE.UNUSED.GetHashCode().ToString(); + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE; + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME; + recorder.CAPACITY = 1; + recorder.USINGCOUNT = 0; + recorder.PRODUCTATTRIBUTE = productAttribute; + recorder.AddM = this.cbM.Checked; + listRecorder.Add(recorder); + //} + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult> result = agent.InvokeServiceFunction>>(B9BasicService.ProductBLL_InsertListEpidermis.ToString(), listRecorder); + + //保存成功 + if (result.IsSuccess) + { + + #region 打印条码 + + this.DialogResult = System.Windows.Forms.DialogResult.OK; + string barCode = result.Result.ToString(); + foreach (PrintCode item in result.Result) + { + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = item.MAINCODE + ",*" + item.PRODUCTCODE + "*" + "," + item.COLOR_CODE; + QM.Assist.PrintUtil.LabelList2.Add(ll); + + + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + } + + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "temPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "dataPath"].ToString + ()); + + #endregion + + #region 重新设置当前使用和列表信息 + + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + + #region 重新设置当前使用 + + + DataResult updateresult = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_UpdateNextUsed.ToString(), new MoldConfig() { MOLDSTATION = moldStation }); + + #endregion + + #region 绑定下拉列表 + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + moldConfigList = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + moldConfigList = moldConfigList.OrderBy(o => o.INDEXVALUE).ToList(); + + + SetMouldStation(); + + #endregion + + #endregion + + //MessageBox.Show("打印成功!"); + + this.ErrorMessage.Text = ""; + + } + else + { + MessageBox.Show(result.Msg); + } + #endregion + + #endregion + } + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 错误检测 + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + //判断条码是否为空 + + ////搪塑设备 + if (this.comMachineCode.SelectedValue == null || this.comMachineCode.SelectedValue == string.Empty) + { + strMessage += Resource1.SlushMachineNullValidate + "\r\n"; + } + ////产品类别 + //if (this.comProType.SelectedValue == null || this.comProType.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.ProductTypeNullValidate + "\r\n"; + //} + //颜色 + if (this.comColor.SelectedValue == null || this.comColor.SelectedValue == string.Empty) + { + strMessage += Resource1.ColorNullValidate + "\r\n"; + } + ////高低配 + //if (this.comHOrL.SelectedValue == null || this.comHOrL.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.HLNullValidate + "\r\n"; + //} + //腔 + if (this.comPosition.SelectedValue == null || this.comPosition.SelectedValue == string.Empty) + { + strMessage += Resource1.PositionNullValidate + "\r\n"; + } + ////模腔号 + //if (this.cBoxModelCode.Text == null || this.cBoxModelCode.Text == string.Empty) + //{ + // strMessage += Resource1.ModelCodeNullValidate + "\r\n"; + //} + + return strMessage; + #endregion + } + #endregion + + + /// + /// + /// + /// + /// + private void comMouldNumber_SelectedIndexChanged(object sender, EventArgs e) + { + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + MoldConfig m = moldConfigList.First(o => o.MOLDSTATION == moldStation); + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + + /// + /// + /// + /// + /// + /// + public object GetPropertyValue(object info, string field) + { + if (info == null) return null; + Type t = info.GetType(); + IEnumerable property = from pi in t.GetProperties() where pi.Name.ToLower() == field.ToLower() select pi; + return property.First().GetValue(info, null); + } + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachineCode.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachineCode.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + } +} diff --git a/.svn/pristine/3f/3f288f1a2b1c75df628fe82d231f1d3ef0f77cfc.svn-base b/.svn/pristine/3f/3f288f1a2b1c75df628fe82d231f1d3ef0f77cfc.svn-base new file mode 100644 index 0000000..4ab5081 --- /dev/null +++ b/.svn/pristine/3f/3f288f1a2b1c75df628fe82d231f1d3ef0f77cfc.svn-base @@ -0,0 +1,4704 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace QMAPP.ServicesAgent +{ + /// + /// 示例服务方法枚举 + /// + [Description("示例服务方法枚举")] + public enum ExampleService + { + /// + /// 获取用户列表 + /// + [Description("获取用户列表")] + UserManageBLL_GetList + } + + /// + /// 系统服务方法枚举 + /// + [Description("系统服务方法枚举")] + public enum SystemService + { + /// + /// 服务初始化 + /// + [Description("服务初始化")] + ServiceInit, + + #region 通知管理 + + /// + /// 获取通知信息 + /// + [Description("获取通知信息")] + NoticeManageBll_Get, + /// + /// 根据通知ID,从通知浏览记录表中,获取发送目标 + /// + [Description("根据通知ID,从通知浏览记录表中,获取发送目标 ")] + NoticeManageBll_GetSendaimIdList, + /// + /// 获取用户 + /// + [Description("获取用户")] + NoticeManageBll_GetUser, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_DeleteNotice, + + /// + /// 删除原附件 + /// + [Description("删除原附件")] + NoticeManageBll_DeleteFile, + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + NoticeManageBll_ExistsFile, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_Save, + + /// + /// 获取未读通知 + /// + [Description("获取未读通知")] + NoticeManageBll_GetNotReadNotice, + /// + /// 获取未读即时通知 + /// + [Description("获取未读即时通知")] + NoticeManageBll_GetNotReadInstantNotice, + /// + /// 获取通知列表 + /// + [Description("获取通知列表")] + NoticeManageBll_GetList, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowse, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowseModel, + /// + /// 更新通知浏览记录为已浏览 + /// + [Description("更新通知浏览记录为已浏览")] + NoticeManageBll_UpdateNoticeBrowse, + /// + /// 获取通知浏览记录列表 + /// + [Description("获取通知浏览记录列表")] + NoticeManageBll_GetBrowseList, + /// + /// 获取导出通知信息 + /// + [Description("获取导出通知信息")] + NoticeManageBll_GetExportData, + /// + /// 定时删除超过六个月的通知浏览记录 + /// + [Description("定时删除超过六个月的通知浏览记录")] + NoticeManageBll_DeleteNoticeBrowse, + /// + /// 获取联系人列表 + /// + [Description("获取联系人列表")] + NoticeManageBll_GetNoticeUserList, + /// + /// 获取组织结构树形集合 + /// + [Description("获取组织结构树形集合")] + NoticeManageBll_GetAllList, + #endregion + + #region 文件管理 + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileInfoBLL_Get, + + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + FileInfoBLL_ExistsFile, + + /// + /// 获取文件信息列表 + /// + [Description("获取文件信息列表")] + FileInfoBLL_GetList, + /// + /// 删除附件 + /// + [Description("删除附件")] + FileInfoBLL_DeleteFile, + /// + /// 删除文件信息 + /// + [Description("删除文件信息")] + FileInfoBLL_Delete, + /// + /// 获取导出文件信息 + /// + [Description("获取导出文件信息")] + FileInfoBLL_GetExportData, + + + /// + /// 插入文件信息 + /// + [Description("插入文件信息")] + FileInfoBLL_Insert, + /// + /// 更新文件信息 + /// + [Description("更新文件信息")] + FileInfoBLL_Update, + + #endregion + + #region 文件类型管理 + /// + /// 获取文件类型 + /// + [Description("获取文件类型")] + FileTypeBLL_Get, + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileTypeBLL_Delete, + /// + /// 获取文件类型树状列表 + /// + [Description("获取文件类型树状列表")] + FileTypeBLL_GetAllList, + + /// + /// 获取文件类型列表 + /// + [Description("获取文件类型列表")] + FileTypeBLL_GetList, + + /// + /// 插入文件类型 + /// + [Description("插入文件类型")] + FileTypeBLL_Insert, + + /// + /// 修改文件类型 + /// + [Description("修改文件类型")] + FileTypeBLL_Update, + + /// + /// 获取文件分类下拉列表 + /// + [Description("获取文件分类下拉列表")] + FileTypeBLL_GetCombox + #endregion + + } + + + #region 基础数据方法枚举 + + /// + /// 基础数据方法枚举 + /// + [Description("基础数据方法枚举")] + public enum DictService + { + #region 生产配置 + + /// + /// 插入 + /// + [Description("插入")] + AppConfigBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + AppConfigBLL_Update, + + #endregion + + #region + + /// + /// 插入 + /// + [Description("插入")] + TSWeighRecoreBLL_Insert, + + /// + /// 查询 + /// + [Description("查询")] + TSWeighRecoreBLL_GetList, + + #endregion + + + #region 注塑物料绑定信息 + /// + /// 插入 + /// + [Description("插入")] + BucketMaterialClassBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketMaterialClassBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketMaterialClassBLL_Delete, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialClassBLL_GetBucketMaterialList, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialClassBLL_GetList, + /// + /// 查询 + /// + [Description("查询")] + RawMaterialRecordBLL_GetListRecord, + /// + /// 查询 + /// + [Description("查询")] + RawMaterialBLL_GetListRaw, + + #endregion + + #region 注塑料筒绑定信息信息 + /// + /// 插入 + /// + [Description("插入")] + BucketMaterialBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketMaterialBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketMaterialBLL_Delete, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialBLL_GetBucketMaterialList, + + #endregion + + #region 注塑料筒信息 + /// + /// 插入 + /// + [Description("插入")] + BucketInfoBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketInfoBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketInfoBLL_Delete, + + #endregion + + #region 工厂信息 + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList, + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList1, + + /// + /// 获取工厂信息(字典) + /// + [Description("获取工厂字典")] + FactoryBLL_GetFactorys, + + /// + /// 获取工厂信息 + /// + [Description("获取工厂信息")] + FactoryBLL_Get, + + /// + /// 根据主键获取工厂信息 + /// + [Description("根据主键获取工厂信息")] + FactoryBLL_GetFactoryByPk, + + /// + /// 插入工厂信息 + /// + [Description("插入工厂信息")] + FactoryBLL_Insert, + + /// + /// 删除工厂信息 + /// + [Description("删除工厂信息")] + FactoryBLL_Delete, + /// + /// 更新工厂信息 + /// + [Description("工厂更新信息")] + FactoryBLL_Update, + + /// + /// 工厂信息导出 + /// + [Description("工厂信息导出")] + FactoryBLL_GetExportData, + + /// + /// 工厂信息导入 + /// + [Description("工厂信息导入")] + FactoryBLL_GetImportData, + + /// + /// 检验工厂编号是否重复 + /// + [Description("检验工厂编号")] + FactoryBLL_ExistsFactory, + /// + /// 根据工位查找工厂 + /// + [Description("根据工位查找工厂")] + DictManagerBLL_GetWerksList, + /// + /// 根据工厂查找工位 + /// + [Description("根据工厂查找工位")] + DictManagerBLL_GetWorkSationListFor, + #endregion + + #region 母车信息 + + + /// + /// 获取母车信息列表 + /// + [Description("获取母车信息列表")] + MotherCarTypeBLL_GetList, + + /// + /// 获取母车信息列表 + /// + [Description("获取母车字典")] + MotherCarTypeBLL_GetMotherCarTypes, + + /// + /// 获取母车信息 + /// + [Description("获取母车信息")] + MotherCarTypeBLL_Get, + + /// + /// 插入母车信息 + /// + [Description("插入母车信息")] + MotherCarTypeBLL_Insert, + + /// + /// 删除母车信息 + /// + [Description("删除母车信息")] + MotherCarTypeBLL_Delete, + /// + /// 更新母车信息 + /// + [Description("更新母车信息")] + MotherCarTypeBLL_Update, + + /// + /// 母车信息导出 + /// + [Description("母车信息导出")] + MotherCarTypeBLL_GetExportData, + + /// + /// 母车信息数据导入 + /// + [Description("母车信息数据导入")] + MotherCarTypeBLL_GetImportData, + + /// + /// 检验母车编号是否重复 + /// + [Description("检验母车编号")] + MotherCarTypeBLL_ExistsMotherCarType, + + #endregion + + #region 子车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子车信息列表")] + SonCarTypeBLL_GetList, + + /// + /// 获取子车信息 + /// + [Description("获取子车信息")] + SonCarTypeBLL_Get, + + /// + /// 获取子车信息 + /// + [Description("获取子车字典")] + SonCarTypeBLL_GetSonCarTypes, + + /// + /// 插入子车信息 + /// + [Description("插入子车信息")] + SonCarTypeBLL_Insert, + + /// + /// 删除子车信息 + /// + [Description("删除子车信息")] + SonCarTypeBLL_Delete, + /// + /// 更新子车信息 + /// + [Description("更新子车信息")] + SonCarTypeBLL_Update, + + /// + /// 子车信息导出 + /// + [Description("子车信息导出")] + SonCarTypeBLL_GetExportData, + + /// + /// 子车信息数据导入 + /// + [Description("子车信息数据导入")] + SonCarTypeBLL_GetImportData, + + /// + /// 检验子车编号是否重复 + /// + [Description("检验子车编号")] + SonCarTypeBLL_ExistsSonCarType, + #endregion + + #region 子母车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子母车信息列表")] + MotherSonRelationManageBLL_GetList, + + /// + /// 获取子母车信息 + /// + [Description("获取子母车信息")] + MotherSonRelationManageBLL_Get, + + // + /// 子母车信息重复检验 + /// + [Description("子母车信息重复检验")] + MotherSonRelationManageBLL_ExistsMotherSonRelation, + + /// + /// 插入子母车信息 + /// + [Description("插入子母车信息")] + MotherSonRelationManageBLL_Insert, + + /// + /// 删除子母车信息 + /// + [Description("删除子母车信息")] + MotherSonRelationManageBLL_Delete, + /// + /// 更新子母车信息 + /// + [Description("更新子母车信息")] + MotherSonRelationManageBLL_Update, + + /// + /// 子母车信息导出 + /// + [Description("子母车信息导出")] + MotherSonRelationManageBLL_GetExportData, + + /// + /// 子母车信息数据导入 + /// + [Description("子母车信息数据导入")] + MotherSonRelationManageBLL_GetImportData, + + #endregion + + #region 退货原因信息 + + /// + /// 退货原因信息列表 + /// + [Description("获取退货原因信息列表")] + ReturnReasonManageBLL_GetList, + + /// + ///退货原因信息 + /// + [Description("获取退货原因信息")] + ReturnReasonManageBLL_Get, + + /// + /// 插入退货原因信息 + /// + [Description("插入退货原因信息")] + ReturnReasonManageBLL_Insert, + + /// + /// 退货编号重复校验 + /// + [Description("退货编号重复校验")] + ReturnReasonManageBLL_ExistsReturnReason, + + /// + /// 删除退货原因信息 + /// + [Description("删除退货原因信息")] + ReturnReasonManageBLL_Delete, + /// + /// 更新退货原因信息 + /// + [Description("更新退货原因信息")] + ReturnReasonManageBLL_Update, + + /// + /// 子退货原因信息导出 + /// + [Description("退货原因信息导出")] + ReturnReasonManageBLL_GetExportData, + + /// + /// 子退货原因信息数据导入 + /// + [Description("子退货原因信息数据导入")] + ReturnReasonManageBLL_GetImportData, + #endregion + + #region 要货地信息 + + /// + /// 要货地信息列表 + /// + [Description("获取要货地信息列表")] + PlacedisManageBLL_GetList, + + /// + ///要货地信息 + /// + [Description("获取要货地信息")] + PlacedisManageBLL_Get, + + /// + /// 插入要货地信息 + /// + [Description("插入要货地信息")] + PlacedisManageBLL_Insert, + + /// + /// 删除要货地信息 + /// + [Description("删除要货地信息")] + PlacedisManageBLL_Delete, + + /// + /// Sap同步要货地信息 + /// + [Description("Sap同步要货地信息")] + PlacedisManageBLL_SapSyn, + + /// + /// 更新要货地信息 + /// + [Description("更新要货地信息")] + PlacedisManageBLL_Update, + + /// + /// 要货地信息导出 + /// + [Description("要货地信息导出")] + PlacedisManageBLL_GetImportData, + + /// + /// 要货地信息导入 + /// + [Description("要货地信息导入")] + PlacedisManageBLL_GetExportData, + + /// + /// 获要货信息列表 + /// + [Description("获要货信息列表")] + DictManagerBLL_GetPlaceDisList, + + [Description("获要货信息列表根据权限")] + DictManagerBLL_GetReqPlaceList, + + /// + /// 转换包装台和仓库对应 + /// + [Description("转换包装台和仓库对应")] + DictManagerBLL_GetCpackPlaceList2, + #endregion + + #region 仓库信息 + + /// + /// 获取仓库信息列表 + /// + [Description("获取仓库信息列表")] + CorpManageBLL_GetList, + + [Description("获取仓库信息列表")] + DictManagerBLL_GetAllCorpList, + + [Description("根据用户获取仓库信息列表")] + DictManagerBLL_GetCorpList, + /// + /// 获取仓库信息 + /// + [Description("获取仓库信息")] + CorpManageBLL_Get, + /// + /// 获取仓库信息 + /// + [Description("获取仓库相关工厂信息")] + CorpManageBLL_GetCorpRelation, + /// + /// 插入仓库信息 + /// + [Description("插入仓库信息")] + CorpManageBLL_Insert, + + /// + /// 删除仓库信息 + /// + [Description("删除仓库信息")] + CorpManageBLL_Delete, + /// + /// 更新仓库信息 + /// + [Description("仓库更新信息")] + CorpManageBLL_Update, + + /// + /// 仓库信息导出 + /// + [Description("仓库信息导出")] + CorpManageBLL_GetExportData, + + /// + /// 仓库信息入 + /// + [Description("仓库信息导入")] + CorpManageBLL_GetImportData, + + [Description("仓库权限")] + CorpManageBLL_UserCorp, + #endregion + + #region 区域信息 + + /// + /// 获取区域信息列表 + /// + [Description("获取区域信息列表")] + StorageAreaManageBLL_GetList, + + /// + /// 获取区域信息 + /// + [Description("获取区域信息")] + StorageAreaManageBLL_Get, + + /// + /// 插入区域信息 + /// + [Description("插入区域信息")] + StorageAreaManageBLL_Insert, + + /// + /// 删除区域信息 + /// + [Description("删除区域信息")] + StorageAreaManageBLL_Delete, + /// + /// 更新区域信息 + /// + [Description("区域更新信息")] + StorageAreaManageBLL_Update, + + /// + /// 区域信息导出 + /// + [Description("区域信息导出")] + StorageAreaManageBLL_GetExportData, + + /// + /// 区域信息入 + /// + [Description("区域信息导入")] + StorageAreaManageBLL_GetImportData, + #endregion + + #region 框架协议 + + /// + /// 获取框架协议列表 + /// + [Description("获取框架协议列表")] + SourceListBLL_GetList, + + /// + /// 删除框架协议列表 + /// + [Description("删除框架协议列表")] + SourceListBLL_Delete, + + /// + /// 获取框架协议 + /// + [Description("获取框架协议")] + SourceListBLL_Get, + + /// + /// 更新框架协议 + /// + [Description("更新框架协议")] + SourceListBLL_Update, + + /// + /// 添加框架协议 + /// + [Description("添加框架协议")] + SourceListBLL_Insert, + + /// + /// 单条同步 + /// + [Description("单条同步")] + SourceListBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + SourceListBLL_AllSynData, + + #endregion + + #region BESI数据 + /// + /// 获取BESI数据列表 + /// + [Description("获取框架协议列表")] + BESIBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + BESIBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + BESIBLL_AllSynData, + #endregion + + #region 零件信息 + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageBLL_StopRecover, + #endregion + + #region 零件信息ForPAD + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageForPADBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageForPADBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageForPADBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageForPADBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageForPADBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageForPADBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageForPADBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageForPADBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageForPADBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageForPADBLL_StopRecover, + #endregion + + #region 零件类别 + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表字典")] + MaterialSortManageBLL_GetMatSorts, + + /// + /// 获取零件类别(根据用户过滤) + /// + [Description("获取零件类别(根据用户过滤)")] + DictManagerBLL_GetMaterialSort, + + [Description("获取零件类别(根据工厂、仓库、工位、路线、零件号)")] + DictManagerBLL_GetMaterialSortFor, + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表")] + MaterialSortManageBLL_GetList, + + /// + /// 获取零件类别信息 + /// + [Description("获取零件类别信息")] + MaterialSortManageBLL_Get, + + /// + /// 获取零件类别s + /// + [Description("获取零件类别")] + DictManagerBLL_GetAllMaterialSort, + + /// + /// 插入零件类别信息 + /// + [Description("插入零件类别信息")] + MaterialSortManageBLL_Insert, + + /// + /// 删除零件类别信息 + /// + [Description("删除零件类别信息")] + MaterialSortManageBLL_Delete, + /// + /// 零件类别更新信息 + /// + [Description("零件类别更新信息")] + MaterialSortManageBLL_Update, + + /// + /// 零件类别信息导出 + /// + [Description("零件类别导出")] + MaterialSortManageBLL_GetExportData, + + /// + /// 零件类别信息导入 + /// + [Description("零件类别导入")] + MaterialSortManageBLL_GetImportData, + + #endregion + + #region 工位信息 + /// + /// 获取工位信息列表(数据源) + /// + [Description("获取工位信息列表(数据源)")] + WorkStationManageBLL_GetCombox, + /// + /// 获取工位信息列表 + /// + [Description("获取工位信息列表")] + WorkStationManageBLL_GetList, + + /// + /// 获取工位信息列表 + /// + [Description("工位同步")] + WorkStationManageBLL_SapSyn, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationBLL_Get, + + /// + /// 插入工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_Insert, + + /// + /// 插入PAD工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_PADInsert, + + /// + /// 删除零件信息 + /// + [Description("删除工位信息")] + WorkStationManageBLL_Delete, + /// + /// 工位更新信息 + /// + [Description("工位更新信息")] + WorkStationManageBLL_Update, + + /// + /// 工位信息导出 + /// + [Description("工位信息导出")] + WorkStationManageBLL_GetExportData, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationManageBLL_Get, + + [Description("工位获取导入数据")] + WorkStationManageBLL_GetImportData, + + #endregion + + #region 路线信息 + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + LineManageBLL_GetList, + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + DictManagerBLL_GetAllLineList, + + [Description("根据用户及仓库获取路线信息列表")] + DictManagerBLL_GetLineList, + /// + /// 获取路线信息 + /// + [Description("获取路线信息")] + LineManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + LineManageBLL_GetLineByPk, + + /// + /// 插入路线信息 + /// + [Description("插入路线信息")] + LineManageBLL_Insert, + + /// + /// 删除路线信息 + /// + [Description("删除路线信息")] + LineManageBLL_Delete, + /// + /// 路线更新信息 + /// + [Description("路线更新信息")] + LineManageBLL_Update, + + /// + /// 路线信息导出 + /// + [Description("路线信息导出")] + LineManageBLL_GetExportData, + /// + /// 路线信息导入 + /// + [Description("路线信息导入")] + LineManageBLL_GetImportData, + #endregion + + #region 库位信息 + + /// + /// 获取库位信息列表 + /// + [Description("获取库位信息列表")] + StorageBinManageBLL_GetList, + + /// + /// 获取库位信息 + /// + [Description("获取库位信息")] + StorageBinBLL_Get, + + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + StorageBinManageBLL_GetStorageBinByPk, + + + /// + /// 插入库位信息 + /// + [Description("插入库位信息")] + StorageBinManageBLL_Insert, + + /// + /// 删除库位信息 + /// + [Description("删除库位信息")] + StorageBinManageBLL_Delete, + /// + /// 库位更新信息 + /// + [Description("库位更新信息")] + StorageBinManageBLL_Update, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn1, + /// + /// 库位信息导出 + /// + [Description("库位信息导出")] + StorageBinManageBLL_GetExportData, + + [Description("库位检查重复项")] + StorageBinManageBLL_CheckMaterialnoSingle, + + [Description("库位获取导入数据")] + StorageBinManageBLL_GetImportData, + + [Description("库位检查删除零件")] + StorageBinManageBLL_CheckdDeleteMaterial, + #endregion + + #region 零件高低储信息 + + /// + /// 获取零件高低储信息列表 + /// + [Description("获取零件高低储信息列表")] + MatLowerUpperManageBLL_GetList, + + /// + /// 获取零件高低储信息 + /// + [Description("获取零件高低储信息")] + MatLowerUpperBLL_Get, + + /// + /// 插入零件高低储信息 + /// + [Description("插入零件高低储信息")] + MatLowerUpperManageBLL_Insert, + + /// + /// 删除零件高低储信息 + /// + [Description("删除零件高低储信息")] + MatLowerUpperManageBLL_Delete, + /// + /// 零件高低储更新信息 + /// + [Description("零件高低储更新信息")] + MatLowerUpperManageBLL_Update, + + /// + /// 零件高低储信息导出 + /// + [Description("零件高低储信息导出")] + MatLowerUpperManageBLL_GetExportData, + + /// + /// 零件高低储信息导入 + /// + [Description("零件高低储信息导入")] + MatLowerUpperManageBLL_ImportData, + + #endregion + + #region 自制件器具信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + UtenSilManageBLL_GetCombox, + + /// + /// 获取自制件器具信息列表 + /// + [Description("获取自制件器具信息列表")] + UtenSilManageBLL_GetList, + + /// + /// 获取自制件器具信息 + /// + [Description("获取自制件器具信息")] + UtenSilManageBLL_Get, + + /// + /// 插入自制件器具信息 + /// + [Description("插入自制件器具信息")] + UtenSilManageBLL_Insert, + + /// + /// 删除自制件器具信息 + /// + [Description("删除自制件器具信息")] + UtenSilManageBLL_Delete, + /// + /// 自制件器具更新信息 + /// + [Description("自制件器具更新信息")] + UtenSilManageBLL_Update, + + /// + /// 自制件器具信息导出 + /// + [Description("自制件器具信息导出")] + UtenSilManageBLL_GetExportData, + + [Description("自制件器具信息导入")] + UtenSilManageBLL_GetImportData, + + #endregion + + #region 自制件零件相关信息 + + /// + /// 获取自制件零件相关信息列表 + /// + [Description("获取自制件零件相关信息列表")] + HMaterialManageBLL_GetList, + + /// + /// 获取自制件零件相关信息 + /// + [Description("获取自制件零件相关信息")] + HMaterialManageBLL_Get, + + /// + /// 插入自制件零件相关信息 + /// + [Description("插入自制件零件相关信息")] + HMaterialManageBLL_Insert, + + /// + /// 删除自制件零件相关信息 + /// + [Description("删除自制件零件相关信息")] + HMaterialManageBLL_Delete, + /// + /// 自制件零件相关更新信息 + /// + [Description("自制件零件相关更新信息")] + HMaterialManageBLL_Update, + + /// + /// 自制件零件相关信息导出 + /// + [Description("自制件零件相关信息导出")] + HMaterialManageBLL_GetExportData, + + /// + /// 自制件零件相关信息导入 + /// + [Description("自制件零件相关信息导入")] + HMaterialManageBLL_GetImportData, + #endregion + + #region 自制件发货地信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + HMatSendPlaceManageBLL_GetCombox, + + /// + /// 获取自制件发货地信息列表 + /// + [Description("获取自制件发货地信息列表")] + HMatSendPlaceManageBLL_GetList, + + /// + /// 获取自制件发货地信息 + /// + [Description("获取自制件发货地信息")] + HMatSendPlaceManageBLL_Get, + + /// + /// 插入自制件发货地信息 + /// + [Description("插入自制件发货地信息")] + HMatSendPlaceManageBLL_Insert, + + /// + /// 删除自制件发货地信息 + /// + [Description("删除自制件发货地信息")] + HMatSendPlaceManageBLL_Delete, + /// + /// 自制件发货地更新信息 + /// + [Description("自制件发货地更新信息")] + HMatSendPlaceManageBLL_Update, + + /// + /// 自制件发货地信息导出 + /// + [Description("自制件发货地信息导出")] + HMatSendPlaceManageBLL_GetExportData, + + /// + /// 自制件发货地信息导入 + /// + [Description("自制件发货地信息导入")] + HMatSendPlaceManageBLL_GetImportData, + + #endregion + + #region 转换包装台信息 + + /// + /// 获取转换包装台信息列表 + /// + [Description("获取转换包装台信息列表")] + CpackPlaceManageBLL_GetList, + + /// + /// 获取转换包装台信息 + /// + [Description("获取转换包装台信息")] + CpackPlaceManageBLL_Get, + + /// + /// 插入转换包装台信息 + /// + [Description("插入转换包装台信息")] + CpackPlaceManageBLL_Insert, + + /// + /// 删除转换包装台信息 + /// + [Description("删除转换包装台信息")] + CpackPlaceManageBLL_Delete, + /// + /// 转换包装台更新信息 + /// + [Description("转换包装台更新信息")] + CpackPlaceManageBLL_Update, + + /// + /// 转换包装台信息导出 + /// + [Description("转换包装台信息导出")] + CpackPlaceManageBLL_GetExportData, + + /// + /// 转换包装台信息导入 + /// + [Description("转换包装台信息导入")] + CpackPlaceManageBLL_ImportData, + + #endregion + + #region 转换包装关联关系信息 + + /// + /// 获取转换包装关联关系信息列表 + /// + [Description("获取转换包装关联关系信息列表")] + CpackageManageBLL_GetList, + + /// + /// 获取转换包装关联关系信息 + /// + [Description("获取转换包装关联关系信息")] + CpackBLL_Get, + + /// + /// 插入转换包装关联关系信息 + /// + [Description("插入转换包装关联关系信息")] + CpackageManageBLL_Insert, + + /// + /// 删除转换包装关联关系信息 + /// + [Description("删除转换包装关联关系信息")] + CpackageManageBLL_Delete, + /// + /// 转换包装关联关系更新信息 + /// + [Description("转换包装关联关系更新信息")] + CpackageManageBLL_Update, + + /// + /// 转换包装关联关系信息导出 + /// + [Description("转换包装关联关系信息导出")] + CpackageManageBLL_GetExportData, + + #endregion + + #region 转换包装台与零件关系信息 + + /// + /// 获取转换包装台与零件关系信息列表 + /// + [Description("获取转换包装台与零件关系信息列表")] + CpackPlaceMatManageBLL_GetList, + + /// + /// 获取转换包装台与零件关系信息 + /// + [Description("获取转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Get, + + /// + /// 插入转换包装台与零件关系信息 + /// + [Description("插入转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Insert, + + /// + /// 删除转换包装台与零件关系信息 + /// + [Description("删除转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Delete, + /// + /// 转换包装台与零件关系更新信息 + /// + [Description("转换包装台与零件关系更新信息")] + CpackPlaceMatManageBLL_Update, + + [Description("转换包装台获取仓库信息")] + CpackPlaceMatManageBLL_GetCpackPlace, + + /// + /// 转换包装台与零件关系信息导出 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_GetExportData, + /// + /// 转换包装台与零件关系信息导入 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_ImportData, + + [Description("转换包装台与零件关系信息同步SAP")] + CpackPlaceMatManageBLL_SapSyn, + MatLowerUpperManageBLL_Get, + WorkStationManageBLL_CheckSame, + StorageBinManageBLL_CheckSame, + StorageBinManageBLL_Get, + + + #endregion + + #region 货位类型信息 + + /// + /// 获取货位类型信息列表 + /// + [Description("获取货位类型信息列表")] + CargoTypeManageBLL_GetList, + + /// + /// 获取货位类型信息 + /// + [Description("获取货位类型信息")] + CargoTypeManageBLL_Get, + + /// + /// 插入货位类型信息 + /// + [Description("插入货位类型信息")] + CargoTypeManageBLL_Insert, + + /// + /// 删除货位类型信息 + /// + [Description("删除货位类型信息")] + CargoTypeManageBLL_Delete, + /// + /// 货位类型更新信息 + /// + [Description("货位类型更新信息")] + CargoTypeManageBLL_Update, + + [Description("货位类型导出")] + CargoTypeManageBLL_GetExportData, + + [Description("货位类型导入")] + CargoTypeManageBLL_ImportData, + #endregion + + #region 特殊配额 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + ZspqaBLL_GetList, + /// + /// 获取特殊配额信息 + /// + [Description("获取特殊配额信息")] + ZspqaBLL_Get, + /// + /// 插入 + /// + [Description("插入")] + ZspqaBLL_Insert, + /// + /// 更新 + /// + [Description("更新")] + ZspqaBLL_Update, + /// + /// 删除 + /// + [Description("删除")] + ZspqaBLL_Delete, + /// + /// 导入 + /// + [Description("导入")] + ZspqaBLL_ImportData, + /// + /// 导出 + /// + [Description("导出")] + ZspqaBLL_GetExportData, + /// + /// 获取配额表中零件号及信息 + /// + [Description("获取配额表中零件号及信息")] + ZspqaBLL_GetMaterListByQuota, + #endregion + + #region 配额管理 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + QuoTaBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + QuoTaBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + QuoTaBLL_AllSynData, + + #endregion + + #region 工位零件货位类型 + [Description("工位零件货位类型删除")] + MatstorageBinstationBLL_Delete, + + [Description("工位零件货位类型获取数据列表")] + MatstorageBinstationBLL_GetList, + + [Description("工位零件货位类型更新")] + MatstorageBinstationBLL_Update, + + [Description("工位零件货位类型添加")] + MatstorageBinstationBLL_Insert, + + [Description("工位零件货位类型导入")] + MatstorageBinstationBLL_GetImportData, + + [Description("工位零件货位类型导出")] + MatstorageBinstationBLL_GetExportData, + + [Description("删除货位类型校验")] + MatstorageBinstationBLL_CheckDeleteCargo, + + [Description("工位零件货位类型获取单条数据")] + MatstorageBinstationBLL_Get, + MatstorageBinstationBLL_GetDetail, + StorageBinManageBLL_CheckdArea, + WorkStationManageBLL_CheckMWID, + StorageBinManageBLL_Lock, + [Description("库位SAP同步")] + StorageBinManageBLL_SapSyn, + #endregion + + #region R3器具 + [Description("获取R3器具信息列表")] + R3UtenSilManageBLL_GetList, + R3UtenSilManageBLL_Insert, + R3UtenSilManageBLL_Delete, + R3UtenSilManageBLL_GetExportData, + R3UtenSilManageBLL_ImportData, + R3UtenSilManageBLL_SapSyn, + #endregion + + #region 要货类型 + [Description("获取列表")] + RequestTypeBLL_GetList, + RequestTypeBLL_Get, + RequestTypeBLL_Insert, + RequestTypeBLL_Update, + RequestTypeBLL_Delete, + RequestTypeBLL_ImportData, + RequestTypeBLL_GetExportData, + + #endregion + + #region 承运商车辆信息 + + [Description("获取列表")] + SendSplrBLL_Get, + SendSplrBLL_Search, + SendSplrBLL_Insert, + SendSplrBLL_Delete, + SendSplrBLL_Update, + SendSplrBLL_Import, + SendSplrBLL_GetExportData, + + #endregion + + #region DictManageBLL + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplrList, + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplr, + + DictManagerBLL_GetTruckNo, + + + #endregion + + #region 工位器具 + + /// + /// 获取工位器具信息列表 + /// + [Description("获取工位器具信息列表")] + WorkStationMaterialBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + WorkStationMaterialBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + WorkStationMaterialBLL_AllSynData, + + #endregion + + #region 零件同步 + + /// + /// 获取零件同步信息列表 + /// + [Description("获取零件同步信息列表")] + MatnrBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + MatnrBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + MatnrBLL_AllSynData, + #endregion + + #region CDK库存 + /// + /// 获取CDK库存信息列表 + /// + [Description("获取CDK库存信息列表")] + CKDStockBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + CKDStockBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + CKDStockBLL_AllSynData, + #endregion + + CKDBatchPriorityBLL_Get, + + CKDBatchPriorityBLL_Insert, + + CKDBatchPriorityBLL_Update, + + CKDBatchPriorityBLL_Delete, + + CKDBatchPriorityBLL_GetList, + + CKDBatchPriorityBLL_GetExportData, + + CKDBatchPriorityBLL_GetImportData, + + CKDBatchPriorityBLL_Forward, + + CKDBatchPriorityBLL_Backone, + + DictManageBLL_GetMachineListByProcessType, + + + } + + #endregion + + /// + /// 支持交互方法枚举 + /// + [Description("支持交互方法枚举")] + public enum SupportMutualService + { + [Description("获取问题类型信息")] + SIProblemTypeBLL_Get, + + [Description("获取问题类型列表")] + SIProblemTypeBLL_GetList, + + [Description("判断类型名称是否已经存在")] + SIProblemTypeBLL_CheckProblemTypeNameExist, + + + [Description("插入问题类型信息")] + SIProblemTypeBLL_Insert, + + [Description("更新问题类型信息")] + SIProblemTypeBLL_Update, + + [Description("删除问题类型信息")] + SIProblemTypeBLL_Delete, + + [Description("获取问题类型导出信息")] + SIProblemTypeBLL_GetExportData, + + [Description("搜索问题解决方案")] + SupportInteractionBLL_GetList, + + [Description("获取问题类型下拉列表")] + SupportInteractionBLL_GetTypeList, + + [Description("问题解决方案导出")] + SupportInteractionBLL_GetExportData, + + [Description("获取问题列表")] + SupportInteractionBLL_GetProblemList, + + [Description("插入问题")] + SupportInteractionBLL_Insert, + + [Description("更新问题")] + SupportInteractionBLL_Update, + + [Description("获取编辑信息")] + SupportInteractionBLL_GetInfo, + + [Description("判断选中的问题是否已经关闭")] + SupportInteractionBLL_CheckProblemClosed, + + [Description("校验选中问题的处理部门是否为当前用户部门")] + SupportInteractionBLL_CheckProblemDept, + + [Description("校验选中问题的处理人是否为当前用户")] + SupportInteractionBLL_CheckProblemUser, + + [Description("获取处理记录列表")] + SupportInteractionBLL_GetSIDealList, + + [Description("获取流程设置")] + WorkFlowBLL_GetWorkFlow, + + [Description("保存流程用户")] + WorkFlowBLL_WorkFlowBLL_SaveSelectOrganization, + + [Description("获取用户的处理机构")] + SupportInteractionBLL_GetCurrentHandleOrga, + + [Description("保存处理方法")] + SupportInteractionBLL_UpdateSupportInteraction, + + [Description("解决问题")] + SupportInteractionBLL_SloveSupportInteraction, + + [Description("获取流程设置信息")] + SIParamSetBLL_Get, + + [Description("保存支持交互参数设置")] + SIParamSetBLL_SaveSIParamSet, + + [Description(" 更新支持交互参数设置")] + SIParamSetBLL_UpdateSIParamSet, + + [Description("判断是否存在未解决的问题")] + OverTimeRemindBLL_CheckCurrenUserOverTime1Remind, + + [Description("判断是否存在未解决的问题2")] + OverTimeRemindBLL_CheckCurrenUserOverTime2Remind, + + } + + + #region 发运模块 + /// + /// 发运模块 + /// + [Description("发运模块")] + public enum FrmPlaceManage + { + /// + /// 发运模块列表查询 + /// + [Description("发运模块列表查询")] + FrmPlaceBLL_GetList, + + /// + /// 贴车单记录查询 + /// + [Description("贴车单记录查询")] + FrmPlaceBLL_GetPastecardInfoWithVin, + + /// + /// 贴车单记录明细查询 + /// + [Description("贴车单记录明细查询")] + FrmPlaceBLL_GetPasteDetails, + + /// + /// 实现校准功能 + /// + [Description(" 实现校准功能")] + FrmPlaceBLL_UpdateFisOrder, + + /// + /// 获取贴车单当天的总条数 + /// + [Description(" 获取贴车单当天的总条数")] + FrmPlaceBLL_GetPastecardNo, + + + /// + /// 获取发车信息 + /// + [Description(" 获取发车信息")] + FrmPlaceBLL_GetPastecardIndex, + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddPasteCard, + + + /// + /// 更新贴车单信息 + /// + [Description(" 更新贴车单信息")] + FrmPlaceBLL_UpdatePastecardIndex, + + + + /// + /// 获取下护板扫描表其他条码号 + /// + [Description(" 获取下护板扫描表其他条码号")] + FrmPlaceBLL_GetOhterCode, + + /// + /// 获取配置表中的规则类型值 + /// + [Description(" 获取配置表中的规则类型值")] + FrmPlaceBLL_GetRule, + + /// + /// 根据条码标识查询零件信息 + /// + [Description(" 根据条码标识查询零件信息")] + FrmPlaceBLL_GetSparepartsinfo, + + + /// + /// 判断条码是否重复 + /// + [Description(" 判断条码是否重复")] + FrmPlaceBLL_ExistBarcode, + + + /// + /// 打印条码 + /// + [Description(" 打印条码")] + FrmPlaceBLL_WriteFile, + + + + /// + /// 更新贴车单补打印时间 + /// + [Description(" 更新贴车单补打印时间")] + FrmPlaceBLL_UpdataBarcodeDate, + + + /// + /// 插入LOG + /// + [Description(" 插入LOG")] + FrmPlaceBLL_InsertLog, + + + /// + /// 获取扫取条形码是否存在 + /// + [Description(" 获取扫取条形码是否存在")] + FrmPlaceBLL_GetExitsCode, + + + /// + /// 查询是否为成品 + /// + [Description(" 查询是否为成品")] + FrmPlaceBLL_GetExitsStatus, + + + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddNewPasteCard, + + + /// + /// 获取工作中心 + /// + [Description(" 获取工作中心")] + FrmPlaceBLL_GetWORKCENTERCODE, + + + /// + /// 获取 DASPASTECARDINDEX表数据 + /// + [Description(" 获取 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_GetDaspssteCarIndexByPlanName, + + + /// + /// 插入 DASPASTECARDINDEX表数据 + /// + [Description(" 插入 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_InsertDaspssteCarIndexByPlanName, + + + /// + /// GetPastecardDeatis + /// + [Description(" GetPastecardDeatis")] + FrmPlaceBLL_GetPastecardDeatis, + + + + /// + /// 根据贴车单ID获取详细 + /// + [Description(" 根据贴车单ID获取详细")] + FrmPlaceBLL_GetPascardDetailsByPid, + + + /// + /// 修改补打时间 + /// + [Description(" 修改补打时间")] + FrmPlaceBLL_UpdatePasteCardPasteCardDate2Value, + + [Description("通过产品条码获取产品")] + FrmPlaceBLL_GetProductForSend, + + + [Description("通过总成条码获取产品")] + FrmPlaceBLL_GetProductByAssembleCode, + FrmPlaceBLL_GetTimeOutSet, + + } + #endregion 发运模块 + + #region 库存盘点 + /// + /// 库存盘点 + /// + [Description("库存盘点")] + public enum StocktakingManage + { + /// + /// 库存盘点查询汇总页面 + /// + [Description("库存盘点查询汇总页面")] + StocktakingBLL_GetList, + + /// + /// 添加盘点信息 + /// + [Description("添加盘点信息")] + StocktakingBLL_Insert, + + /// + /// 获取每日最新的计划单号 + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_GetPlanNoByDate, + + + + + + /// + /// 删除子表的数据根据PLANID + /// + [Description("添加盘点信息")] + StocktakingBLL_SubDelete, + + /// + /// 删除父表数据根据ID + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_Delete, + + /// + /// 添加盘点信息 + /// + [Description("插入详细信息(单表)")] + StocktakingBLL_SubInsert, + + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PID")] + StocktakingBLL_GetModel, + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PLANID")] + StocktakingBLL_GetSubModel, + + + + /// + /// 获取子页面详细列表 + /// + [Description("获取子页面详细列表")] + StocktakingBLL_GetSubList, + + + /// + /// 修改盘点信息页面 + /// + [Description("修改盘点信息页面")] + StocktakingBLL_Update, + + + /// + /// 获取盘点详细信息页面 + /// + [Description("获取盘点详细信息页面")] + StocktakingBLL_GetPanDetail, + + /// + /// 导出 + /// + [Description("导出")] + StocktakingBLL_GetExportData, + + + /// + /// 盘点信息对比结果 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_GetPanResultDetail, + + + /// + /// 盘点对比处理 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_detailCompareResult, + + + /// + /// 获取物料号 + /// + [Description("获取物料号")] + StocktakingBLL_GetMaterialList, + + /// + /// 删除 + /// + [Description("删除")] + StocktakingBLL_EditDelete, + + + + } + + #endregion 库存盘点 + + + #region 投料管理枚举 + /// + /// 投料管理枚举 + /// + [Description("投料管理枚举")] + public enum FeedInManage + { + #region 表皮查询 + /// + /// 表皮查询 + /// + [Description("表皮查询")] + EpidermisBLL_GetList, + + [Description("中控已完成")] + EpidermisBLL_UseComplete, + + /// + /// 表皮批次号修改 + /// + [Description("表皮批次号修改")] + EpidermisBLL_UpdateMaterial, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + EpidermisBLL_Get, + + /// + /// 表皮数据导出 + /// + [Description("表皮数据导出")] + EpidermisBLL_GetExportData, + + /// + /// 表皮投料信息获取 + /// + [Description("表皮投料信息获取")] + EpidermisBLL_GetProductInfectionList, + + #endregion + + #region 注塑投料记录 + + /// + /// 注塑投料记录查询 + /// + [Description("注塑投料记录查询")] + InjectionRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + InjectionRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + InjectionRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + InjectionRecorderBLL_Get, + /// + /// 注塑投料记录删除 + /// + [Description("注塑投料记录删除")] + InjectionRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + InjectionRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + InjectionRecorderBLL_GetProduceShiftList, + #endregion + + #region 搪塑投料记录 + + /// + /// 搪塑投料记录查询 + /// + [Description("搪塑投料记录查询")] + SlushRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + SlushRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + SlushRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + SlushRecorderBLL_Get, + /// + /// 搪塑投料记录删除 + /// + [Description("搪塑投料记录删除")] + SlushRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + SlushRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + SlushRecorderBLL_GetProduceShiftList, + #endregion + + #region 浇注投料记录 + + /// + /// 浇注投料记录查询 + /// + [Description("浇注投料记录查询")] + PouringRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + PouringRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + PouringRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + PouringRecorderBLL_Get, + /// + /// 浇注投料记录删除 + /// + [Description("浇注投料记录删除")] + PouringRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + PouringRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + PouringRecorderBLL_GetProduceShiftList, + + [Description("获取浇注投料记录")] + MainBLL_GetProductInfectionList, + + [Description("修改零件投料关联表批次号")] + MainBLL_UpdateMaterial, + #endregion + } + #endregion + + #region 生产管理枚举 + /// + /// 生产管理枚举 + /// + [Description("生产管理枚举")] + public enum ProduceManage + { + #region 生产记录维护 + /// + /// 生产记录维护查询列表 + /// + [Description("生产记录维护查询列表")] + ProducePlanBLL_GetList, + + /// + /// 统计 + /// + [Description("统计")] + ProducePlanBLL_GetTotal, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + ProducePlanBLL_Get, + + /// + /// 生产记录新建 + /// + [Description("生产记录新建")] + ProducePlanBLL_Insert, + + /// + /// 生产记录修改 + /// + [Description("生产记录修改")] + ProducePlanBLL_Update, + + /// + /// 生产记录完成 + /// + [Description("生产记录完成")] + ProducePlanBLL_ProductOver, + + /// + /// 生产记录删除 + /// + [Description("生产记录删除")] + ProducePlanBLL_Delete, + #endregion + + #region 不合格品记录查询 + /// + /// 不合格品记录查询列表 + /// + [Description("不合格品记录查询列表")] + UnQualityBLL_GetList, + + /// + /// 不合格品记录数据导出 + /// + [Description("不合格品记录数据导出")] + UnQualityBLL_GetExportData, + #endregion + } + #endregion + + #region 产品追溯 + /// + /// 产品追溯 + /// + [Description("产品追溯")] + public enum ProductPetrospect + { + #region 产品档案 + /// + /// 产品档案查询 + /// + [Description("产品档案查询")] + ProductArchivesBLL_GetProductParameter, + /// + /// 产品档案导出 + /// + [Description("产品档案导出")] + ProductArchivesBLL_GetExportData, + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + ProductArchivesBLL_GetMainInfo, + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + ProductArchivesBLL_GetMainOperationInfo, + #endregion + } + #endregion + + #region 报警管理枚举 + /// + /// 报警管理枚举 + /// + [Description("报警管理枚举")] + public enum WarnManage + { + #region 设备报警记录查询 + /// + /// 设备报警记录查询列表 + /// + [Description("不合格品记录查询列表")] + EquipMentAlarmBLL_GetList, + + /// + /// 设备报警记录数据导出 + /// + [Description("不合格品记录数据导出")] + EquipMentAlarmBLL_GetExportData, + #endregion + + #region 自动报警维护 + + #region 报警信息维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInfoList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInfoGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInfoInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInfoUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInfoDelete, + #endregion + + #region 报警类别维护 + + /// + /// 报警信息Page列表 + /// + [Description("报警信息Page列表")] + WarnManageBLL_GetAllWarnTypeList, + + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnTypeList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnTypeGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnTypeInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnTypeUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnTypeDelete, + #endregion + + #region 报警统治人员维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInformerList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInformerGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInformerInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInformerUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInformerDelete, + #endregion + + /// + /// 报警信息关闭 + /// + [Description("报警信息关闭")] + WarnManageBLL_WarnIsDone, + + /// + /// 报警信息发送 + /// + [Description("报警信息发送")] + WarnManageBLL_WarnIsSend, + + /// + /// 报警信息发送页面加载 + /// + [Description("报警信息发送页面加载")] + WarnManageBLL_GetWarnInformerListForSend, + + /// + /// 报警信息详情列表加载 + /// + [Description("报警信息详情列表加载")] + WarnManageBLL_GetWarnDetailList, + #endregion + + #region 设备停机记录 + /// + /// 设备停机记录查询 + /// + [Description("设备停机记录查询")] + EquipMentMaintainSearchBLL_GetList, + /// + /// 设备停机记录导出 + /// + [Description("设备停机记录导出")] + EquipMentMaintainSearchBLL_GetExportData, + #endregion + } + #endregion + + #region 视频播放枚举 + /// + /// 视频播放枚举 + /// + [Description("视频播放枚举")] + public enum VideoInfoEnum + { + #region 视频播放记录查询 + /// + /// 视频播放记录查询列表 + /// + [Description("视频播放记录查询列表")] + VideoInfoBLL_GetDataPageList, + + #endregion + + } + #endregion + + #region 在制品监控枚举 + /// + /// 在制品监控枚举 + /// + [Description("在制品监控枚举")] + public enum WIPManage + { + #region 低储报警信息 + /// + /// 低储报警信息查询 + /// + [Description("低储报警信息查询")] + StorageAlarmBLL_GetList, + /// + /// 低储报警信息导出 + /// + [Description("低储报警信息导出")] + StorageAlarmBLL_GetExportData, + #endregion + + #region 滞留品查询 + /// + /// 滞留品信息查询 + /// + [Description("滞留品信息查询")] + DetentionBLL_GetList, + /// + /// 滞留品信息导出 + /// + [Description("滞留品信息导出")] + DetentionBLL_GetExportData, + #endregion + + #region 在制品库存 + /// + /// 在制品库存 + /// + [Description("在制品库存")] + WIPInventoryBLL_GetList, + /// + /// 在制品入库信息工序列表 + /// + [Description("在制品入库信息工序列表")] + WIPInventoryBLL_GetProcessSetList, + /// + /// 在制品入库信息零件列表 + /// + [Description("在制品入库信息零件列表")] + WIPInventoryBLL_GetProductSetList, + /// + /// 在制品入库信息 + /// + [Description("在制品入库信息")] + WIPInRecorderBLL_GetList, + /// + /// 在制品出库信息 + /// + [Description("在制品出库信息")] + WIPOutRecorderBLL_GetList, + /// + /// 在制品库存导出列表 + /// + [Description("在制品库存导出列表")] + WIPInventoryBLL_GetExportData, + /// + /// 在制品入库信息导出列表 + /// + [Description("在制品入库信息导出列表")] + WIPInRecorderBLL_GetExportData, + /// + /// 在制品出库信息导出列表 + /// + [Description("在制品出库信息导出列表")] + WIPOutRecorderBLL_GetExportData, + #endregion + } + #endregion + + #region 基础信息方法枚举 + + /// + /// 基础信息方法枚举 + /// + [Description("基础信息方法枚举")] + public enum B9BasicService + { + #region 查找注塑投料记录 + /// + /// 查询注塑投料记录 + /// + [Description("查询注塑投料记录")] + RawMaterialRecordBLL_Get, + /// + /// 新增注塑投料记录 + /// + [Description("新增注塑投料记录")] + RawMaterialRecordBLL_Insert, + /// + /// 修改注塑投料记录 + /// + [Description("修改注塑投料记录")] + RawMaterialRecordBLL_Update, + /// + /// 删除注塑投料记录 + /// + [Description("删除注塑投料记录")] + RawMaterialRecordBLL_Delete, + /// + /// 查询注塑投料记录 + /// + [Description("查询注塑投料记录")] + RawMaterialRecordBLL_GetList, + + #endregion + + #region 查找注塑投料 + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_Get, + /// + /// 新增注塑投料 + /// + [Description("新增注塑投料")] + RawMaterialBLL_Insert, + /// + /// 修改注塑投料 + /// + [Description("修改注塑投料")] + RawMaterialBLL_Update, + /// + /// 删除注塑投料 + /// + [Description("删除注塑投料")] + RawMaterialBLL_Delete, + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_GetList, + + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_GetListTo, + #endregion + + #region 缺陷信息 + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetList, + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetAllList, + /// + /// 获取缺陷信息 + /// + [Description("获取缺陷信息")] + DefectDictBLL_Get, + /// + /// 缺陷信息插入 + /// + [Description("缺陷信息插入")] + DefectDictBLL_Insert, + /// + /// 缺陷信息更新 + /// + [Description("缺陷信息更新")] + DefectDictBLL_Update, + /// + /// 缺陷信息删除 + /// + [Description("缺陷信息删除")] + DefectDictBLL_Delete, + #endregion + + #region 物料号信息 + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetList, + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetAllList, + /// + /// 获取物料号信息 + /// + [Description("获取物料号信息")] + MaterielBLL_Get, + /// + /// 物料号信息插入 + /// + [Description("物料号信息插入")] + MaterielBLL_Insert, + /// + /// 物料号信息更新 + /// + [Description("物料号信息更新")] + MaterielBLL_Update, + /// + /// 物料号信息删除 + /// + [Description("物料号信息删除")] + MaterielBLL_Delete, + #endregion + + #region 设备信息 + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetMachineInfoList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllList, + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllListAndModels, + + /// + /// 获取设备信息 + /// + [Description("获取设备信息")] + MachineInfoBLL_Get, + /// + /// 设备信息插入 + /// + [Description("设备信息插入")] + MachineInfoBLL_Insert, + /// + /// 设备信息更新 + /// + [Description("设备信息更新")] + MachineInfoBLL_Update, + /// + /// 设备信息删除 + /// + [Description("设备信息删除")] + MachineInfoBLL_Delete, + + #endregion + + #region 设备模具信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MachineInfoModelBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MachineInfoModelBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MachineInfoModelBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MachineInfoModelBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MachineInfoModelBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MachineInfoModelBLL_GetImportData, + + #endregion + + #region 班次信息 + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetProductShiftList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetAllList, + + /// + /// 获取班次信息 + /// + [Description("获取班次信息")] + ProduceShiftBLL_Get, + /// + /// 班次信息插入 + /// + [Description("班次信息插入")] + ProduceShiftBLL_Insert, + /// + /// 班次信息更新 + /// + [Description("班次信息更新")] + ProduceShiftBLL_Update, + /// + /// 班次信息删除 + /// + [Description("班次信息删除")] + ProduceShiftBLL_Delete, + /// + /// 校验班次时间在数据库中是否存在 + /// + [Description("校验班次时间在数据库中是否存在")] + ProduceShiftBLL_ExistsProduceShiftTime, + #endregion + + #region 零件条码标识 + + /// + /// 零件条码标识信息查询列表 + /// + [Description("零件条码标识信息查询列表")] + ProductCodeIdentityBLL_GetList, + /// + /// 获取零件条码标识信息 + /// + [Description("获取零件条码标识信息")] + ProductCodeIdentityBLL_Get, + /// + /// 零件条码标识信息插入 + /// + [Description("零件条码标识信息插入")] + ProductCodeIdentityBLL_Insert, + /// + /// 零件条码标识信息更新 + /// + [Description("零件条码标识信息更新")] + ProductCodeIdentityBLL_Update, + /// + /// 零件条码标识信息删除 + /// + [Description("零件条码标识信息删除")] + ProductCodeIdentityBLL_Delete, + + #endregion + + #region 操作员信息 + + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetList, + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetAllList, + /// + /// 获取操作员信息 + /// + [Description("获取操作员信息")] + OperatorInfoBLL_Get, + /// + /// 操作员信息插入 + /// + [Description("操作员信息插入")] + OperatorInfoBLL_Insert, + /// + /// 操作员信息更新 + /// + [Description("操作员信息更新")] + OperatorInfoBLL_Update, + /// + /// 操作员信息删除 + /// + [Description("操作员信息删除")] + OperatorInfoBLL_Delete, + /// + /// daochu + /// + [Description("daochu")] + OperatorInfoBLL_GetExportData, + + /// + /// 获取所有人员 + /// + [Description("获取所有人员")] + OperatorInfoBLL_GetAllUserList, + #endregion + + #region 工序名称信息 + + /// + /// 工序名称信息查询列表 + /// + [Description("工序名称信息查询列表")] + ProcessInfoBLL_GetList, + /// + /// 获取工序名称信息 + /// + [Description("获取工序名称信息")] + ProcessInfoBLL_Get, + /// + /// 工序名称信息插入 + /// + [Description("工序名称信息插入")] + ProcessInfoBLL_Insert, + /// + /// 工序名称信息更新 + /// + [Description("工序名称信息更新")] + ProcessInfoBLL_Update, + /// + /// 工序名称信息删除 + /// + [Description("工序名称信息删除")] + ProcessInfoBLL_Delete, + + #endregion + + #region 工序设置信息 + + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetList, + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetAllList, + /// + /// 获取工序设置信息 + /// + [Description("获取工序设置信息")] + ProcessSetBLL_Get, + /// + /// 工序设置信息保存 + /// + [Description("工序设置信息保存")] + ProcessSetBLL_Save, + /// + /// 工序设置信息插入 + /// + [Description("工序设置信息插入")] + ProcessSetBLL_Insert, + /// + /// 工序设置信息更新 + /// + [Description("工序设置信息更新")] + ProcessSetBLL_Update, + /// + /// 工序设置信息删除 + /// + [Description("工序设置信息删除")] + ProcessSetBLL_Delete, + /// + /// 根据工序ID获取工序信息 + /// + [Description("根据工序ID获取工序信息")] + ProcessSetBLL_GetProcessInfo, + /// + /// 根据工序ID获取工序信息集合 + /// + [Description("根据工序ID获取工序信息集合")] + ProcessSetBLL_GetProcessInfoList, + /// + /// 根据零件类别获取应添加的工序顺序 + /// + [Description("根据零件类别获取应添加的工序顺序")] + ProcessSetBLL_GetProcessIndex, + + #endregion + + #region 工序先决条件 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetList, + + [Description("信息列表")] + ProcessRuleBLL_GetListForSet, + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetAllList, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProcessRuleBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProcessRuleBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProcessRuleBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProcessRuleBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProcessRuleBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProcessRuleBLL_GetImportData, + + #endregion + + + #region 加工参数标准值设定信息 + + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetList, + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetAllList, + /// + /// 获取加工参数标准值设定信息 + /// + [Description("获取加工参数标准值设定信息")] + ProcessParameterBLL_Get, + /// + /// 加工参数标准值设定信息插入 + /// + [Description("加工参数标准值设定信息插入")] + ProcessParameterBLL_Insert, + /// + /// 加工参数标准值设定信息更新 + /// + [Description("加工参数标准值设定信息更新")] + ProcessParameterBLL_Update, + /// + /// 加工参数标准值设定信息删除 + /// + [Description("加工参数标准值设定信息删除")] + ProcessParameterBLL_Delete, + /// + /// 获取设备编号下拉列表数据 + /// + [Description("获取设备编号下拉列表数据")] + ProcessParameterBLL_GetMachineInfoList, + /// 根据设备ID获取对应设备的工序类别 + /// + [Description("获取设备信息(获取设备对应的工序类别)")] + ProcessParameterBLL_GetMachineInfo, + + #endregion + + #region 投料配置规则信息 + + /// + /// 投料配置规则信息查询列表 + /// + [Description("投料配置规则信息查询列表")] + ProductMderuleBLL_GetList, + /// + /// 获取投料配置规则信息 + /// + [Description("获取投料配置规则信息")] + ProductMderuleBLL_Get, + /// + /// 投料配置规则信息插入 + /// + [Description("投料配置规则信息插入")] + ProductMderuleBLL_Insert, + /// + /// 投料配置规则信息更新 + /// + [Description("投料配置规则信息更新")] + ProductMderuleBLL_Update, + /// + /// 投料配置规则信息删除 + /// + [Description("投料配置规则信息删除")] + ProductMderuleBLL_Delete, + + #endregion + + #region 物料架类型信息 + + /// + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetList, + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetAllList, + /// + /// 获取物料架类型信息 + /// + [Description("获取物料架类型信息")] + MaterialShelfTypeBLL_Get, + /// + /// 物料架类型信息插入 + /// + [Description("物料架类型信息插入")] + MaterialShelfTypeBLL_Insert, + /// + /// 物料架类型信息更新 + /// + [Description("物料架类型信息更新")] + MaterialShelfTypeBLL_Update, + /// + /// 物料架类型信息删除 + /// + [Description("物料架类型信息删除")] + MaterialShelfTypeBLL_Delete, + + #endregion + + #region 投料搪塑注塑投料 + + /// + /// 投料信息查询列表 + /// + [Description("投料信息查询列表")] + InjectionRecorderBLL_GetList, + /// + /// 获取投料信息 + /// + [Description("获取投料信息")] + InjectionRecorderBLL_Get, + /// + /// 投料信息插入 + /// + [Description("投料信息插入")] + InjectionRecorderBLL_Insert, + /// + /// 投料信息更新 + /// + [Description("投料信息更新")] + InjectionRecorderBLL_Update, + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_Delete, + + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_DeleteSingle, + #endregion + + #region 加工参数配置信息 + + /// + /// 获取加工参数配置信息 + /// + [Description("获取加工参数配置信息")] + ParameterConfigBLL_GetList, + + #endregion + + #region 零件类别 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBasicBLL_GetList, + + [Description("信息列表")] + ProductBasicBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_GetByCode, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBasicBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBasicBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBasicBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBasicBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBasicBLL_GetImportData, + + #endregion + + #region 零件条码 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetAllList, + + + /// + /// 信息和属性列表 + /// + [Description("信息和属性列表")] + ProductBLL_GetListAndAttribute, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_GetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_Insert, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertInjection, + + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertForBundle, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertEpidermis, + [Description("插入信息")] + ProductBLL_InsertListEpidermis, + + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBLL_Update, + + /// + /// 更新信息状态 + /// + [Description("更新信息状态")] + ProductBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_Delete, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_ScarpProduct, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_DeleteSingle, + + /// + /// 判断名称是否存在 + /// + [Description("判断名称是否存在")] + ProductBLL_ExistsProduct, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBLL_GetImportData, + + /// + /// 更新零件状态信息(工控机) + /// + [Description("更新零件状态信息(工控机)")] + ProductBLL_MendUpdate, + + /// + /// 获取零件信息(工控机) + /// + [Description("获取零件信息(工控机)")] + ProductBLL_GetProductInfo, + + [Description("更新产品信息")] + ProductBLL_ModifyProductCode, + /// + /// 获取原始产品信息 + /// + ProductBLL_GetOrginProduct, + #endregion + + #region 零件属性 + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetList, + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetAllList, + /// + /// 获取零件属性信息 + /// + [Description("获取零件属性信息")] + ProductAttributeBLL_Get, + /// + /// 零件属性信息插入 + /// + [Description("零件属性信息插入")] + ProductAttributeBLL_Insert, + /// + /// 零件属性信息更新 + /// + [Description("零件属性信息更新")] + ProductAttributeBLL_Update, + /// + /// 零件属性信息删除 + /// + [Description("零件属性信息删除")] + ProductAttributeBLL_Delete, + #endregion + + #region 设备停机维护 + + /// + /// 信息列表 + /// + [Description("信息列表")] + EquipmentMaintainBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + EquipmentMaintainBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + EquipmentMaintainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + EquipmentMaintainBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + EquipmentMaintainBLL_Delete, + + /// + /// 删除信息并更新设备表 + /// + [Description("删除信息并更新设备表")] + EquipmentMaintainBLL_DeleteEquipmentMaintainAndUpdateMachine, + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + EquipmentMaintainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + EquipmentMaintainBLL_GetImportData, + + #endregion + + + #region 投料与零件关联 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductInjectionBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductInjectionBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductInjectionBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductInjectionBLL_Update, + + /// + /// 判断投料信息是否存在 + /// + [Description("判断投料信息是否存在")] + ProductInjectionBLL_ExistsInjection, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductInjectionBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductInjectionBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductInjectionBLL_GetImportData, + + #endregion + + #region 产品批次追溯 + + /// + /// 获取列表(产品批次追溯) + /// + [Description("获取列表(产品批次追溯)")] + ProductInjectionBLL_GetProductInjectionList, + + /// + /// 导出信息列表(产品批次追溯) + /// + [Description("导出信息列表(产品批次追溯)")] + ProductInjectionBLL_GetExportDataForPI, + #endregion + + #region 产品加工追溯 + + /// + /// 设备加工操作 + /// + [Description("设备加工操作")] + MainOperationBLL_MachineOperation, + + /// + /// 获取列表(产品加工追溯) + /// + [Description("获取列表(产品加工追溯)")] + MainOperationBLL_GetMainOperationReviewList, + + /// + /// 导出信息列表(产品加工追溯) + /// + [Description("导出信息列表(产品加工追溯)")] + MainOperationBLL_GetExportDataForMOR, + #endregion + + #region 加工记录信息 + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetListWithParameter, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetAllList, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetList, + + /// + /// 工控机获取加工记录信息 + /// + [Description("工控机获取加工记录信息")] + MainOperationBLL_GetOperationList, + + /// + /// 工控机获取加工记录信息Q5新增 + /// + [Description("工控机获取加工记录信息Q5新增")] + MainOperationBLL_GetOperationListNew, + + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_Operation, + + /// + /// 获取打印条码 + /// + [Description("获取打印条码")] + MainOperationBLL_GetPrintCode, + + /// + /// 加工 + /// + [Description("加工并发送指令")] + MainOperationBLL_OperationForReturn, + + /// + /// 获取指令 + /// + [Description("获取指令")] + MainOperationBLL_GetSendOrder, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPassProcess, + + /// + /// 产品返修 + /// + [Description("产品返修")] + MainOperationBLL_MendProudct, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPunchingPassProcess, + + /// + /// 撤销 + /// + [Description("撤销")] + MainOperationBLL_SetRecovery, + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_SaveAndSendOrder, + + + /// + /// 获取加工记录信息统计 + /// + [Description("获取加工记录信息统计")] + MainOperationBLL_GetListForstatistic, + + /// + /// 获取加工记录信息(web) + /// + [Description("获取加工记录信息(web)")] + MainOperationBLL_GetListWithParameterForWeb, + + + + + + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetListWithParameterForWebTitle, + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetParameterForWebTitle, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupBy, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupByStauts, + + MainOperationBLL_GetListForstatisticWithColor, + + + #endregion + + #region 文件复制 + /// + /// 文件复制 + /// + [Description("文件复制")] + FileCopyRecordBLL_GetBarcode, + + + + #endregion + + #region 模具模腔 + + [Description("获取模具号配置")] + MoldConfigBLL_GetList, + + [Description("获取模具号配置")] + MoldConfigBLL_Get, + + [Description("获取模具号和模架号最大值")] + MoldConfigBLL_GetMaxMold, + + [Description("删除模具号配置")] + MoldConfigBLL_DeleteSingle, + + [Description("修改模具号配置")] + MoldConfigBLL_Update, + + [Description("新增模具号配置")] + MoldConfigBLL_Insert, + + [Description("新增模具号配置")] + MoldConfigBLL_UpdateNextUsed, + + [Description("删除模具号配置")] + MoldConfigBLL_Delete, + + [Description("获取模腔号配置")] + MoldSetBLL_GetList, + + [Description("更新模腔号配置")] + MoldSetBLL_SaveMoldSet, + + [Description("获取浇注配置")] + CastCounterBLL_Get, + + [Description("更新浇注配置")] + CastCounterBLL_Update, + + + MaterialCodeBLL_GetMaterialCode, + ProductBasicBLL_GetProductBasicList, + FactoryBLL_GetFactoryList, + ProductInfoBLL_GetImportData, + ProductInfoBLL_GetExportData, + ProductInfoBLL_Delete, + ProductInfoBLL_Update, + ProductInfoBLL_Insert, + ProductInfoBLL_Get, + ProductInfoBLL_GetList, + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + /// + /// 获取当前工作班次 + /// + ProduceShiftBLL_GetWorkingShift, + ProductBLL_GetProductByPart, + ProductBLL_CreateAssy, + + + #endregion + + } + #endregion + + /// + /// 工控机方法枚举 + /// + [Description("工控机方法枚举")] + public enum B9IPCService + { + #region 时间验证 + + CHECKTIMEBLL_Insert, + CHECKTIMEBLL_Update, + [Description("记录查询列表")] + CHECKTIMEBLL_GetList, + [Description("记录查询列表")] + CHECKTIMEBLL_Get, + + #endregion + + #region 条码补打记录 + [Description("补打记录查询列表")] + BarCodeReplacementBLL_Get, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetRecord, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetList, + + [Description("补打记录新增")] + BarCodeReplacementBLL_Insert, + + [Description("查找316总成信息")] + BZDRecorderBLL_Get316Record, + #endregion + + + #region 配置 + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + LocSwitchHelperBLL_GetPBomItemCodes, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + MaterialBomConfigBLL_GetAutoInputBarCode, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetList, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_Get, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_GetMaterial, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDConfigBLL_Insert, + + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAllList, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAppConfigValue, + /// + /// 获取物料号 + /// + [Description("获取物料号")] + BZDConfigBLL_GetMaterialCode, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDRecorderBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDRecorderBLL_Insert, + /// + /// BZD条码配置插入 + /// + [Description("创建BZD条码并记录")] + BZDRecorderBLL_CreateBZDCode, + /// + /// 查询BZD记录 + /// + [Description("查询BZD记录")] + BZDRecorderBLL_GetRecord, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_getMaxSeq, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetAllList, + /// + /// 获取配置细信息 + /// + [Description("配置细信息")] + PROCESSPARAMETERBLL_Get, + /// + /// 配置细信息插入 + /// + [Description("配置细信息插入")] + PROCESSPARAMETERBLL_Insert, + /// + /// 配置细信息更新 + /// + [Description("配置细信息更新")] + PROCESSPARAMETERBLL_Update, + /// + /// 配置细信息删除 + /// + [Description("配置细信息删除")] + PROCESSPARAMETERBLL_Delete, + /// + /// 报废走势图 + /// + [Description("报废走势图")] + PROCESSPARAMETERBLL_GetMainList, + #endregion + + #region 查询配置 + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_Get, + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_GetMATERIAL, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_GetBom, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + ScanIPConfigBLL_Get, + + /// + /// 修改配置信息 + /// + [Description("修改配置信息")] + ScanIPConfigBLL_Update, + + #endregion + + #region SPC监控 + + /// + /// 获得监控信息 + /// + [Description("获得监控信息")] + SPCControlBLL_GetData, + + #endregion + + #region 贴车单 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + SendPlanInfoBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + SendPlanInfoBLL_Insert, + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_InsertAndUpdateMain, + + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_UpdateMain, + + /// + /// 更新信息 + /// + [Description("更新信息")] + SendPlanInfoBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + SendPlanInfoBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + SendPlanInfoBLL_GetImportData, + + /// + /// 贴车单查询 + /// + [Description("贴车单查询")] + SendPlanRecordBLL_GetList, + /// + /// 贴车单查询 + /// + [Description("贴车单详细查询")] + SendPlanRecordBLL_GetItem, + + /// + /// 贴车单查询导出列表 + /// + [Description("贴车单查询导出列表")] + SendPlanRecordBLL_GetExportData, + + #endregion + + #region 发车统计分析 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetSendStatisticsList, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetSendStatisticsExportData, + + #endregion + + #region 加工本体 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetByCondition, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetMaterialSetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_Update, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainBLL_GetImportData, + /// + /// 创建本体信息 + /// + MainBLL_CreateMain, + + #endregion + + #region 主体与零件关系 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetAllList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetListWithProduct, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainProductBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainProductBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainProductBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainProductBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainProductBLL_GetImportData, + + #endregion + + #region 返修记录 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetExportDatas, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetLists, + + MendRecorderBLL_GetMenderReasonList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MendRecorderBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MendRecorderBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MendRecorderBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MendRecorderBLL_GetImportData, + + + /// + /// 获取返修信息(工控机) + /// + [Description("获取返修信息")] + MendRecorderBLL_GetMendRecorderInfo, + + /// + /// 返修登记(工控机) + /// + [Description("返修登记")] + MendRecorderBLL_RegisterMendRecorder, + + /// + /// 返修完成(工控机) + /// + [Description("返修完成")] + MendRecorderBLL_MendRecorderFinish, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_InsertMendRecorder, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_UpdateMendRecorder, + + MendRecorderBLL_CheckProductCode, + + MendRecorderBLL_InsertMendRecordItem, + + /// + /// 获取返修统计信息 + /// + [Description("获取返修统计信息")] + MendRecorderBLL_GetMendRecorderStatistics, + + /// + /// 导出返修统计信息 + /// + [Description("导出返修统计信息")] + MendRecorderBLL_ExportMendRecorderStatistics, + + + #endregion + + #region FIS M100生产信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + FISInfoBLL_GetList, + + #endregion + + #region 出库 + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + OutWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + OutWarehouseBLL_GetMainInfo, + + /// + /// 出库操作(本体) + /// + [Description("出库操作(本体)")] + OutWarehouseBLL_MainOutWarehouse, + + /// + /// 出库操作(零件) + /// + [Description("出库操作(零件)")] + OutWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 入库 + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + InWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + InWarehouseBLL_GetMainInfo, + + /// + /// 入库操作(本体) + /// + [Description("出库操作(本体)")] + InWarehouseBLL_MainOutWarehouse, + + /// + /// 入库操作(零件) + /// + [Description("出库操作(零件)")] + InWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 获取产品信息 + + ProductBLL_GetByCondition, + /// + /// 获取信息PID PRODUCTCODE + /// public Product Get(Product model) + /// + ProductBLL_Get, + + /// + /// 插入产品信息 + /// + ProductBLL_Insert, + + #endregion + + #region 查验 + + InjectionCheckBLL_Insert, + + InjectionCheckBLL_GetList, + + InjectionCheckBLL_Delete, + + #endregion + + #region 缺陷类型 + + DefectTypeBLL_GetDefectType, + MendRecorderBLL_GetListForstatistic, + + #endregion + + #region 获取打印模板路径 + + PrintModelCopyBLL_GetPrintModelCopyList, + + #endregion + + #region 获取采集点信息 + + DAIBLL_GetList, + DAIBLL_GetSignalDAI, + DAICacheBLL_GetWorklocCache, + /// + /// 采集点输入 + /// + DAI_Input, + /// + /// 工位放行 + /// + DAI_LetPass, + /// + /// 撤销回滚 + /// + DAI_Rollback, + DAI_RollbackWithOrder, + DAI_Reset, + + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + #endregion + + #region 生产计划 + + WorkOrderBLL_GetOrderInCell, + WorkOrderBLL_GetOrderCountInCell, + /// + /// 获取加工记录数 + /// + ProcessRecordBLL_GetCount, + WorkOrderBLL_Get, + WorkOrderBLL_GetPlanLabel, + WorkOrderBLL_SuspendOrder, + WorkOrderBLL_CancelSuspend, + WorkOrderBLL_DeleteOrder, + WorkOrderBLL_TakeBack, + WorkOrderBLL_ResetOrder, + WorkOrderBLL_GetPlanLabelBindProdut, + WorkOrderBLL_GetDayPlanCount, + /// + /// 插入产品信息 + /// + ProcessRecordBLL_Insert, + + /// + /// 抽检 + /// + ProductCheckBLL_GetList, + ProductCheckBLL_Delete, + + /// + /// + /// + MainCodeChangeBLL_GetList, + MainCodeChangeBLL_Insert, + MainCodeChangeBLL_Generate, + + + + + + #endregion + + } +} diff --git a/.svn/pristine/42/42d5b8303c09403778fc3988ee6ea4ee60daac0a.svn-base b/.svn/pristine/42/42d5b8303c09403778fc3988ee6ea4ee60daac0a.svn-base new file mode 100644 index 0000000..dcbe661 --- /dev/null +++ b/.svn/pristine/42/42d5b8303c09403778fc3988ee6ea4ee60daac0a.svn-base @@ -0,0 +1,43 @@ + + + + +
+ + + + + + + + + http://localhost:55160/Service.svc + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.svn/pristine/45/454eb995ff4f637546b5a9d3437c88abdc877b08.svn-base b/.svn/pristine/45/454eb995ff4f637546b5a9d3437c88abdc877b08.svn-base new file mode 100644 index 0000000..0f33226 --- /dev/null +++ b/.svn/pristine/45/454eb995ff4f637546b5a9d3437c88abdc877b08.svn-base @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketInfoModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 料筒编号 + /// + [Description("料筒编号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string BucketCode { get; set; } + /// + /// 料筒名称 + /// + [Description("料筒名称")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string BucketName { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] + public string IsCheck { get; set; } + + /// + /// 创建人 + /// + [Description("创建用户")] + public string CREATEUSER { get; set; } + + /// + /// 创建日期 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime CREATEDATE { get; set; } + + /// + /// 更新人 + /// + [Description("更新用户")] + public string UPDATEUSER { get; set; } + + /// + /// 更新日期 + /// + [Description("更新时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime UPDATEDATE { get; set; } + } +} diff --git a/.svn/pristine/45/458d866b0cd13c8e64c380bc7138562156662acb.svn-base b/.svn/pristine/45/458d866b0cd13c8e64c380bc7138562156662acb.svn-base new file mode 100644 index 0000000..62efaad --- /dev/null +++ b/.svn/pristine/45/458d866b0cd13c8e64c380bc7138562156662acb.svn-base @@ -0,0 +1,294 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + Library + Properties + QMAPP.FJC.Entity + QMAPP.FJC.Entity + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\APPMESReport\QMAPP.MESReport.Web\Bin\QMAPP.MESReport.Entity.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + + + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + PublicResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + + \ No newline at end of file diff --git a/.svn/pristine/45/45e0fb0a391a80490d1e1a1a349f0b3244d80d3d.svn-base b/.svn/pristine/45/45e0fb0a391a80490d1e1a1a349f0b3244d80d3d.svn-base new file mode 100644 index 0000000..2536f1b --- /dev/null +++ b/.svn/pristine/45/45e0fb0a391a80490d1e1a1a349f0b3244d80d3d.svn-base @@ -0,0 +1,258 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialRecordDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterialRecord Get(RawMaterialRecord info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterialRecord Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_RawMaterialRecord] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(RawMaterialRecord condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(RawMaterialRecord condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,RawMaterialPID,ProductCode,MaterialCode,IsCheck,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_RawMaterialRecord "); + whereBuilder.Append(" AND IsCheck<> '1' "); + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(RawMaterialRecord info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_RawMaterialRecord"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(RawMaterialRecord info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(RawMaterialRecord info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_RawMaterialRecord "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/46/46c6407c9548aed128abb793ccbda76c5cc1ca1b.svn-base b/.svn/pristine/46/46c6407c9548aed128abb793ccbda76c5cc1ca1b.svn-base new file mode 100644 index 0000000..9b99bf0 --- /dev/null +++ b/.svn/pristine/46/46c6407c9548aed128abb793ccbda76c5cc1ca1b.svn-base @@ -0,0 +1,100 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 设备信息编辑 + + + <%=Html.QPEdit("条码规则信息编辑", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <%=Html.QV(p=>p.Check_Type) %> + + <%=Html.QC(p => p.Check_Type)%> +
+ <%=Html.QV(p=>p.Operator) %> + + <%=Html.QC(p => p.Operator)%> +
+ <%=Html.QV(p=>p.Check_Value) %> + + <%=Html.QC(p => p.Check_Value)%> +
+ <%=Html.QV(p=>p.Check_ValueTo) %> + + <%=Html.QC(p => p.Check_ValueTo)%> +
+ <%=Html.QV(p=>p.State) %> + + <%=Html.QC(p => p.State)%> +
+ <%=Html.QV(p=>p.Remark) %> + + <%=Html.QC(p => p.Remark)%> +
+
+ <%=Html.HiddenFor(p => p.PID)%> + <%=Html.HiddenFor(p => p.WorkLoc_Code)%> + <%=Html.HiddenFor(p => p.CodeTimeStart)%> + <%=Html.HiddenFor(p => p.CodeTimeNumber)%> + + <%=Html.HiddenFor(p => p.DAI_Code)%> + <%=Html.HiddenFor(p => p.Column1)%> + <%=Html.HiddenFor(p => p.Column2)%> + <%=Html.QPEnd() %> + + + +
+ + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "List", "parent.closeAppWindow1();return false;")%> +
+ +
+ diff --git a/.svn/pristine/47/474f0cb9040fb70d3819db96a37c39702ee1f297.svn-base b/.svn/pristine/47/474f0cb9040fb70d3819db96a37c39702ee1f297.svn-base new file mode 100644 index 0000000..d125c3b --- /dev/null +++ b/.svn/pristine/47/474f0cb9040fb70d3819db96a37c39702ee1f297.svn-base @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.svn/pristine/47/47ad5de086489d55d96f31cff91c314444698b86.svn-base b/.svn/pristine/47/47ad5de086489d55d96f31cff91c314444698b86.svn-base new file mode 100644 index 0000000..99274aa --- /dev/null +++ b/.svn/pristine/47/47ad5de086489d55d96f31cff91c314444698b86.svn-base @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.svn/pristine/49/49478cbad3029cc1c33ad706ad330da5e3de50e1.svn-base b/.svn/pristine/49/49478cbad3029cc1c33ad706ad330da5e3de50e1.svn-base new file mode 100644 index 0000000..dda7b29 --- /dev/null +++ b/.svn/pristine/49/49478cbad3029cc1c33ad706ad330da5e3de50e1.svn-base @@ -0,0 +1,1047 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QMAPP.WinForm.Forms.Injection; +using QMAPP.WinForm.Forms.Operation; +using QMAPP.WinForm.Forms.EquipmentAlarm; +using QMAPP.WinForm.Forms.InformationSearch; +using QMAPP.WinForm.Forms.Mend; +using QMAPP.WinForm.Forms.WarehouseManage; +using QMAPP.ServicesAgent.LoginService; +using QMAPP.WinForm.Common; +using QMAPP.WinForm.Forms.Andon; +using QMAPP.WinForm.Forms.Andon.Enum; +using QMAPP.WinForm.Forms.SlushPlanForm; +using QMAPP.WinForm.Forms.DisPatch; +using QMAPP.WinForm.Forms.MachineCheck; +using QMAPP.WinForm.Forms.ODS; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Forms.ProductIn; +using System.Configuration; +using System.ServiceModel.Configuration; +using QMAPP.WinForm.Forms.RePrint; + + +namespace QMAPP.WinForm +{ + /// + /// 主窗体 + /// + public partial class MainForm : Form + { + public delegate void InvokeViewCloseHandler(); + private bool _isAutoClosed = false; + /// + /// + /// + public MainForm() + { + InitializeComponent(); + } + + public MainForm(LoginInfo login) + { + InitializeComponent(); + SetLoginInfo(login); + + } + /// + /// 设置登录信息 + /// + /// + public void SetLoginInfo(LoginInfo login) + { + ClientContext.AuthList = new Dictionary(); + List powerIDList = new List(); + XmlReader reader = new XmlReader(); + if (login.LoginUserID.ToUpper().Trim() != "ADMIN") + { + //到菜单配置文件中获取按钮信息 + + //在web系统中权限配置文件中工控机 + + List powerIDListTemp = login.Powers.ToList() + .Where(o => + Convert.ToInt32(o.Substring(2, 2)) >= 80 && Convert.ToInt32(o.Substring(2, 2)) <= 95 + ).ToList(); + foreach (var item in powerIDListTemp) + { + powerIDList.Add(item); + if (!powerIDList.Contains(item.Substring(0, 6).PadRight(8, '0'))) + { + powerIDList.Add(item.Substring(0, 6).PadRight(8, '0')); + } + } + + List btnIDList = reader.GetMenuBtnFromPower(powerIDList); + + + + //btnIDList.Add("btnUserOut");//注销 + foreach (ToolStripMenuItem menu in menuStrip1.Items) + { //一级菜单. + + //该模块下按钮总数 + int btnSum = menu.DropDownItems.Count; + if (btnSum == 0) + { + continue; + } + + //隐藏按钮数量 + int hideSum = 0; + + foreach (ToolStripDropDownItem subMenu in menu.DropDownItems) + { //一级菜单下的子菜单. + + //对权限不包含的按钮进行隐藏 + if (!btnIDList.Contains(subMenu.Name)) + { + subMenu.Visible = false; + hideSum++; + } + } + + //隐藏模块按钮 + if (btnSum == hideSum) + { + menu.Visible = false; + } + } + } + else + { + reader.GetMenuBtnFromPower(powerIDList); + } + + //显示登录人信息 + string loginInfo = "当前用户:" + login.UserName + " "; + if (ClientContext.produceShift != null) + { + loginInfo += "班次:" + ClientContext.produceShift.PRODUCESHIFTNAME + " "; + } + this.toolStripStatusLabel1.Text = loginInfo; + } + + private void MainForm_FormClosed(object sender, FormClosedEventArgs e) + { + Application.Exit(); + } + + private void btnInjectPut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionMoldingForm form = new InjectionMoldingForm(); + ClientContext.SetUserAuth(form); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + /// + /// + /// + /// + /// + private void btnInjectPutNEW_Click(object sender, EventArgs e) + { + //Form f = Application.OpenForms["InjectionMoldingNEWForm"]; //查找是否打开过Form1窗体 + //if (f == null) //没打开过 + //{ + // InjectionMoldingNEWForm form = new InjectionMoldingNEWForm(); + // ClientContext.SetUserAuth(form); + // new KeyEvent().SetKeyToTxt(form); + // form.MdiParent = this; + // form.Show(); //重新new一个Show出来 + //} + //else + //{ + // f.WindowState = FormWindowState.Normal; + // f.Focus(); //打开过就让其获得焦点 + //} + } + + private void btnInjectPrintForm_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectPasswordForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectPasswordForm form = new InjectPasswordForm(); + ClientContext.SetUserAuth(form); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectionCheck_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionCheckListForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionCheckListForm form = new InjectionCheckListForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + + private void btnInjectCodePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionMoldingPrintForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionMoldingPrintForm form = new InjectionMoldingPrintForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectEquipMaintain_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentMaintainForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentMaintainForm form = new EquipmentMaintainForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOperateStation_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OperationForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OperationForm form = new OperationForm(); + new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOperateEquipMaintain_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentMaintainForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentMaintainForm form = new EquipmentMaintainForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectPack_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductBundleForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductBundleForm form = new ProductBundleForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnEquipAlarm_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["EquipmentAlarmForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + EquipmentAlarmForm form = new EquipmentAlarmForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnFisInfoShow_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["FisM100ListForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + FisM100ListForm form = new FisM100ListForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnSPCMonitor_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["SPCControlForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SPCControlForm form = new SPCControlForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOpeInfoShow_Click(object sender, EventArgs e) + { + + //Form f = Application.OpenForms["MainOperationSearchForm"]; //查找是否打开过Form1窗体 + //if (f == null) //没打开过 + //{ + // MainOperationSearchForm form = new MainOperationSearchForm(); + // new KeyEvent().SetKeyToTxt(form); + // form.MdiParent = this; + // form.Show(); //重新new一个Show出来 + //} + //else + //{ + // f.WindowState = FormWindowState.Normal; + // f.Focus(); //打开过就让其获得焦点 + //} + } + + private void btnMendOperate_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["MendRecorderForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MendRecorderForm form = new MendRecorderForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnOut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OutWarehouseForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OutWarehouseForm form = new OutWarehouseForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnIn_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InWarehouseForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InWarehouseForm form = new InWarehouseForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + public void ThreadProc() + { + Application.Run(new LoginForm()); + } + + private void 注销ToolStripMenuItem_Click(object sender, EventArgs e) + { + if (MessageBox.Show(Resource1.LogOff, Resource1.ConfirmTitle, MessageBoxButtons.OKCancel) != DialogResult.OK) + return; + this.Close(); + System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc)); + t.Start(); + } + + + private void m135外购件注册ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductAddForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductAddForm form = new ProductAddForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void m181ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushPlanForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushPlanForm form = new SlushPlanForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiTakeOut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SendFinalForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SendFinalForm form = new SendFinalForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (MessageBox.Show("是否关闭窗口", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No) + e.Cancel = true; + } + + private void MainForm_Load(object sender, EventArgs e) + { + + LoadServerHost(); + var startup = Common.LocalSetting.Settings["StartUp", ""]; + if (!string.IsNullOrWhiteSpace(startup)) + { + var formtype = Type.GetType(startup); + if (formtype != null) + { + Form startupform = (Form)Activator.CreateInstance(formtype); + ClientContext.SetUserAuth(startupform); + if (startupform != null) + { + //ClientContext.SetUserAuth(((ToolStripMenuItem)sender).Name, startupform); + startupform.MdiParent = this; + startupform.WindowState = FormWindowState.Maximized; + startupform.Show(); + } + } + } + } + private void LoadServerHost() + { + Configuration cfg = ConfigurationManager.OpenExeConfiguration(""); + var clientSecion = cfg.GetSection("system.serviceModel/client") as ClientSection; + + tslServerHost.Text = "WCF服务器:" + GetEndointByName(clientSecion, "BasicHttpBinding_IGeneralService").Address.Host; + } + + private ChannelEndpointElement GetEndointByName(ClientSection section, string endpointname) + { + foreach (ChannelEndpointElement endpoint in section.Endpoints) + { + if (string.Equals(endpoint.Name, endpointname)) + { + return endpoint; + } + } + return null; + } + + private void PrintCodeToolStripMenuItem_Click(object sender, EventArgs e) + { + //Form f = Application.OpenForms["PrintForm"]; //查找是否打开过Form1窗体 + //if (f == null) //没打开过 + //{ + // PrintForm form = new PrintForm(); + // ClientContext.SetUserAuth(form); + // //new KeyEvent().SetKeyToTxt(form); + // form.MdiParent = this; + // form.Show(); //重新new一个Show出来 + //} + //else + //{ + // f.WindowState = FormWindowState.Normal; + // f.Focus(); //打开过就让其获得焦点 + //} + return; + } + + private void FrmPlace_Click(object sender, EventArgs e) + { + + Form f = Application.OpenForms["FrmPlace"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + FrmPlace form = new FrmPlace(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void VedioToolStripMenuItem1_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MediaPlayerForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MediaPlayerForm form = new MediaPlayerForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void TypeToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["VideoTypeForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + VideoTypeForm form = new VideoTypeForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void AodonToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.mainForm = this; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + + //private void tsmiCallReason_Click(object sender, EventArgs e) + //{ + // Form f = Application.OpenForms["CallReasonForm"]; //查找是否打开过Form1窗体 + // if (f == null) //没打开过 + // { + // CallReasonForm form = new CallReasonForm(); + // form.MdiParent = this; + // form.WindowState = FormWindowState.Maximized; + // form.Show(); //重新new一个Show出来 + // } + // else + // { + // //先关闭 + // f.Close(); + // //重新打开 + // CallReasonForm form = new CallReasonForm(); + // form.MdiParent = this; + // form.WindowState = FormWindowState.Maximized; + // form.Show(); //重新new一个Show出来 + // } + //} + + private void EquipToolStripMenuItem1_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MachineCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MachineCheckForm form = new MachineCheckForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + MachineCheckForm form = new MachineCheckForm(); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + + private void tsmiFISBreak_Click(object sender, EventArgs e) + { + + QMAPP.WinForm.Forms.PlanSearch.frmFISBreakConfirm form = new QMAPP.WinForm.Forms.PlanSearch.frmFISBreakConfirm(); + //form.MdiParent = this; + //form.WindowState = FormWindowState.Maximized; + form.ShowDialog(); //重新new一个Show出来 + + } + + private void timer1_Tick(object sender, EventArgs e) + { + QMAPP.ServicesAgent.ServiceAgent agent1 = ClientContext.GetServiceAgent(); + var shift = agent1.InvokeServiceFunction(B9BasicService.ProduceShiftBLL_GetWorkingShift.ToString(), ClientContext.MachineInfo != null ? ClientContext.MachineInfo.WORKCENTER_CODE : ""); + if (shift != null) + { + ClientContext.produceShift = shift; + } + //显示登录人信息 + string loginInfo = this.toolStripStatusLabel1.Text.Substring(0, this.toolStripStatusLabel1.Text.LastIndexOf(':') + 1); + if (ClientContext.produceShift != null) + { + loginInfo += ClientContext.produceShift.PRODUCESHIFTNAME + " "; + } + this.toolStripStatusLabel1.Text = loginInfo; + tsslblIps.Text = "本机IP:" + string.Join(",", System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).Where(p => p.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork).Select(p => p.ToString())); + + if (ClientContext.OpcState > 0) + { + tsslblOPCStatus.Visible = true; + string statetext = ""; + switch (ClientContext.OpcState) + { + case 1: + { + statetext = "连接正常"; + break; + } + case 2: + { + statetext = "连接断开"; + break; + } + case 3: + { + statetext = "连接断开"; + break; + } + case 4: + { + statetext = "正在连接"; + break; + } + } + tsslblOPCStatus.Text = "OPC服务状态:" + statetext; + } + else + { + tsslblOPCStatus.Visible = false; + } + + } + + private void tsmiSetStartUp_Click(object sender, EventArgs e) + { + if (this.ActiveMdiChild != null) + { + Common.LocalSetting.Settings["StartUp"] = this.ActiveMdiChild.GetType().FullName; + MessageBox.Show(string.Format("已将\"{0}\"设置未启动页!\r\n当登录成功时将自动开启此界面。", this.ActiveMdiChild.Text)); + } + } + + private void toolStripMenuItem2_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductInForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductInForm form = new ProductInForm(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiPrintPlanlabel_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["PrintPlanLabel"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + PrintPlanLabel form = new PrintPlanLabel(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiInspectSkipping_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["frmInspectSkipping"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + frmInspectSkipping form = new frmInspectSkipping(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 替换操作ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ReplaceForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ReplaceForm form = new ReplaceForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 抽检操作ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + ProductCheckForm form = new ProductCheckForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + + } + + private void 总成条码替换ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductCheckForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainCodeChangeForm form = new MainCodeChangeForm(); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiProductInfo_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ProductInfo"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + QMAPP.WinForm.Forms.Query.ProductInfo form = new Forms.Query.ProductInfo(); + form.WindowState = FormWindowState.Maximized; + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Maximized; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void 投料平台ToolStripMenuItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectPlat"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectPlat form = new InjectPlat(); + new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnvVWSinglePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingPrintForOldForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingPrintForOldForm form = new SlushMoldingPrintForOldForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + + } + + private void btnSlushCodePrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingPrintForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingPrintForm form = new SlushMoldingPrintForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnInjectPrint_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["InjectionCodePrint"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + InjectionCodePrint form = new InjectionCodePrint(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmDPAssmblyItem_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["DPAssemblyCodePrint"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + DPAssemblyCodePrintForm form = new DPAssemblyCodePrintForm(); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiFoamingFeed_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["PouringMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + PouringMoldingForm form = new PouringMoldingForm(); + new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void btnSlushPut_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["SlushMoldingForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + SlushMoldingForm form = new SlushMoldingForm(); + ClientContext.SetUserAuth(form); + //new KeyEvent().SetKeyToTxt(form); + form.MdiParent = this; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiDPShipment_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["DPShipment"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + DPShipment form = new DPShipment(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiUserManage_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["ManageUserForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + Forms.Sys.ManageUserForm form = new QMAPP.WinForm.Forms.Sys.ManageUserForm(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void tsmiDefectRecording_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MendRecorderReasonForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MendRecorderReasonForm form = new QMAPP.WinForm.Forms.Mend.MendRecorderReasonForm(); + //new KeyEvent().SetKeyToTxt(form); + ClientContext.SetUserAuth(form); + form.MdiParent = this; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + } +} diff --git a/.svn/pristine/49/49afb430884f5d61d57b255fe379d16b263b7f3f.svn-base b/.svn/pristine/49/49afb430884f5d61d57b255fe379d16b263b7f3f.svn-base new file mode 100644 index 0000000..86f97e1 --- /dev/null +++ b/.svn/pristine/49/49afb430884f5d61d57b255fe379d16b263b7f3f.svn-base @@ -0,0 +1,349 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/49/49c561ef70f2c40119a09d2b39d858af03118a7c.svn-base b/.svn/pristine/49/49c561ef70f2c40119a09d2b39d858af03118a7c.svn-base new file mode 100644 index 0000000..7c0e6bf --- /dev/null +++ b/.svn/pristine/49/49c561ef70f2c40119a09d2b39d858af03118a7c.svn-base @@ -0,0 +1,794 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.Operation; +using QMFrameWork.Common.Serialization; +using QMAPP.WinForm.Forms.Operation; +using QMAPP.FJC.Entity.Basic; + +namespace QMAPP.WinForm.Forms.Injection +{ + public partial class InjectionCodePrint : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + List paramcolumns = new List(); + FileSynchronizers.IFileSynchronizer sync; + + public InjectionCodePrint() + { + InitializeComponent(); + } + + private void InjectionCodePrint_Load(object sender, EventArgs e) + { + LoadMachineList(); + SetConnectState(0); + + this.radioButSignal.Checked = true; + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("InjectionCodePrint"); + + cbPrintCount.SelectedIndex = 3; + cbPrintSpan.SelectedIndex = 3; + } + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist = basicData.GetMachineInfoAndModelList(new string[] {"1"}, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.btnLockMachine.Visible = false; + this.LockMachine(false); + } + else + { + //this.btnLockMachine.Visible = false; + this.LockMachine(false); + } + comMachine_SelectedIndexChanged(null, null); + #endregion + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + tsbPrint.Enabled = false; + CodeCreatePrint(); + tsbPrint.Enabled = true; + } + + private void CodeCreatePrint() + { + List materialListInfo = GetSelectedMaterials(); + var model = cbMould.SelectedItem as MachineInfoModels; + if (model == null) + { + model = new MachineInfoModels(); + } + int i = 1; + //DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeForChengdu", materialListInfo, model, i); + var machine = comMachine.SelectedItem as MachineInfo; + DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary()); + + Print(resultList.Result, true); + } + + private void CodeCreatePrint(string header, string datarow, char[] dataSeparator) + { + + List materialListInfo = GetSelectedMaterials(); + var machine = comMachine.SelectedItem as MachineInfo; + var model = cbMould.SelectedItem as MachineInfoModels; + if (model == null) + { + model = new MachineInfoModels(); + } + string tableName = paramcolumns.FirstOrDefault().PARATABLENAME; + Dictionary param=new Dictionary(); + param.Add("PARAMETER_COLUMNS",header); + var paramvalue=datarow.Split(dataSeparator); + for(int j=0;j> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo,machine,model,tableName,param); + Print(resultList.Result,false); + } + private void Print(List codeList,bool IsManual) + { + List labels = new List(); + //打印条码 + string typeTem = ""; + string typeData = ""; + foreach (PrintCode item in codeList) + { + + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MATERIAL_NAME"].Value = item.MATERIAL_NAME; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + //班次信息 + string shiftCode = ClientContext.produceShift.PRODUCESHIFTTCODE; + item.ShiftCode = shiftCode; + + DGView.AutoGenerateColumns = false; + typeTem = item.PRINT_TEMPALTE_TEM; + typeData = item.PRINT_TEMPALTE_DATA; + //QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = item.MATERIAL_NAME + "," + item.PRODUCTCODE + "," + item.MAINCODE + "," + shiftCode + "," + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + //QM.Assist.PrintUtil.LabelList2.Add(ll); + PrintTemplate.InjectLabel label = new PrintTemplate.InjectLabel + { + CreateDate = DateTime.Now, + MachineCode = comMachine.SelectedValue + "", + MaterialCode = item.PRODUCTCODE, + MaterialName = item.MATERIAL_NAME, + ModelCode = cbMould.SelectedValue + "", + SerialNumber = item.MAINCODE, + ShiftCode = shiftCode, + IsManualPrint = IsManual + }; + labels.Add(label); + } + string path = System.Configuration.ConfigurationManager.AppSettings["Template_Local_Path"]; + if (!System.IO.Directory.Exists(path)) + { + System.IO.Directory.CreateDirectory(path); + } + FastReport.Report fr = new FastReport.Report(); + fr.RegisterData(labels, "Labels"); + if (!System.IO.File.Exists(string.Format("{0}\\{1}.frx", path, typeTem))) + { + if (System.IO.File.Exists(string.Format("PrintTemplate\\{1}.frx", path, typeTem))) + { + System.IO.File.Copy(string.Format("PrintTemplate\\{1}.frx", path, typeTem) + , string.Format("{0}\\{1}.frx", path, typeTem)); + } + else + { + fr.FileName = string.Format("{0}\\{1}.frx", path, typeTem); + fr.Design(true); + fr.Save(string.Format("{0}\\{1}.frx", path, typeTem)); + } + } + fr.Load(string.Format("{0}\\{1}.frx", path, typeTem)); + if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) + { + fr.Design(true); + } + else + { + fr.PrintSettings.ShowDialog = false; + fr.Print(); + } + fr.Dispose(); + + //QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeTem + "temPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeData + "dataPath"].ToString + // ()); + } + + private List GetSelectedMaterials() + { + List materialListInfo = new List(); + Material concationMaterial = new Material(); + //int i= Convert.ToInt32( this.txtNum.Text); + + if (this.radioButSignal.Checked == true) + { + string materialcode1 = this.txtMaterialCode.Text; + concationMaterial.MATERIAL_CODE = materialcode1; + materialListInfo.Add(concationMaterial); + } + else if (this.radioButDouble.Checked == true) + { + concationMaterial.MATERIAL_CODE = this.txtMaterialCode.Text; + materialListInfo.Add(concationMaterial); + if (!string.IsNullOrEmpty(this.comboxMaterial.SelectedValue.ToString())) + { + Material concationMaterial2 = new Material(); + concationMaterial2.MATERIAL_CODE = this.comboxMaterial.SelectedValue.ToString(); + materialListInfo.Add(concationMaterial2); + } + } + else if (this.radioButFourth.Checked == true) + { + concationMaterial.MATERIAL_CODE = this.txtMaterialCode.Text; + materialListInfo.Add(concationMaterial); + + //if (!string.IsNullOrEmpty(this.txtMaterial2.Text)) + if (!string.IsNullOrEmpty(this.comboxMaterial.SelectedValue.ToString())) + { + Material concationMaterial3 = new Material(); + //concationMaterial3.MATERIAL_CODE = this.txtMaterial2.Text.Substring(this.txtMaterial2.Text.LastIndexOf(":") + 1); + concationMaterial3.MATERIAL_CODE = this.comboxMaterial.SelectedValue.ToString(); + materialListInfo.Add(concationMaterial3); + } + + //if (!string.IsNullOrEmpty(this.txtMaterial3.Text)) + if (!string.IsNullOrEmpty(this.comboxMaterial3.SelectedValue.ToString())) + { + Material concationMaterial4 = new Material(); + //concationMaterial4.MATERIAL_CODE = this.txtMaterial3.Text.Substring(this.txtMaterial3.Text.LastIndexOf(":") + 1); + concationMaterial4.MATERIAL_CODE = this.comboxMaterial3.SelectedValue.ToString(); + materialListInfo.Add(concationMaterial4); + } + //if (!string.IsNullOrEmpty(this.txtMaterial4.Text)) + if (!string.IsNullOrEmpty(this.comboxMaterial4.SelectedValue.ToString())) + { + Material concationMaterial5 = new Material(); + //concationMaterial5.MATERIAL_CODE = this.txtMaterial4.Text.Substring(this.txtMaterial4.Text.LastIndexOf(":") + 1); + concationMaterial5.MATERIAL_CODE = this.comboxMaterial4.SelectedValue.ToString(); + materialListInfo.Add(concationMaterial5); + } + } + return materialListInfo; + } + #endregion + + #region 校验 + /// + /// 校验 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + + var selectmachine= comMachine.SelectedItem as MachineInfo; + if (selectmachine == null || string.IsNullOrEmpty(selectmachine.PID)) + { + strMessage += "请选择注塑机!" + "\r\n"; + } + //判断条码是否为空 + + if (cbMould.Items.Count > 0 && cbMould.SelectedIndex < 0) + { + strMessage += "请选择模具!" + "\r\n"; + } + + //注塑零件 + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + strMessage += Resource1.MaterialChoiceValidate + "\r\n"; + } + + + + //打印数量 + //if (this.txtNum.Text == null || this.txtNum.Text == string.Empty) + //{ + // strMessage += Resource1.NumNullValidate + "\r\n"; + //} + //else + //{ + // int proNum = 0; + // if (!int.TryParse(this.txtNum.Text, out proNum)) + // { + // strMessage += Resource1.NumFormatValidate + "\r\n"; + // } + //} + return strMessage; + #endregion + } + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 点击选择零件信息 + /// + /// 点击选择零件信息 + /// + /// + /// + private void btnChoiceMaterial_Click(object sender, EventArgs e) + { + MaterialTreeForm materialForm = new MaterialTreeForm(); + var ret= materialForm.ShowDialog(); + if (ret == DialogResult.OK) + { + this.txtMaterialCode.Text = materialForm.MaterialCode; + this.textMaterialName.Text = materialForm.MaterialName; + bool maintype = materialForm.MainType; + if (maintype) + { + this.groupBox3.Enabled = true; + } + else + { + this.groupBox3.Enabled = false; + } + } + } + #endregion + + #region 单选按钮 + /// + /// 单件 + /// + /// + /// + private void radioButSignal_CheckedChanged(object sender, EventArgs e) + { + if (radioButSignal.Checked == true) + { + this.panel34.Visible = false; + this.paneldouble.Visible = false; + } + } + /// + /// 双件,获取物料信息下拉 + /// + /// + /// + private void radioButDouble_CheckedChanged(object sender, EventArgs e) + { + if (radioButDouble.Checked == true) + { + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + string Messae = Resource1.MaterialChoiceValidate + "\r\n"; + MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + radioButSignal.Checked = true; + return; + } + this.paneldouble.Visible = true; + this.panel34.Visible = false; + + string materialCode = this.txtMaterialCode.Text; + BasicData basicData = new BasicData(); + this.comboxMaterial.DataSource = basicData.GetMaterialInfoList(materialCode, true); + this.comboxMaterial.DisplayMember = "MATERIAL_NAME"; + this.comboxMaterial.ValueMember = "MATERIAL_CODE"; + } + + } + /// + /// 四件,自动填写下拉物料信息 + /// + /// + /// + private void radioButFourth_CheckedChanged(object sender, EventArgs e) + { + if (radioButFourth.Checked == true) + { + if (this.txtMaterialCode.Text == null || this.txtMaterialCode.Text == string.Empty) + { + string Messae = Resource1.MaterialChoiceValidate + "\r\n"; + MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + radioButSignal.Checked = true; + return; + } + //20210727 zhang 增加PA物料后老方法不适用 + //string materialCode = this.txtMaterialCode.Text; + //BasicData basicData = new BasicData(); + //List materialList = basicData.GetMaterialInfoList(materialCode, false); + //materialList = materialList.OrderBy(p => p.MATERIAL_CODE).ToList(); + //if (materialList.Count < 3) + //{ + // string Messae = Resource1.SelectedInfoWrong + "\r\n"; + // MessageBox.Show(Messae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + // radioButSignal.Checked = true; + // return; + //} + //this.panel34.Visible = true; + //this.paneldouble.Visible = false; + //this.txtMaterial2.Text = materialList[0].MATERIAL_NAME; + //this.txtMaterial3.Text = materialList[1].MATERIAL_NAME; + //this.txtMaterial4.Text = materialList[2].MATERIAL_NAME; + + this.paneldouble.Visible = true; + this.panel34.Visible = true; + + string materialCode = this.txtMaterialCode.Text; + BasicData basicData = new BasicData(); + this.comboxMaterial.DataSource = basicData.GetMaterialInfoList(materialCode, true); + this.comboxMaterial.DisplayMember = "MATERIAL_NAME"; + this.comboxMaterial.ValueMember = "MATERIAL_CODE"; + + string materialCode3 = this.txtMaterialCode.Text; + BasicData basicData3 = new BasicData(); + this.comboxMaterial3.DataSource = basicData3.GetMaterialInfoList(materialCode, true); + this.comboxMaterial3.DisplayMember = "MATERIAL_NAME"; + this.comboxMaterial3.ValueMember = "MATERIAL_CODE"; + + string materialCode4 = this.txtMaterialCode.Text; + BasicData basicData4 = new BasicData(); + this.comboxMaterial4.DataSource = basicData4.GetMaterialInfoList(materialCode, true); + this.comboxMaterial4.DisplayMember = "MATERIAL_NAME"; + this.comboxMaterial4.ValueMember = "MATERIAL_CODE"; + + } + } + #endregion + + + /// + /// 所选零件发生改变 + /// + /// + /// + private void txtMaterialCode_TextChanged(object sender, EventArgs e) + { + radioButSignal.Checked = true; + } + + + + private void btnStart_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + btnStart.Enabled = false; + btnStop.Enabled = true; + cbPrintCount.Enabled = false; + cbPrintSpan.Enabled = false; + lblLastCount.Text = cbPrintCount.Text; + tsbPrint.Enabled = false; + btnChoiceMaterial.Enabled = false; + groupBox3.Enabled = false; + printtimer = int.Parse(cbPrintSpan.Text.Trim('s')); + LockPrintMode(2); + + } + + private void btnStop_Click(object sender, EventArgs e) + { + btnStart.Enabled = true; + btnStop.Enabled = false; + cbPrintCount.Enabled = true; + cbPrintSpan.Enabled = true; + //lblLastCount.Text = cbPrintCount.Text; + tsbPrint.Enabled = true; + btnChoiceMaterial.Enabled = true; + groupBox3.Enabled = true; + LockPrintMode(-1); + } + + int printtimer = 0; + + private void timer2_Tick(object sender, EventArgs e) + { + if (!btnStart.Enabled&&btnStop.Enabled) + { + int span=int.Parse(cbPrintSpan.Text.Trim('s')); + if (printtimer >= span) + { + CodeCreatePrint(); + printtimer = 0; + var lastcount = int.Parse(lblLastCount.Text) - 1; + lblLastCount.Text = lastcount + ""; + if (lastcount <= 0) + { + btnStop_Click(sender, e); + } + + } + else + { + printtimer++; + } + } + else + { + printtimer = 0; + } + } + + private void comMachine_SelectedIndexChanged(object sender, EventArgs e) + { + var selectmachine = comMachine.SelectedItem as MachineInfo; + if (selectmachine != null && !string.IsNullOrEmpty(selectmachine.PID)) + { + var mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = "INJ_MODEL" }).OrderBy(p => p.MODELCODE).ToList(); + mouldList.Insert(0, new MachineInfoModels { }); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + + if (selectmachine.ISCONTROL == "1") + { + HideTimerPrint(true); + } + else + { + HideTimerPrint(false); + } + } + + } + + private void btnStartFileScan_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + var selectmachine= comMachine.SelectedItem as MachineInfo; + if (selectmachine != null&&!string.IsNullOrEmpty(selectmachine.PID)) + { + txtFilePath.Text = selectmachine.EQUIPMENT_DIRECTORY; + var columns = _agent.InvokeServiceFunction>>("ProcessParameterBLL_GetAllList", new ProcessParameter { MACHINECODDE = selectmachine.MACHINECODDE }).Result; + if (columns != null) + { + paramcolumns = columns; + } + else + { + paramcolumns = new List(); + } + lvParamRecords.Items.Clear(); + lvParamRecords.Columns.Clear(); + var c1=lvParamRecords.Columns.Add("扫描时间"); + c1.Width=180; + foreach (var col in paramcolumns) + { + var c= lvParamRecords.Columns.Add(col.PARADESCRIBE); + } + if (selectmachine.EQUIPMENT_TYPE_CODE == "HaitianInjection") + { + sync = new FileSynchronizers.HaitianInjectionFileSynchronizer(selectmachine); + } + else if (selectmachine.EQUIPMENT_TYPE_CODE == "EngelInjection") + { + sync = new FileSynchronizers.EngelInjectionFileSynchronizer(selectmachine); + } + else + { + MessageBox.Show("注塑机型号未设定!", Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + sync.NewRecordFound += new EventHandler(sync_NewRecordFound); + sync.ExceptionCatched += new EventHandler(sync_ExceptionCatched); + sync.Start(cbSkipHistory.Checked); + SetConnectState(1); + btnStartFileScan.Enabled = false; + btnStopFileScan.Enabled = true; + LockPrintMode(0); + } + else + { + MessageBox.Show("请选择注塑机!", Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + /// + /// 设置连接状态 + /// + /// 0:停止 1:正常 2:断开 + void SetConnectState(int state) + { + switch (state) + { + case 0: + { + txtConnectState.Text = "扫描停止"; + picConnectState.Image = WinForm.Resource1.stop; + break; + } + case 1: + { + txtConnectState.Text = "扫描正常"; + picConnectState.Image = WinForm.Resource1.reload; + break; + } + case 2: + { + txtConnectState.Text = "连接断开"; + picConnectState.Image = WinForm.Resource1.no; + break; + } + } + } + /// + /// 锁定打印模式 + /// + /// -1 解锁; 0 联机; 1 手动; 2 定时; + void LockPrintMode(int mode) + { + for(int i=0;i + /// 隐藏定时打印模式 + /// + void HideTimerPrint(bool hide) + { + if (hide) + { + if (tpPrintMode.Controls.Contains(tpTimer)) + //tpPrintMode.Controls[tpTimer.Name].Visible = !hide; + tpPrintMode.Controls.Remove(tpTimer); + } + else + { + if (!tpPrintMode.Controls.Contains(tpTimer)) + //tpPrintMode.Controls[tpTimer.Name].Visible = !hide; + tpPrintMode.Controls.Add(tpTimer); + } + } + + void sync_ExceptionCatched(object sender, FileSynchronizers.InjParamEventArgs e) + { + this.Invoke((Action)(() => { + txtMessage.Text = e.Exception.Message; + SetConnectState(2); + })); + } + + void sync_NewRecordFound(object sender, FileSynchronizers.InjParamEventArgs e) + { + this.Invoke((Action)(() => + { + CodeCreatePrint(e.HeaderRow, e.DataRow, e.DataSeparator); + txtCurrentFile.Text = e.FileName; + txtLastScanTime.Text = e.RecordTime.ToString("hh:mm:ss"); + txtMessage.Text = e.DataRow; + var li = lvParamRecords.Items.Insert(0,e.RecordTime.ToString("yyyy-MM-dd hh:mm:ss")); + li.SubItems.AddRange(e.DataRow.Split(e.DataSeparator)); + if (lvParamRecords.Items.Count > 200) + { + lvParamRecords.Items.RemoveAt(200); + } + SetConnectState(1); + })); + } + + private void btnStopFileScan_Click(object sender, EventArgs e) + { + if (sync != null) + { + sync.Stop(); + } + SetConnectState(0); + btnStartFileScan.Enabled = true; + btnStopFileScan.Enabled = false; + LockPrintMode(-1); + } + + private void InjectionCodePrint_FormClosed(object sender, FormClosedEventArgs e) + { + if (sync != null) + { + sync.Stop(); + } + } + + private void btnLockMachine_Click(object sender, EventArgs e) + { + if (this.btnLockMachine.Tag.ToString().Equals("0")) + { + LockMachine(false); + } + else + { + LockMachine(true); + } + } + #region 设备锁定 + /// + /// 设备锁定 + /// + /// + private void LockMachine(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.btnLockMachine.Text = "锁定"; + this.btnLockMachine.Tag = "0"; + } + else + { + ClientContext.MachineInfo = this.comMachine.SelectedItem as MachineInfo; + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.btnLockMachine.Text = "解锁"; + this.btnLockMachine.Tag = "1"; + } + + } + #endregion + } +} diff --git a/.svn/pristine/4b/4b015a6c5cf548e75f9c6daa509c7c0abfbacc3b.svn-base b/.svn/pristine/4b/4b015a6c5cf548e75f9c6daa509c7c0abfbacc3b.svn-base new file mode 100644 index 0000000..8a744ed --- /dev/null +++ b/.svn/pristine/4b/4b015a6c5cf548e75f9c6daa509c7c0abfbacc3b.svn-base @@ -0,0 +1,113 @@ + <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + 条码规则信息列表 + + + + <%=Html.QPSeach(100,true) %> + + <%-- + + + + + + + + + + + + + + --%> +
+ <%=Html.QV(p=>p.MATERIALCODDE) %> + + <%=Html.QC(p => p.MATERIALCODDE)%> + + <%=Html.QV(p => p.barcodeFist)%> + + <%=Html.QC(p => p.barcodeFist)%> + + <%=Html.QV(p => p.Company_code)%> + + <%=Html.QC(p => p.Company_code)%> +
+ <%=Html.QV(p => p.Vehicle_type)%> + + <%=Html.QC(p => p.Vehicle_type)%> + + <%=Html.QV(p => p.configColor)%> + + <%=Html.QC(p => p.configColor)%> +
+
+ + <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("PID")%> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("MPID")%> + <%-- <%=Html.Hidden("Line_code")%> + <%=Html.Hidden("Line_name")%>--%> + +
+ + + + + +
+ <%=Html.QTButtonSearch("CHECKTIME", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("CHECKTIME", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
+ diff --git a/.svn/pristine/4b/4b5e02890136cac139b6ef2bbba0494c1c1f05f2.svn-base b/.svn/pristine/4b/4b5e02890136cac139b6ef2bbba0494c1c1f05f2.svn-base new file mode 100644 index 0000000..0d01813 Binary files /dev/null and b/.svn/pristine/4b/4b5e02890136cac139b6ef2bbba0494c1c1f05f2.svn-base differ diff --git a/.svn/pristine/4b/4b9493c767bd8f7ce2315d7facda6a531d87bc74.svn-base b/.svn/pristine/4b/4b9493c767bd8f7ce2315d7facda6a531d87bc74.svn-base new file mode 100644 index 0000000..786bd50 Binary files /dev/null and b/.svn/pristine/4b/4b9493c767bd8f7ce2315d7facda6a531d87bc74.svn-base differ diff --git a/.svn/pristine/4b/4bc9cc99ea2844a7a91920f773416be19fd8c6d1.svn-base b/.svn/pristine/4b/4bc9cc99ea2844a7a91920f773416be19fd8c6d1.svn-base new file mode 100644 index 0000000..cb3ae65 --- /dev/null +++ b/.svn/pristine/4b/4bc9cc99ea2844a7a91920f773416be19fd8c6d1.svn-base @@ -0,0 +1,339 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialRecordDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterialRecord Get(RawMaterialRecord info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterialRecord Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_RawMaterialRecord] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public int GetMaterialCodeCount(string MaterialCode) + { + try + { + string sql = $"SELECT R.* FROM T_MD_RawMaterialRecord as R LEFT JOIN T_MD_RawMaterial as M ON R.RawMaterialPID = M.PID WHERE M.PID = '{MaterialCode}'"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", MaterialCode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.GetList(sql, parameters.ToArray()); + return info.Count; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(RawMaterialRecord condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListRecord(RawMaterialRecord condition) + { + string sql = null; + List parameters = new List(); + var list = new List(); + try + { + sql = $"select BucketCode,PartCode, MAX(UPDATEDATE) AS UPDATEDATE from T_MD_RawMaterialRecord where BucketCode = '{condition.BucketCode}' and PartCode = '{condition.PartCode}' group by BucketCode,PartCode order by CREATEDATE desc"; + //分页关键字段及排序 + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + list = session.GetList(sql, parameters.ToArray()).ToList(); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(RawMaterialRecord condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT R.PID,R.ProductCode,R.MaterialCode,R.MaterialName,R.MachineCode,M.BucketCode,M.PartCode,M.BatchCode,M.SerialCode,R.IsCheck,R.CREATEUSER,R.CREATEDATE,R.UPDATEUSER,R.UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_RawMaterialRecord AS R LEFT JOIN T_MD_RawMaterial AS M ON R.RawMaterialPID = M.PID "); + whereBuilder.Append(" AND R.IsCheck<> '1' "); + if (condition.BeginTime != "0001/1/1 00:00:00") + { + whereBuilder.Append($" AND R.CREATEDATE >= '{condition.BeginTime}'"); + } + else + { + whereBuilder.Append($" AND R.CREATEDATE >= '{DateTime.Now.AddDays(-5)}'"); + } + if (condition.EndTime != "0001/1/1 00:00:00") + { + whereBuilder.Append($" AND R.CREATEDATE <= '{condition.EndTime}'"); + } + else + { + whereBuilder.Append($" AND R.CREATEDATE <= '{DateTime.Now.AddDays(+1)}'"); + } + + if (string.IsNullOrEmpty(condition.PartCode) == false) + { + whereBuilder.Append(" AND M.PartCode = @PartCode"); + parameters.Add(new DataParameter { ParameterName = "PartCode", DataType = DbType.String, Value = condition.PartCode }); + } + if (string.IsNullOrEmpty(condition.ProductCode) == false) + { + whereBuilder.Append(" AND R.ProductCode = @ProductCode"); + parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); + } + + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(RawMaterialRecord info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_RawMaterialRecord"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(RawMaterialRecord info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(RawMaterialRecord info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_RawMaterialRecord "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/4c/4cab3c5bcd4f1c98fbad4516044502223efee72c.svn-base b/.svn/pristine/4c/4cab3c5bcd4f1c98fbad4516044502223efee72c.svn-base new file mode 100644 index 0000000..18b9b7d --- /dev/null +++ b/.svn/pristine/4c/4cab3c5bcd4f1c98fbad4516044502223efee72c.svn-base @@ -0,0 +1,3522 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + //private string _cfgAutoProduct = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = GetAppConfigValue("AutoInput条码正则表达式"); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //if(string.IsNullOrEmpty(_cfgAutoProduct)) + // _cfgAutoProduct = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + else + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex) && processMainCode != productCode) + { + processMainCode = productCode; + } + } + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _bentiBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); + if (filterList.Count > 0) + { + string PBOM_CODE = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), PBOM_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + } + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr || "IP_ASSEMBLING,GWASSEMBLE_VW371PA".Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + if (record == null) + { + record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_Get316Record.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetMaterial.ToString(), new BZDConfig() { MATERIALCODDE = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + else + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/4d/4d424a238bffd7d37788555aa7de2ddabf3462dd.svn-base b/.svn/pristine/4d/4d424a238bffd7d37788555aa7de2ddabf3462dd.svn-base new file mode 100644 index 0000000..d09ee6b --- /dev/null +++ b/.svn/pristine/4d/4d424a238bffd7d37788555aa7de2ddabf3462dd.svn-base @@ -0,0 +1,294 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketInfoDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketInfo Get(BucketInfo info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketInfo Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_BUCKETINFO] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BucketInfo condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetALL() + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_MD_BUCKETINFO WHERE IsCheck<> '1'"; + //分页关键字段及排序 + var LIST = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + LIST = session.GetList(sql, parameters.ToArray()).ToList(); + } + return LIST; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BucketInfo condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + + //构成查询语句 + sqlBuilder.Append("SELECT PID,BucketCode,BucketName,MaterialCode,IsCheck,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_BUCKETINFO "); + whereBuilder.Append(" AND IsCheck<> '1' "); + + if (string.IsNullOrEmpty(condition.BucketName) == false) + { + whereBuilder.Append(" AND BucketName = @BucketName"); + parameters.Add(new DataParameter { ParameterName = "BucketName", DataType = DbType.String, Value = condition.BucketName }); + } + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BucketInfo info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_BUCKETINFO"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BucketInfo info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BucketInfo info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_BUCKETINFO "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/4e/4e95d68c6de82f0a6d520da0a02328ffd8c29bca.svn-base b/.svn/pristine/4e/4e95d68c6de82f0a6d520da0a02328ffd8c29bca.svn-base new file mode 100644 index 0000000..0803a91 Binary files /dev/null and b/.svn/pristine/4e/4e95d68c6de82f0a6d520da0a02328ffd8c29bca.svn-base differ diff --git a/.svn/pristine/4e/4eab91f9b71aed088f53d9fc111abd5dbc9a7eff.svn-base b/.svn/pristine/4e/4eab91f9b71aed088f53d9fc111abd5dbc9a7eff.svn-base new file mode 100644 index 0000000..1c3670a --- /dev/null +++ b/.svn/pristine/4e/4eab91f9b71aed088f53d9fc111abd5dbc9a7eff.svn-base @@ -0,0 +1,115 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + Library + Properties + QMAPP.MD.Entity + QMAPP.MD.Entity + v4.0 + 512 + Svn + Svn + Svn + SubversionScc + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + + + + + + + + + + True + True + AppResource.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + ResXFileCodeGenerator + AppResource.Designer.cs + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/4e/4ef07762a4e1bbed129e8bff781f87b1dce5278d.svn-base b/.svn/pristine/4e/4ef07762a4e1bbed129e8bff781f87b1dce5278d.svn-base new file mode 100644 index 0000000..56541f8 Binary files /dev/null and b/.svn/pristine/4e/4ef07762a4e1bbed129e8bff781f87b1dce5278d.svn-base differ diff --git a/.svn/pristine/51/513a47845e2284e5008d66e8d9559580a73f32c5.svn-base b/.svn/pristine/51/513a47845e2284e5008d66e8d9559580a73f32c5.svn-base new file mode 100644 index 0000000..30827ec --- /dev/null +++ b/.svn/pristine/51/513a47845e2284e5008d66e8d9559580a73f32c5.svn-base @@ -0,0 +1,3329 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["AutoInput条码正则表达式"]?.Trim(); + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + ispass = true; + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex))//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.MATERIAL_CODE)).ToList(); + if (filterList.Count > 0) + { + string bomCode = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + PrintAssemblyLabel(result.ProcessCode); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabe(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + + #region 总成装配打印 + + rePrintBzd.barcode = main.MAINCODE; + rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + rePrintBzd.color = mcinit.COLOR; + + try + { + Report = new GridppReport(); + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + } + + + //新增 + private BZD rePrintBzd = new BZD(); + + private void ReadFetchRecordBox2() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// + public void Print052QRCODE() + { + try + { + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["PBOM_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + #endregion + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + PrintAssemblyLabel(selectKey); + } + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/51/51a351bfd5d87fae7ac6fadaa7e1064f3c2006a6.svn-base b/.svn/pristine/51/51a351bfd5d87fae7ac6fadaa7e1064f3c2006a6.svn-base new file mode 100644 index 0000000..878b25d Binary files /dev/null and b/.svn/pristine/51/51a351bfd5d87fae7ac6fadaa7e1064f3c2006a6.svn-base differ diff --git a/.svn/pristine/52/521323bb552924bf30428969dd84581ff65eea93.svn-base b/.svn/pristine/52/521323bb552924bf30428969dd84581ff65eea93.svn-base new file mode 100644 index 0000000..111a24a --- /dev/null +++ b/.svn/pristine/52/521323bb552924bf30428969dd84581ff65eea93.svn-base @@ -0,0 +1,3535 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + //private string _cfgAutoProduct = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + private string _371BiaoPiBarCodeRegex = string.Empty; //表皮码 + private string _316BiaoPiBarCodeRegex = string.Empty; //表皮码 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = GetAppConfigValue("AutoInput条码正则表达式"); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + _371BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则371"]; + _316BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则316"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //if(string.IsNullOrEmpty(_cfgAutoProduct)) + // _cfgAutoProduct = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE) && result.Success) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + else + { + if ((System.Text.RegularExpressions.Regex.IsMatch(productCode, _371BiaoPiBarCodeRegex) || System.Text.RegularExpressions.Regex.IsMatch(productCode, _316BiaoPiBarCodeRegex)) + && processMainCode != productCode) + { + processMainCode = productCode; + } + } + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是过程主码 + { + if (!string.IsNullOrEmpty(result.WorkOrderID)) + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr })) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() + { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + //else + //{ + // this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + // this.lblError.ForeColor = Color.Black; + // MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + //} + } + else + { + this.lblError.Text = "result.WorkOrderID为空,未进行后续填充!"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"result.WorkOrderID为空,未进行后续填充!"); + } + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _bentiBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); + if (filterList.Count > 0) + { + string PBOM_CODE = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), PBOM_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + } + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr || "IP_ASSEMBLING,GWASSEMBLE_VW371PA".Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码失败!缺少list[3];planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码异常!list=null;planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + if (record == null) + { + record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_Get316Record.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetMaterial.ToString(), new BZDConfig() { MATERIALCODDE = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + else + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/54/54acdd06be7a05567dfc4f523315501e4cbe2ef1.svn-base b/.svn/pristine/54/54acdd06be7a05567dfc4f523315501e4cbe2ef1.svn-base new file mode 100644 index 0000000..aad79d3 --- /dev/null +++ b/.svn/pristine/54/54acdd06be7a05567dfc4f523315501e4cbe2ef1.svn-base @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.FJC.Web.Models.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.MD.Web.Models; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.FJC.Web.Models.Bucket; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.Web.Controllers +{ + public class BucketMaterialClassController : QController + { + #region 获取信息 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callback) + { + BucketMaterialClassModel seachModel = new BucketMaterialClassModel(); + if (callback == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.url = "/BucketMaterialClass/GetList"; + return View("BucketMaterialClassList", seachModel); + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + BucketMaterialClassModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + BucketMaterialClass condition = null; + DataResult pageResult = new DataResult(); + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + + pageResult = wcfAgent.InvokeServiceFunction>("BucketMaterialClassBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + return Content(result.GetJsonSource()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 编辑 + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult Edit() + { + BucketMaterialClassModel model = new BucketMaterialClassModel(); + string ID = Request.Params["PID"]; + BucketMaterialClass Entity = new BucketMaterialClass(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + if (string.IsNullOrEmpty(ID) == false) + { + //修改获取原数据 + Entity.PID = ID; + result = wcfAgent.InvokeServiceFunction>("BucketMaterialClassBLL_Get", Entity); + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return View("BucketMaterialClassEdit", model); + } + model = CopyToModel(result.Result); + } + return View("BucketMaterialClassEdit", model); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 保存 + /// + /// + /// 处理结果 + [HttpPost] + [HandleException] + [ValidateInput(false)] + public ActionResult Save(BucketMaterialClassModel saveModel) + { + BucketMaterialClass Entity = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + Entity = CopyToModel(saveModel); + if (string.IsNullOrEmpty(Entity.PID) == true) + { + //新增 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketMaterialClassBLL_Insert.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketMaterialClassEdit", saveModel); + } + } + else + { + //修改 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketMaterialClassBLL_Update.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketMaterialClassEdit", saveModel); + } + } + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除 + /// + /// 结果 + [HttpPost] + [HandleException] + public ActionResult Delete(BucketMaterialClass model) + { + string selectKey = Request.Form["selectKey"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + + try + { + var result = wcfAgent.InvokeServiceFunction(QMAPP.ServicesAgent.DictService.BucketMaterialClassBLL_Delete.ToString(), selectKey); + if (result == 0) + { + SetMessage("信息有关联,删除失败!"); + return List(true); + } + SetMessage(AppResource.DeleteMessage); + return List(true); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } +} diff --git a/.svn/pristine/54/54f7aa142372650dec010bf940ad9dca46a86bd4.svn-base b/.svn/pristine/54/54f7aa142372650dec010bf940ad9dca46a86bd4.svn-base new file mode 100644 index 0000000..089e645 --- /dev/null +++ b/.svn/pristine/54/54f7aa142372650dec010bf940ad9dca46a86bd4.svn-base @@ -0,0 +1,748 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Resources\4C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5A_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 没有找到对应的条码! + + + Resources\1D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该设备状态为异常,是否确定删除并恢复正常? + + + Resources\edit_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 物料号不存在! + + + Resources\2E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该零件不是返修状态! + + + 条码有误! + + + Resources\5E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 高低配不能为空! + + + Resources\mby1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请输入21位条码! + + + Resources\3D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\signal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该产品已经作废! + + + Resources\2A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 出库成功! + + + Resources\1C.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该设备没有多个模具 + + + 该料架内没有任何产品! + + + 请选择返修方式! + + + resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请验证条码信息! + + + 该料架已经装满,是否生成条码? + + + 搪塑设备不能为空! + + + Resources\cut.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 生产日期不能为空! + + + Resources\5B_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 删除成功。 + + + 保存失败 + + + 监控值范围的开始值不能大于截止值! + + + 颜色不能为空! + + + 停机原因不能为空! + + + Resources\ybbst.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该产品正在返修! + + + Resources\5B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 腔不能为空! + + + Resources\template.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\chart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5F_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 是否确认退出登录? + + + Resources\6F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\qgs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2A_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 停机结束时间不能小于开始时间! + + + Resources\4D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\forward.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\net.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 操作开始时间不能大于操作结束时间! + + + 条码号重复! + + + Resources\3B_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\reload.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1C.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 条码信息不存在! + + + 提示 + + + Resources\xt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\print1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\barchart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\back.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1B_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 是否确认删除选中信息? + + + Resources\skj.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\login.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\h1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请选择返修原因! + + + Resources\cancle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\recover.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该零件不需要放行! + + + Resources\2B_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1A_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\stgj.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\zbcj.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4F_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\network.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 超出有效期 + + + Resources\no.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1F_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请选择登记状态! + + + 该料架已经有产品,是否确认切换料架,并清除产品列表? + + + 该产品已经在该料架列表中! + + + Resources\st.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 料架数量不能为空! + + + Resources\2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\edit_remove.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请选择返修结果! + + + 高低配属性与料架不匹配! + + + Resources\qnzjh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请选择监控值! + + + Resources\3E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\print.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 开始时间不能大于结束时间! + + + Resources\5A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 状态不能为空! + + + Resources\lsgb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\redo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2E.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该批次号物料已使用,不能删除! + + + 入库成功! + + + 未找到该产品表皮属性! + + + Resources\3C.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\splash.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 物料号不能为空! + + + 该零件不是在库状态!不能出库! + + + Resources\4D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\dtd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 注塑设备不能为空! + + + 停机开始时间不能为空! + + + resources\search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 颜色属性与料架不匹配! + + + 条码不能为空 + + + Resources\2F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4A_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 投料人不能为空! + + + Resources\1B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 数量格式不正确! + + + 投料批次不能为空! + + + Resources\filesave.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\fs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\ok.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\6C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 料架已满请保存! + + + 产品类别不能为空! + + + Resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\3A.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\mbz2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该零件返修中不能进行登记! + + + 当前设备状态为异常,不能新建停机记录! + + + Resources\3A_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\1C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\zxhb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请输入监控数量! + + + Resources\mbz1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 保存成功。 + + + 料架零件号不纯在 + + + Resources\4B.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 设备不能为空! + + + 加工时间不能为空! + + + 重量不能为空! + + + Resources\3C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\yfd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\ybb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该产品不满足发货条件或已发货! + + + 未找到零件! + + + Resources\1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\2D.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\mby2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5F.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\5C_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\re.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 该零件已使用,不能删除! + + + Resources\6D_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\zfd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 入料口不能为空! + + + Resources\2F_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 物料类别不能为空! + + + Resources\4E_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\4B_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\pencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\zhb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 模腔号不能为空! + + + Resources\mznb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请先选择料架! + + + Resources\3F_select.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 未检索到任何数据! + + + 重量格式错误! + + + 数量不能为空! + + + Resources\call.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Resources\InJ.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + 请选择零件号信息! + + + 所选物料信息不满足打印多码条件! + + \ No newline at end of file diff --git a/.svn/pristine/56/560e6e8e4f901df0ffcf2aba5621215a9955d499.svn-base b/.svn/pristine/56/560e6e8e4f901df0ffcf2aba5621215a9955d499.svn-base new file mode 100644 index 0000000..9894f8b --- /dev/null +++ b/.svn/pristine/56/560e6e8e4f901df0ffcf2aba5621215a9955d499.svn-base @@ -0,0 +1,330 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.CheckTime; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; + +namespace QMAPP.FJC.DAL.CheckTime +{ + /// + /// 模块名称:本地库无记录的 时间验证 + /// 作 者:张松男 + /// 编写日期:2020年03月00日 + /// + public class CHECKTIMEDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public CHECKTIME Get(CHECKTIME info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public CHECKTIME Get(string PID) + { + try + { + string sql = "SELECT * FROM [T_MD_PRODUCT_TIMECHECK_Product] WHERE [PID]=@PID"; + List parameters = new List(); + parameters.Add(new DataParameter("PID", PID)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(CHECKTIME condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(CHECKTIME condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,WorkLoc_Code,CodeTimeStart,CodeTimeNumber,State,Check_Value,Operator,Check_Type,Remark,Check_ValueTo,DAI_Code,Column1,Column2 "); + sqlBuilder.Append("FROM T_MD_PRODUCT_TIMECHECK_Product "); + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 根据工位,采集点查找记录 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public List SelectCheck(string LocWorkCode ,string DAI_CODE) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + + try + { + sqlBuilder.Append($"SELECT PID,WorkLoc_Code,CodeTimeStart,CodeTimeNumber,State,Check_Value,Operator,Check_Type,Remark,Check_ValueTo,DAI_Code,Column1,Column2 FROM T_MD_PRODUCT_TIMECHECK_Product WHERE WorkLoc_Code = '{LocWorkCode}' AND DAI_Code = '{DAI_CODE}' and State = '0'"); + + //添加进行无重复字段判断代码 + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sqlBuilder.ToString(), parameters.ToArray()).ToList(); + } + + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public ProductTime GetTimeCheckCfg(string LocWorkCode, string DAI_CODE) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + + try + { + List timeCheck = new List(); + string sqlScript = $" select * from T_MD_PRODUCT_TIMECHECK where CWorkLoc_Code ='{LocWorkCode}' and DAI_Code = '{DAI_CODE}' and [Check]='1' order by UPDATEDATE desc,CREATEDATE desc "; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + + timeCheck = session.GetList(sqlScript.ToString(), parameters.ToArray()).ToList(); + if(timeCheck != null && timeCheck.Count>0) + return timeCheck[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + + public DataTable GetConfigValue(ProductTime timeCheckModel, string productCode) + { + List parameters = new List(); + string sqlScript = $" select {timeCheckModel.Check_Column} as CheckColumnValue from {timeCheckModel.Check_Table} where {timeCheckModel.PWorkLoc_Column} ='{timeCheckModel.PWorkLoc_Code}' and {timeCheckModel.Product_Column}='{productCode}' "; + if (!string.IsNullOrEmpty(timeCheckModel.PWhere)) + { + sqlScript = sqlScript + " and " + timeCheckModel.PWhere; + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); + var table = session.GetTable(sqlScript.ToString(), parameters.ToArray()); + return table; + } + + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(CHECKTIME info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_PRODUCT_TIMECHECK_Product"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(CHECKTIME info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(CHECKTIME info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + public DateTime GetServiceDateTime() + { + StringBuilder sql = new StringBuilder(); + try + { + List parameters = new List(); + string sqlScript = @"select GetDATE() as time "; + DataTable datatable = new DataTable(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + datatable = session.GetTable(sqlScript, parameters.ToArray()); + } + + if (datatable.Rows.Count > 0) + { + string datetimestr = datatable.Rows[0]["time"].ToString(); + return DateTime.Parse(datetimestr); + } + + return DateTime.Now; + } + catch (Exception ex) + { + throw ex; + } + } + + } +} diff --git a/.svn/pristine/56/5678cb226b36d1705bd28103978075eb14ba9d53.svn-base b/.svn/pristine/56/5678cb226b36d1705bd28103978075eb14ba9d53.svn-base new file mode 100644 index 0000000..696489f --- /dev/null +++ b/.svn/pristine/56/5678cb226b36d1705bd28103978075eb14ba9d53.svn-base @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace Stone.WinModuleTransWare.Properties +{ + + + /// + /// 强类型资源类,用于查找本地化字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的缓存 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Stone.WinModuleTransWare.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 覆盖当前线程的 CurrentUICulture 属性 + /// 使用此强类型的资源类的资源查找。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/.svn/pristine/57/57090e3407a3a1a6c29cc00ea53380d8b7558a7d.svn-base b/.svn/pristine/57/57090e3407a3a1a6c29cc00ea53380d8b7558a7d.svn-base new file mode 100644 index 0000000..91daf72 --- /dev/null +++ b/.svn/pristine/57/57090e3407a3a1a6c29cc00ea53380d8b7558a7d.svn-base @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.FJC.Entity.Operation; +using QMAPP.Entity; +using QMAPP.ServicesAgent; +using QMAPP.MD.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.WinForm.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.BZD; +using QMAPP.WinForm.Forms.Injection; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// + /// + public partial class InjectionMoldingPasswordForm : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + private InjectionMoldingNEWEditForm _parentForm; + + private string _msg = string.Empty; + + /// + /// + /// + /// + public InjectionMoldingPasswordForm(string Msg) + { + InitializeComponent(); + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + _msg = Msg; + } + + #region 打印按钮 + + /// + /// 打印按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + string MakeUpBZD = ""; + DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "MakeUpInjection"); + if (dataTable.Rows.Count > 0) + { + MakeUpBZD = dataTable.Rows[0]["Value"].ToString(); + } + + if (string.IsNullOrEmpty(MakeUpBZD)) + MakeUpBZD = "admin"; + if (string.IsNullOrEmpty(txtMainCode.Text)) + { + infolabel.Text = "请输入密码!"; + this.Show(); + + } + if (txtMainCode.Text == MakeUpBZD) + { + this.DialogResult = DialogResult.OK; + this.Close(); + + } + else + { + infolabel.Text = "密码输入错误!"; + this.Show(); + + } + + } + catch (Exception exception) + { + //MessageBox.Show("打印失败!"); + throw; + } + } + + #endregion + + private void InjectionMoldingPasswordForm_Load(object sender, EventArgs e) + { + this.label1.Text = _msg; + } + } +} \ No newline at end of file diff --git a/.svn/pristine/57/57d6c0c7d1c47ebc4c633080081b8f844a9681c6.svn-base b/.svn/pristine/57/57d6c0c7d1c47ebc4c633080081b8f844a9681c6.svn-base new file mode 100644 index 0000000..87c6b3b --- /dev/null +++ b/.svn/pristine/57/57d6c0c7d1c47ebc4c633080081b8f844a9681c6.svn-base @@ -0,0 +1,734 @@ + + + + + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 设置密码 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 查看/回复 + 导出 + + + + + 查询 + 导出 + + + + + + + + + 保存 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + 配置设备 + + + + + 查询 + 新建 + 修改 + 删除 + 工序配置 + + + + + 查询 + 新建 + 删除 + 配置BOM明细 + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加1 + 添加2 + 删除 + + + + + 查询 + 修改 + 同步数据 + + + + + 查询 + 修改 + 启用 + 禁用 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + + + + + 查询 + 修改 + + + + + 查询 + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 添加 + 整车添加 + 修改 + 修改计划顺序号 + 插单 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 新建 + 修改 + 修改计划顺序号 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 导出 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 盘点明细 + 盘点对比 + 比对结果 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + + 查询 + 添加 + 编辑 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 查看明细 + 导出 + + + + + + 查询 + 导出 + + + + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/59/59717bc5c86e9cf3988c68f62d9d87f213a514db.svn-base b/.svn/pristine/59/59717bc5c86e9cf3988c68f62d9d87f213a514db.svn-base new file mode 100644 index 0000000..24d8d7e --- /dev/null +++ b/.svn/pristine/59/59717bc5c86e9cf3988c68f62d9d87f213a514db.svn-base @@ -0,0 +1,17 @@ + + + + + True + False + True + Release + Any CPU + FileSystem + C:\Users\Administrator\Desktop\发布\CDMES\APPWeb + FileSystem + + + \ No newline at end of file diff --git a/.svn/pristine/59/599c4d126b55f629fef1929528cf564f8d678fd2.svn-base b/.svn/pristine/59/599c4d126b55f629fef1929528cf564f8d678fd2.svn-base new file mode 100644 index 0000000..2d4ce3b --- /dev/null +++ b/.svn/pristine/59/599c4d126b55f629fef1929528cf564f8d678fd2.svn-base @@ -0,0 +1,288 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + Library + Properties + QMAPP.FJC.BLL + QMAPP.FJC.BLL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLL\BarcodeLib.dll + + + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\XGate\Ptl.Device.dll + + + ..\..\DLL\XGate\Ptl.Device.XmlSerializers.dll + + + ..\..\QMFrameWork\QMFrameWork.Cache.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {8A50A215-C033-42DC-A656-BC1F117DA6BA} + QM.Exchange.Adapters + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + Always + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/5a/5a6d6d8064bb0a923e1aa4fb4f663cbba11fcbb7.svn-base b/.svn/pristine/5a/5a6d6d8064bb0a923e1aa4fb4f663cbba11fcbb7.svn-base new file mode 100644 index 0000000..b1e42cf --- /dev/null +++ b/.svn/pristine/5a/5a6d6d8064bb0a923e1aa4fb4f663cbba11fcbb7.svn-base @@ -0,0 +1,2321 @@ + + + + + <_PublishTargetUrl>C:\Users\Administrator\Desktop\发布\CDMES\APPWeb + + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 06/08/2021 15:41:43 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:18:55 + + + 09/01/2021 10:48:00 + + + 02/26/2021 09:31:12 + + + 09/01/2021 10:48:00 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:46 + + + 07/19/2012 10:59:52 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:01 + + + 09/01/2021 10:48:01 + + + 09/01/2021 10:47:59 + + + 09/01/2021 10:47:59 + + + 09/01/2021 10:48:04 + + + 02/26/2021 09:19:26 + + + 09/01/2021 10:48:04 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:00 + + + 09/01/2021 10:48:00 + + + 09/01/2021 12:07:15 + + + 09/01/2021 12:07:15 + + + 09/01/2021 10:48:04 + + + 09/01/2021 10:48:04 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:02 + + + 09/01/2021 10:48:01 + + + 09/01/2021 10:48:01 + + + 09/01/2021 12:07:11 + + + 05/26/2021 14:26:31 + + + 09/01/2021 12:07:11 + + + 09/01/2021 10:36:17 + + + 09/01/2021 10:36:17 + + + 09/01/2021 10:47:59 + + + 02/26/2021 09:27:17 + + + 09/01/2021 10:47:59 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/01/2012 09:06:22 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 05/25/2021 15:34:18 + + + 02/26/2021 09:20:37 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 05/25/2021 15:10:43 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 08/11/2021 08:03:25 + + + 07/20/2021 10:28:32 + + + 08/11/2021 08:17:06 + + + 07/21/2021 09:09:17 + + + 08/11/2021 14:43:39 + + + 08/11/2021 14:28:37 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/24/2021 21:46:03 + + + 05/24/2021 21:41:10 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 07/22/2021 15:26:52 + + + 08/24/2021 13:56:30 + + + 07/22/2021 15:27:35 + + + 08/10/2021 10:51:20 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 08/24/2021 14:26:02 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 09/01/2021 08:59:33 + + + \ No newline at end of file diff --git a/.svn/pristine/5b/5b31f7198a7e79c2f6113fe210ed4f888e8d6f99.svn-base b/.svn/pristine/5b/5b31f7198a7e79c2f6113fe210ed4f888e8d6f99.svn-base new file mode 100644 index 0000000..6ffc2f1 --- /dev/null +++ b/.svn/pristine/5b/5b31f7198a7e79c2f6113fe210ed4f888e8d6f99.svn-base @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace QMAPP.WinForm +{ + public static class GlobalConfig + { + public const string UpdateFileName = "自动更新设置.ini"; + + + + + + + public static T GetConfigValues(string filename) where T : new() + { + T t = new T(); + if (FileHelper.Exists(filename)) + { + t = JsonHelper.ReadConfigFromFile(filename); + } + else + { + throw new Exception($"配置文件{filename}丢失,请重新配置"); + } + + return t; + } + + } +} diff --git a/.svn/pristine/5c/5c1c97e9ce95997c5cea9e376604ba9145e722b4.svn-base b/.svn/pristine/5c/5c1c97e9ce95997c5cea9e376604ba9145e722b4.svn-base new file mode 100644 index 0000000..986ba20 --- /dev/null +++ b/.svn/pristine/5c/5c1c97e9ce95997c5cea9e376604ba9145e722b4.svn-base @@ -0,0 +1,72 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + +
+ <%=Html.QV(p=>p.MaterialCode) %> + + <%=Html.QC(p => p.MaterialCode)%> +
+ <%=Html.QV(p => p.RawMaterial)%> + + <%=Html.QC(p => p.RawMaterial)%> +
+
+ <%=Html.HiddenFor(p=>p.PID) %> + <%=Html.HiddenFor(p => p.IsCheck)%> + <%=Html.HiddenFor(p=>p.CREATEDATE) %> + <%=Html.HiddenFor(p=>p.CREATEUSER) %> + <%=Html.HiddenFor(p=>p.UPDATEDATE)%> + <%=Html.HiddenFor(p=>p.UPDATEUSER) %> + <%=Html.QPEnd() %> + +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "BucketMaterialClass", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/5c/5cdf8464c623923bc43be5bc4539e0d7c259b820.svn-base b/.svn/pristine/5c/5cdf8464c623923bc43be5bc4539e0d7c259b820.svn-base new file mode 100644 index 0000000..3374b15 --- /dev/null +++ b/.svn/pristine/5c/5cdf8464c623923bc43be5bc4539e0d7c259b820.svn-base @@ -0,0 +1 @@ +,*VWg߮WՓ뗏훤򭗔로햚יꇙЋ񝪷 \ No newline at end of file diff --git a/.svn/pristine/5e/5e15c9b80d184ba19eb790d0b7d1f4e6fd2e8f92.svn-base b/.svn/pristine/5e/5e15c9b80d184ba19eb790d0b7d1f4e6fd2e8f92.svn-base new file mode 100644 index 0000000..76391fa --- /dev/null +++ b/.svn/pristine/5e/5e15c9b80d184ba19eb790d0b7d1f4e6fd2e8f92.svn-base @@ -0,0 +1,173 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {87D7693E-EBF5-42FF-994A-C0B325E7B529} + WinExe + Properties + CompleteStatisticsService + CompleteStatisticsService + v4.0 + + + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\DLL\log4net.dll + + + ..\..\..\DLL\MySql.Data.dll + + + ..\..\..\DLL\Newtonsoft.Json.dll + + + ..\..\..\packages\NSoup.0.8.0\lib\net40\NSoup.dll + + + ..\..\..\packages\Oracle.DataAccess.x86.4.4.112.3\lib\Oracle.DataAccess.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Common.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + Component + + + CompleteStatisticsService.cs + + + + Component + + + ProjectInstaller.cs + + + + + + + + + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} + QMAPP.FJC.Web + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + ProjectInstaller.cs + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/5e/5e611bdb66c5bec56a5fb28ebe8891568569777a.svn-base b/.svn/pristine/5e/5e611bdb66c5bec56a5fb28ebe8891568569777a.svn-base new file mode 100644 index 0000000..ab552ef --- /dev/null +++ b/.svn/pristine/5e/5e611bdb66c5bec56a5fb28ebe8891568569777a.svn-base @@ -0,0 +1,678 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.MD.Entity; +using QMFrameWork.Data; +using System.Data; +using QMAPP.DAL; +using QMAPP.Entity; +using QMAPP.Entity.Sys; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.DAL.BZD; + +namespace QMAPP.MD.DAL +{ + /// + /// 模块名称:BZD记录 + /// 作 者:宁红钢 + /// 编写日期:2020年04月29日 + /// + public class BZDRecorderDAL : BaseDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BZDRecorder2 Get(BZDRecorder2 info) + { + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + public BZDRecorder2 GetRecord(BZDRecorder2 info) + { + try + { + + List parameters = new List(); + var sql = "SELECT * FROM T_BD_BZDRecorder WHERE 1=1 "; + if (string.IsNullOrEmpty(info.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", info.PID)); + } + if (string.IsNullOrEmpty(info.PRODUCTCODE) == false) + { + sql += " AND PRODUCTCODE = @PRODUCTCODE"; + parameters.Add(new DataParameter("PRODUCTCODE", info.PRODUCTCODE)); + } + + + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + + var list = session.GetList(sql, parameters.ToArray()).ToList(); + if (list.Count > 0) + return list[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + + public BZDRecorder2 Get316Record(BZDRecorder2 info) + { + try + { + + List parameters = new List(); + var sql = "SELECT MAINCODE as 'BZDCODE',MATERIAL_CODE as 'MPID' FROM T_AW_MAIN WHERE 1=1 "; + if (string.IsNullOrEmpty(info.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", info.PID)); + } + if (string.IsNullOrEmpty(info.PRODUCTCODE) == false) + { + sql += " AND EPIDERMISCODE = @PRODUCTCODE"; + parameters.Add(new DataParameter("PRODUCTCODE", info.PRODUCTCODE)); + } + + + using (IDataSession session = AppDataFactory.CreateSession("maindb")) + { + //获取信息 + + var list = session.GetList(sql, parameters.ToArray()).ToList(); + if (list.Count > 0) + return list[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BZDRecorder2 condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql2(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + // 对应多种数据库 + //string sqlChange = this.ChangeSqlByDB(sql, session); + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取全部规则 + /// + /// + public List GetAllList() + { + try + { + string sql = "select R.pid,r.mpid,C.MATERIALCODDE,R.BZDCODE,R.ProductCode,R.Sequence,C.Company_name,C.Line_name,R.CREATEUSER,R.CREATEDATE from T_BD_BZDRecorder R,T_BD_BZDConfig c WHERE r.MPID = c.PID"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BZDRecorder condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句//[PID],[MPID],[barcodeFist],[Company_code],[Vehicle_type],[MATERIALCODDE],[configColor],[CREATEUSER],[CREATEDATE],[FLGDEL] + sqlBuilder.Append("select * "); + sqlBuilder.Append("FROM T_BD_BZDRecorder"); + //whereBuilder.Append(" AND FLGDEL<> '1' "); + //查询条件 + + //查询条件 + //if (string.IsNullOrEmpty(condition.Company_name) == false) + //{ + // whereBuilder.Append(" AND C.Company_name = @Company_name "); + // parameters.Add(new DataParameter { ParameterName = "Company_name", DataType = DbType.String, Value = condition.Company_name }); + //} + //if (string.IsNullOrEmpty(condition.Line_name) == false) + //{ + // whereBuilder.Append(" AND C.Line_name = @Line_name "); + // parameters.Add(new DataParameter { ParameterName = "Line_name", DataType = DbType.String, Value = condition.Line_name }); + //} + //if (string.IsNullOrEmpty(condition.Company_code) == false) + //{ + // whereBuilder.Append(" AND C.Company_code = @Company_code "); + // parameters.Add(new DataParameter { ParameterName = "Company_code", DataType = DbType.String, Value = condition.Company_code }); + //} + //if (string.IsNullOrEmpty(condition.Line_code) == false) + //{ + // whereBuilder.Append(" AND C.Line_code = @Line_code "); + // parameters.Add(new DataParameter { ParameterName = "Line_code", DataType = DbType.String, Value = condition.Line_code }); + //} + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql2(BZDRecorder2 condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句//[PID],[MPID],[barcodeFist],[Company_code],[Vehicle_type],[MATERIALCODDE],[configColor],[CREATEUSER],[CREATEDATE],[FLGDEL] + sqlBuilder.Append("select R.pid as pid,r.mpid as mpid,C.MATERIALCODDE,R.BZDCODE,R.ProductCode,R.Sequence,C.Company_name,C.Line_name,R.CREATEUSER,R.CREATEDATE "); + sqlBuilder.Append("FROM T_BD_BZDRecorder R,T_BD_BZDConfig c "); + //whereBuilder.Append(" AND FLGDEL<> '1' "); + whereBuilder.Append(" AND r.MPID = c.PID "); + //查询条件 + + //查询条件 + if (string.IsNullOrEmpty(condition.Company_name) == false) + { + whereBuilder.Append(" AND C.Company_name like @Company_name "); + parameters.Add(new DataParameter { ParameterName = "Company_name", DataType = DbType.String, Value = "%" + condition.Company_name + "%" }); + } + if (string.IsNullOrEmpty(condition.Line_name) == false) + { + whereBuilder.Append(" AND C.Line_name like @Line_name "); + parameters.Add(new DataParameter { ParameterName = "Line_name", DataType = DbType.String, Value = "%" + condition.Line_name + "%" }); + } + if (string.IsNullOrEmpty(condition.Company_code) == false) + { + whereBuilder.Append(" AND C.Company_code = @Company_code "); + parameters.Add(new DataParameter { ParameterName = "Company_code", DataType = DbType.String, Value = condition.Company_code }); + } + if (string.IsNullOrEmpty(condition.Line_code) == false) + { + whereBuilder.Append(" AND C.Line_code = @Line_code "); + parameters.Add(new DataParameter { ParameterName = "Line_code", DataType = DbType.String, Value = condition.Line_code }); + } + if (string.IsNullOrEmpty(condition.BZDCODE) == false) + { + whereBuilder.Append(" AND R.BZDCODE = @BZDCODE "); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = condition.BZDCODE }); + } + if (string.IsNullOrEmpty(condition.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND R.ProductCode = @PRODUCTCODE "); + parameters.Add(new DataParameter { ParameterName = "PRODUCTCODE", DataType = DbType.String, Value = condition.PRODUCTCODE }); + } + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + //根据总成物料号获取BZD配置信息 + public BZDConfig getBZDCofig(string planMATERIAL_CODE) + { + BZDConfigDAL bzdCofigdal = new BZDConfigDAL(); + List bzdCofig = new List(); + + bzdCofig = bzdCofigdal.GetAllList(); + + //将当前总成号配置取出 + foreach (var bzdconfig in bzdCofig) + { + if (bzdconfig != null) + if (bzdconfig.MATERIALCODDE == planMATERIAL_CODE) + { + return bzdconfig; + } + } + + return null; + } + + public List CreateBZDCode(List paramList, string userId) + { + + try + { + + List list = new List(); + BZDConfig bzdconfig = getBZDCofig(paramList[0]); + ; + //将配置信息读出 + var barcodeFirst = bzdconfig.barcodeFist; + var cc = bzdconfig.Company_code; + var vt = bzdconfig.Vehicle_type; + var cfgc = bzdconfig.configColor; + var y = DateTime.Today.Year.ToString().Substring(2, 2); + var m = DateTime.Today.Month.ToString(); + //将配置信息拼接成BZD查询条件,作为查找序列最大编码条件 + string BZDCODE = barcodeFirst + ' ' + cc + vt + cfgc + + DecimalToCharX.decimalToCharX(Convert.ToInt16(y), 36) + + DecimalToCharX.decimalToCharX(Convert.ToInt16(m), 36); + + + int seq = 0; + //查询最大编码 + seq = getMaxSeq(BZDCODE); + //最大编码加1 + //seq = DecimalToCharX.CharXTodecimal(BZDMaxSeq, 36) + 1; + //准备打印条码数据 + BZDRecorder entity = new BZDRecorder(); + //---------------------------------------------------------------------------------------- + BarcodeRule bc = new BarcodeRule(); + bc.barcodeFirst = barcodeFirst; + bc.barcodeCompnentCode = cc; + bc.VehicleType = vt; + bc.ConfigColor = cfgc; + bc.Year = DecimalToCharX.decimalToCharX(Convert.ToInt16(y), 36); + bc.Mon = DecimalToCharX.decimalToCharX(Convert.ToInt16(m), 36); + bc.barcodeSequence = DecimalToCharX.decimalToCharX(seq, 36); + //---------------------------------------------------------------------------------------- + list.Add(bc.barcode); + list.Add(bzdconfig.ColorDetail); + list.Add(bzdconfig.MATERIALCODDE); + //基本信息 + entity.PID = Guid.NewGuid().ToString(); + + entity.CREATEUSER = userId; + entity.CREATEDATE = DateTime.Now; + entity.MPID = bzdconfig.PID; + entity.BZDCODE = bc.barcode; + entity.Sequence = seq.ToString(); + entity.PRODUCTCODE = paramList[1]; + if (!Exists(entity) && !ExistsPro(entity)) + { + //将打印条码记录到数据库 + var rst = Insert(entity); + list.Add(rst.ToString()); + + return list; + } + else + { + return null; + } + + } + catch (Exception e) + { + return null; + } + + } + + #region 查询最大序列号 + public int getMaxSeq(string BZDCODE) + { + + //string PID = ""; + int count = 0; + string sql = null; + try + { + //sql = "GetBZDSeq"; + sql = @"DECLARE @return_value int, + @Seq int + EXEC @return_value = [dbo].[GetBZDSeq] + @KeyValue = N'" + BZDCODE + @"', + @Seq = @Seq OUTPUT + SELECT @Seq as N'@Seq'"; + List parameters = new List(); + + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + string sqlChange = ChangeSqlByDB(sql, session); + var dt = session.GetTable(sqlChange, parameters.ToArray()); + return Convert.ToInt16(dt.Rows[0].ItemArray[0]); + + } + + } + catch (Exception ex) + { + RecordExceptionLog(ex, "查询最大序列号错误!"); + throw ex; + } + } + + public string getMaxSeq_old(string BZDCODE) + { + + //string PID = ""; + int count = 0; + string sql = null; + try + { + sql = "select ISNULL(MAX(substring(BZDCODE,12,3)),'000') as SEQUENCE from T_BD_BZDRecorder where substring(BZDCODE,1,11) = @BZDCODE"; + List parameters = new List(); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = BZDCODE }); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + string sqlChange = ChangeSqlByDB(sql, session); + var dt = session.GetTable(sqlChange, parameters.ToArray()); + + return dt.Rows[0]["SEQUENCE"].ToString(); + } + + } + catch (Exception ex) + { + RecordExceptionLog(ex, "查询最大序列号错误!"); + throw ex; + } + return "1"; + } + #endregion + + + #region 获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(BZDRecorder2 info) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql2(info, ref parameters); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "BZDRecorder"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BZDRecorder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_BD_BZDRecorder"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND BZDCODE = @BZDCODE "); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = info.BZDCODE }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool ExistsPro(BZDRecorder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_BD_BZDRecorder"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND ProductCode = @ProductCode "); + parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = info.PRODUCTCODE }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BZDRecorder info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BZDRecorder info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(BZDRecorder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_BD_BZDRecorder "); + sqlBuilder.Append("SET FLGDEL = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入 + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (BZDRecorder info in list) + { + if (info.IsNewInfo) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + #endregion + + } +} diff --git a/.svn/pristine/5f/5fcde8cfa5ab96bc7ed7c8283a5a979ea272a8f3.svn-base b/.svn/pristine/5f/5fcde8cfa5ab96bc7ed7c8283a5a979ea272a8f3.svn-base new file mode 100644 index 0000000..d095315 --- /dev/null +++ b/.svn/pristine/5f/5fcde8cfa5ab96bc7ed7c8283a5a979ea272a8f3.svn-base @@ -0,0 +1,304 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + Library + Properties + QMAPP.FJC.Entity + QMAPP.FJC.Entity + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\APPMESReport\QMAPP.MESReport.Web\Bin\QMAPP.MESReport.Entity.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + + + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + PublicResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + + \ No newline at end of file diff --git a/.svn/pristine/61/613f0738aa06df8fb4504d3bc40cdc227bc936ee.svn-base b/.svn/pristine/61/613f0738aa06df8fb4504d3bc40cdc227bc936ee.svn-base new file mode 100644 index 0000000..8822601 --- /dev/null +++ b/.svn/pristine/61/613f0738aa06df8fb4504d3bc40cdc227bc936ee.svn-base @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.MD.Web.Models; +using QMFrameWork.Data; +using QMAPP.ServicesAgent; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.FJC.Web.Models; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.Web.Models.BZD; + +namespace QMAPP.FJC.Web.Controllers +{ + /// + /// 模块名称 补打条码 + /// 作 者 张松男 + /// 编写日期 2021年05月24日 + /// + public class BarCodeReplacementController : QController + { + #region 获取列表 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callBack) + { + BarCodeReplacementModel seachModel = new BarCodeReplacementModel(); + if (callBack == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.BeginTime = DateTime.Now.AddDays(-5).ToString("yyyy-MM-dd"); + seachModel.EndTime = DateTime.Now.ToString("yyyy-MM-dd"); + seachModel.url = "/BarCodeReplacement/GetList"; + return View("BarCodeReplacementList", seachModel); + } + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + BarCodeReplacementModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + BarCodeReplacement condition = null; + DataResult pageResult = new DataResult(); + + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + pageResult = wcfAgent.InvokeServiceFunction>("BarCodeReplacementBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + + string tempstr = ""; + tempstr = result.GetJsonSource(); + return Content(tempstr); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/61/6193760b533d354ba2e2bd050c97eb95f8afd66e.svn-base b/.svn/pristine/61/6193760b533d354ba2e2bd050c97eb95f8afd66e.svn-base new file mode 100644 index 0000000..b984ac0 --- /dev/null +++ b/.svn/pristine/61/6193760b533d354ba2e2bd050c97eb95f8afd66e.svn-base @@ -0,0 +1,637 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.MD.Entity; +using QMFrameWork.Data; +using System.Data; +using QMAPP.DAL; +using QMAPP.Entity; +using QMAPP.Entity.Sys; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.DAL.BZD; + +namespace QMAPP.MD.DAL +{ + /// + /// 模块名称:BZD记录 + /// 作 者:宁红钢 + /// 编写日期:2020年04月29日 + /// + public class BZDRecorderDAL : BaseDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BZDRecorder2 Get(BZDRecorder2 info) + { + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + public BZDRecorder2 GetRecord(BZDRecorder2 info) + { + try + { + + List parameters = new List(); + var sql = "SELECT * FROM T_BD_BZDRecorder WHERE 1=1 "; + if (string.IsNullOrEmpty(info.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", info.PID)); + } + if (string.IsNullOrEmpty(info.PRODUCTCODE) == false) + { + sql += " AND PRODUCTCODE = @PRODUCTCODE"; + parameters.Add(new DataParameter("PRODUCTCODE", info.PRODUCTCODE)); + } + + + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + + var list = session.GetList(sql, parameters.ToArray()).ToList(); + if (list.Count > 0) + return list[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + + public BZDRecorder2 Get316Record(BZDRecorder2 info) + { + try + { + + List parameters = new List(); + var sql = "SELECT MAINCODE as 'BZDCODE',MATERIAL_CODE as 'MPID' FROM T_AW_MAIN WHERE 1=1 "; + if (string.IsNullOrEmpty(info.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", info.PID)); + } + if (string.IsNullOrEmpty(info.PRODUCTCODE) == false) + { + sql += " AND EPIDERMISCODE = @PRODUCTCODE"; + parameters.Add(new DataParameter("PRODUCTCODE", info.PRODUCTCODE)); + } + + + using (IDataSession session = AppDataFactory.CreateSession("maindb")) + { + //获取信息 + + var list = session.GetList(sql, parameters.ToArray()).ToList(); + if (list.Count > 0) + return list[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BZDRecorder2 condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql2(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + // 对应多种数据库 + //string sqlChange = this.ChangeSqlByDB(sql, session); + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取全部规则 + /// + /// + public List GetAllList() + { + try + { + string sql = "select R.pid,r.mpid,C.MATERIALCODDE,R.BZDCODE,R.ProductCode,R.Sequence,C.Company_name,C.Line_name,R.CREATEUSER,R.CREATEDATE from T_BD_BZDRecorder R,T_BD_BZDConfig c WHERE r.MPID = c.PID"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BZDRecorder condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句//[PID],[MPID],[barcodeFist],[Company_code],[Vehicle_type],[MATERIALCODDE],[configColor],[CREATEUSER],[CREATEDATE],[FLGDEL] + sqlBuilder.Append("select * "); + sqlBuilder.Append("FROM T_BD_BZDRecorder"); + //whereBuilder.Append(" AND FLGDEL<> '1' "); + //查询条件 + + //查询条件 + //if (string.IsNullOrEmpty(condition.Company_name) == false) + //{ + // whereBuilder.Append(" AND C.Company_name = @Company_name "); + // parameters.Add(new DataParameter { ParameterName = "Company_name", DataType = DbType.String, Value = condition.Company_name }); + //} + //if (string.IsNullOrEmpty(condition.Line_name) == false) + //{ + // whereBuilder.Append(" AND C.Line_name = @Line_name "); + // parameters.Add(new DataParameter { ParameterName = "Line_name", DataType = DbType.String, Value = condition.Line_name }); + //} + //if (string.IsNullOrEmpty(condition.Company_code) == false) + //{ + // whereBuilder.Append(" AND C.Company_code = @Company_code "); + // parameters.Add(new DataParameter { ParameterName = "Company_code", DataType = DbType.String, Value = condition.Company_code }); + //} + //if (string.IsNullOrEmpty(condition.Line_code) == false) + //{ + // whereBuilder.Append(" AND C.Line_code = @Line_code "); + // parameters.Add(new DataParameter { ParameterName = "Line_code", DataType = DbType.String, Value = condition.Line_code }); + //} + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql2(BZDRecorder2 condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句//[PID],[MPID],[barcodeFist],[Company_code],[Vehicle_type],[MATERIALCODDE],[configColor],[CREATEUSER],[CREATEDATE],[FLGDEL] + sqlBuilder.Append("select R.pid as pid,r.mpid as mpid,C.MATERIALCODDE,R.BZDCODE,R.ProductCode,R.Sequence,C.Company_name,C.Line_name,R.CREATEUSER,R.CREATEDATE "); + sqlBuilder.Append("FROM T_BD_BZDRecorder R,T_BD_BZDConfig c "); + //whereBuilder.Append(" AND FLGDEL<> '1' "); + whereBuilder.Append(" AND r.MPID = c.PID "); + //查询条件 + + //查询条件 + if (string.IsNullOrEmpty(condition.Company_name) == false) + { + whereBuilder.Append(" AND C.Company_name like @Company_name "); + parameters.Add(new DataParameter { ParameterName = "Company_name", DataType = DbType.String, Value = "%" + condition.Company_name + "%" }); + } + if (string.IsNullOrEmpty(condition.Line_name) == false) + { + whereBuilder.Append(" AND C.Line_name like @Line_name "); + parameters.Add(new DataParameter { ParameterName = "Line_name", DataType = DbType.String, Value = "%" + condition.Line_name + "%" }); + } + if (string.IsNullOrEmpty(condition.Company_code) == false) + { + whereBuilder.Append(" AND C.Company_code = @Company_code "); + parameters.Add(new DataParameter { ParameterName = "Company_code", DataType = DbType.String, Value = condition.Company_code }); + } + if (string.IsNullOrEmpty(condition.Line_code) == false) + { + whereBuilder.Append(" AND C.Line_code = @Line_code "); + parameters.Add(new DataParameter { ParameterName = "Line_code", DataType = DbType.String, Value = condition.Line_code }); + } + if (string.IsNullOrEmpty(condition.BZDCODE) == false) + { + whereBuilder.Append(" AND R.BZDCODE = @BZDCODE "); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = condition.BZDCODE }); + } + if (string.IsNullOrEmpty(condition.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND R.ProductCode = @PRODUCTCODE "); + parameters.Add(new DataParameter { ParameterName = "PRODUCTCODE", DataType = DbType.String, Value = condition.PRODUCTCODE }); + } + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + //根据总成物料号获取BZD配置信息 + public BZDConfig getBZDCofig(string planMATERIAL_CODE) + { + BZDConfigDAL bzdCofigdal = new BZDConfigDAL(); + List bzdCofig = new List(); + + bzdCofig = bzdCofigdal.GetAllList(); + + //将当前总成号配置取出 + foreach (var bzdconfig in bzdCofig) + { + if (bzdconfig != null) + if (bzdconfig.MATERIALCODDE == planMATERIAL_CODE) + { + return bzdconfig; + } + } + + return null; + } + + public List CreateBZDCode(List paramList, string userId) + { + + try + { + + List list = new List(); + BZDConfig bzdconfig = getBZDCofig(paramList[0]); + ; + //将配置信息读出 + var barcodeFirst = bzdconfig.barcodeFist; + var cc = bzdconfig.Company_code; + var vt = bzdconfig.Vehicle_type; + var cfgc = bzdconfig.configColor; + var y = DateTime.Today.Year.ToString().Substring(2, 2); + var m = DateTime.Today.Month.ToString(); + //将配置信息拼接成BZD查询条件,作为查找序列最大编码条件 + string BZDCODE = barcodeFirst + ' ' + cc + vt + cfgc + + DecimalToCharX.decimalToCharX(Convert.ToInt16(y), 36) + + DecimalToCharX.decimalToCharX(Convert.ToInt16(m), 36); + + + int seq = 0; + //查询最大编码 + seq = getMaxSeq(BZDCODE); + //最大编码加1 + //seq = DecimalToCharX.CharXTodecimal(BZDMaxSeq, 36) + 1; + //准备打印条码数据 + BZDRecorder entity = new BZDRecorder(); + //---------------------------------------------------------------------------------------- + BarcodeRule bc = new BarcodeRule(); + bc.barcodeFirst = barcodeFirst; + bc.barcodeCompnentCode = cc; + bc.VehicleType = vt; + bc.ConfigColor = cfgc; + bc.Year = DecimalToCharX.decimalToCharX(Convert.ToInt16(y), 36); + bc.Mon = DecimalToCharX.decimalToCharX(Convert.ToInt16(m), 36); + bc.barcodeSequence = DecimalToCharX.decimalToCharX(seq, 36); + //---------------------------------------------------------------------------------------- + list.Add(bc.barcode); + list.Add(bzdconfig.ColorDetail); + list.Add(bzdconfig.MATERIALCODDE); + //基本信息 + entity.PID = Guid.NewGuid().ToString(); + + entity.CREATEUSER = userId; + entity.CREATEDATE = DateTime.Now; + entity.MPID = bzdconfig.PID; + entity.BZDCODE = bc.barcode; + entity.Sequence = seq.ToString(); + entity.PRODUCTCODE = paramList[1]; + if (!Exists(entity)) + { + //将打印条码记录到数据库 + var rst = Insert(entity); + list.Add(rst.ToString()); + + return list; + } + else + { + return null; + } + + } + catch (Exception e) + { + return null; + } + + } + + #region 查询最大序列号 + public int getMaxSeq(string BZDCODE) + { + + //string PID = ""; + int count = 0; + string sql = null; + try + { + //sql = "GetBZDSeq"; + sql = @"DECLARE @return_value int, + @Seq int + EXEC @return_value = [dbo].[GetBZDSeq] + @KeyValue = N'" + BZDCODE + @"', + @Seq = @Seq OUTPUT + SELECT @Seq as N'@Seq'"; + List parameters = new List(); + + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + string sqlChange = ChangeSqlByDB(sql, session); + var dt = session.GetTable(sqlChange, parameters.ToArray()); + return Convert.ToInt16(dt.Rows[0].ItemArray[0]); + + } + + } + catch (Exception ex) + { + RecordExceptionLog(ex, "查询最大序列号错误!"); + throw ex; + } + } + + public string getMaxSeq_old(string BZDCODE) + { + + //string PID = ""; + int count = 0; + string sql = null; + try + { + sql = "select ISNULL(MAX(substring(BZDCODE,12,3)),'000') as SEQUENCE from T_BD_BZDRecorder where substring(BZDCODE,1,11) = @BZDCODE"; + List parameters = new List(); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = BZDCODE }); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + string sqlChange = ChangeSqlByDB(sql, session); + var dt = session.GetTable(sqlChange, parameters.ToArray()); + + return dt.Rows[0]["SEQUENCE"].ToString(); + } + + } + catch (Exception ex) + { + RecordExceptionLog(ex, "查询最大序列号错误!"); + throw ex; + } + return "1"; + } + #endregion + + + #region 获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(BZDRecorder2 info) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql2(info, ref parameters); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "BZDRecorder"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BZDRecorder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_BD_BZDRecorder"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND BZDCODE = @BZDCODE "); + parameters.Add(new DataParameter { ParameterName = "BZDCODE", DataType = DbType.String, Value = info.BZDCODE }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BZDRecorder info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BZDRecorder info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(BZDRecorder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_BD_BZDRecorder "); + sqlBuilder.Append("SET FLGDEL = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入 + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (BZDRecorder info in list) + { + if (info.IsNewInfo) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + #endregion + + } +} diff --git a/.svn/pristine/61/61f649ef7f0c976f3fc4cdabef2f062f73b60be6.svn-base b/.svn/pristine/61/61f649ef7f0c976f3fc4cdabef2f062f73b60be6.svn-base new file mode 100644 index 0000000..2516d6c --- /dev/null +++ b/.svn/pristine/61/61f649ef7f0c976f3fc4cdabef2f062f73b60be6.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_BUCKETINFO")] + public class BucketInfo : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 设备编号 + /// + [Description("设备编号")] + [DBColumn(ColumnName = "MaterialCode", DataType = DbType.String)] + public string MaterialCode { get; set; } + + /// + /// 编号 + /// + [Description("编号")] + [DBColumn(ColumnName = "BucketCode", DataType = DbType.String)] + public string BucketCode { get; set; } + + /// + /// 名称 + /// + [Description("名称")] + [DBColumn(ColumnName = "BucketName", DataType = DbType.String)] + public string BucketName { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/62/6294460722380fde0a54ac88a60096bd49ac3e8c.svn-base b/.svn/pristine/62/6294460722380fde0a54ac88a60096bd49ac3e8c.svn-base new file mode 100644 index 0000000..3b61717 --- /dev/null +++ b/.svn/pristine/62/6294460722380fde0a54ac88a60096bd49ac3e8c.svn-base @@ -0,0 +1,568 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class SlushMoldingPrintForOldNewForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.lblLock = new System.Windows.Forms.LinkLabel(); + this.label12 = new System.Windows.Forms.Label(); + this.comMouldNumber = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.cbM = new System.Windows.Forms.CheckBox(); + this.cBoxModelCode = new System.Windows.Forms.ComboBox(); + this.comMachineCode = new System.Windows.Forms.ComboBox(); + this.dtpDate = new DateTimePickerA(); + this.label14 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.comPosition = new System.Windows.Forms.ComboBox(); + this.comColor = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.ErrorMessage = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MAINCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.COLOR = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PRODUCTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tsbSave = new System.Windows.Forms.Button(); + this.btnCommSend = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.TBRCV = new System.Windows.Forms.RichTextBox(); + this.textBox1 = new System.Windows.Forms.ComboBox(); + this.TBSEND = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.lblLock); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.comMouldNumber); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.cbM); + this.groupBox1.Controls.Add(this.cBoxModelCode); + this.groupBox1.Controls.Add(this.comMachineCode); + this.groupBox1.Controls.Add(this.dtpDate); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.comPosition); + this.groupBox1.Controls.Add(this.comColor); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(720, 2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(499, 368); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "信息录入"; + // + // lblLock + // + this.lblLock.AutoSize = true; + this.lblLock.Font = new System.Drawing.Font("新宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblLock.Location = new System.Drawing.Point(68, 64); + this.lblLock.Name = "lblLock"; + this.lblLock.Size = new System.Drawing.Size(89, 19); + this.lblLock.TabIndex = 20; + this.lblLock.TabStop = true; + this.lblLock.Tag = "0"; + this.lblLock.Text = "锁定工位"; + this.lblLock.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblLock_LinkClicked); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(68, 221); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(21, 25); + this.label12.TabIndex = 18; + this.label12.Text = "*"; + // + // comMouldNumber + // + this.comMouldNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMouldNumber.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMouldNumber.FormattingEnabled = true; + this.comMouldNumber.Location = new System.Drawing.Point(166, 216); + this.comMouldNumber.Name = "comMouldNumber"; + this.comMouldNumber.Size = new System.Drawing.Size(247, 32); + this.comMouldNumber.TabIndex = 16; + this.comMouldNumber.SelectedIndexChanged += new System.EventHandler(this.comMouldNumber_SelectedIndexChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label13.Location = new System.Drawing.Point(88, 221); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(76, 16); + this.label13.TabIndex = 17; + this.label13.Text = "模架号:"; + // + // cbM + // + this.cbM.AutoSize = true; + this.cbM.Checked = true; + this.cbM.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbM.Enabled = false; + this.cbM.Location = new System.Drawing.Point(427, 44); + this.cbM.Name = "cbM"; + this.cbM.Size = new System.Drawing.Size(69, 29); + this.cbM.TabIndex = 15; + this.cbM.Text = "扣料"; + this.cbM.UseVisualStyleBackColor = true; + // + // cBoxModelCode + // + this.cBoxModelCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBoxModelCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cBoxModelCode.FormattingEnabled = true; + this.cBoxModelCode.Location = new System.Drawing.Point(166, 273); + this.cBoxModelCode.Name = "cBoxModelCode"; + this.cBoxModelCode.Size = new System.Drawing.Size(247, 32); + this.cBoxModelCode.TabIndex = 12; + // + // comMachineCode + // + this.comMachineCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMachineCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMachineCode.FormattingEnabled = true; + this.comMachineCode.Items.AddRange(new object[] { + "否", + "是"}); + this.comMachineCode.Location = new System.Drawing.Point(166, 41); + this.comMachineCode.Name = "comMachineCode"; + this.comMachineCode.Size = new System.Drawing.Size(247, 32); + this.comMachineCode.TabIndex = 11; + // + // dtpDate + // + this.dtpDate.CustomFormat = " "; + this.dtpDate.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtpDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.FormatString = "yyyy年MM月dd日"; + this.dtpDate.Location = new System.Drawing.Point(166, 329); + this.dtpDate.Name = "dtpDate"; + this.dtpDate.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.Size = new System.Drawing.Size(249, 35); + this.dtpDate.TabIndex = 10; + this.dtpDate.ValueX = null; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.Color.Red; + this.label14.Location = new System.Drawing.Point(99, 163); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(21, 25); + this.label14.TabIndex = 9; + this.label14.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(68, 270); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(21, 25); + this.label10.TabIndex = 9; + this.label10.Text = "*"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(45, 42); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(21, 25); + this.label6.TabIndex = 9; + this.label6.Text = "*"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Red; + this.label4.Location = new System.Drawing.Point(78, 105); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(21, 25); + this.label4.TabIndex = 9; + this.label4.Text = "*"; + // + // comPosition + // + this.comPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comPosition.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comPosition.FormattingEnabled = true; + this.comPosition.Items.AddRange(new object[] { + "A+B"}); + this.comPosition.Location = new System.Drawing.Point(166, 160); + this.comPosition.Name = "comPosition"; + this.comPosition.Size = new System.Drawing.Size(247, 32); + this.comPosition.TabIndex = 5; + // + // comColor + // + this.comColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comColor.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comColor.FormattingEnabled = true; + this.comColor.Location = new System.Drawing.Point(166, 99); + this.comColor.Name = "comColor"; + this.comColor.Size = new System.Drawing.Size(247, 32); + this.comColor.TabIndex = 3; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label11.Location = new System.Drawing.Point(118, 163); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(42, 16); + this.label11.TabIndex = 6; + this.label11.Text = "腔:"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label15.Location = new System.Drawing.Point(70, 333); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(93, 16); + this.label15.TabIndex = 6; + this.label15.Text = "加工时间:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(86, 278); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(76, 16); + this.label9.TabIndex = 6; + this.label9.Text = "模腔号:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label5.Location = new System.Drawing.Point(70, 44); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(93, 16); + this.label5.TabIndex = 6; + this.label5.Text = "搪塑设备:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(101, 107); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(59, 16); + this.label3.TabIndex = 6; + this.label3.Text = "颜色:"; + // + // ErrorMessage + // + this.ErrorMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ErrorMessage.AutoSize = true; + this.ErrorMessage.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ErrorMessage.ForeColor = System.Drawing.Color.Red; + this.ErrorMessage.Location = new System.Drawing.Point(741, 649); + this.ErrorMessage.Name = "ErrorMessage"; + this.ErrorMessage.Size = new System.Drawing.Size(0, 25); + this.ErrorMessage.TabIndex = 19; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.DGView); + this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox2.Location = new System.Drawing.Point(2, 2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(714, 794); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "打印记录"; + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MAINCODE, + this.COLOR, + this.PRODUCTCODE, + this.CREATETIME}); + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(3, 29); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(708, 762); + this.DGView.TabIndex = 39; + // + // MAINCODE + // + this.MAINCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MAINCODE.DataPropertyName = "MAINCODE"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F); + this.MAINCODE.DefaultCellStyle = dataGridViewCellStyle2; + this.MAINCODE.FillWeight = 48.95314F; + this.MAINCODE.HeaderText = "条码信息"; + this.MAINCODE.Name = "MAINCODE"; + this.MAINCODE.ReadOnly = true; + this.MAINCODE.Width = 240; + // + // COLOR + // + this.COLOR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.COLOR.DataPropertyName = "MATERIAL_NAME"; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F); + this.COLOR.DefaultCellStyle = dataGridViewCellStyle3; + this.COLOR.FillWeight = 99.90437F; + this.COLOR.HeaderText = "表皮颜色"; + this.COLOR.Name = "COLOR"; + this.COLOR.ReadOnly = true; + this.COLOR.Width = 150; + // + // PRODUCTCODE + // + this.PRODUCTCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.PRODUCTCODE.DataPropertyName = "PRODUCTCODE"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PRODUCTCODE.DefaultCellStyle = dataGridViewCellStyle4; + this.PRODUCTCODE.FillWeight = 48.95314F; + this.PRODUCTCODE.HeaderText = "零件号"; + this.PRODUCTCODE.Name = "PRODUCTCODE"; + this.PRODUCTCODE.ReadOnly = true; + this.PRODUCTCODE.Width = 240; + // + // CREATETIME + // + this.CREATETIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.CREATETIME.DataPropertyName = "CREATETIME"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle5.Format = "f"; + dataGridViewCellStyle5.NullValue = null; + this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle5; + this.CREATETIME.FillWeight = 48.95314F; + this.CREATETIME.HeaderText = "操作时间"; + this.CREATETIME.Name = "CREATETIME"; + this.CREATETIME.ReadOnly = true; + this.CREATETIME.Width = 250; + // + // tsbSave + // + this.tsbSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.Location = new System.Drawing.Point(877, 624); + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(232, 137); + this.tsbSave.TabIndex = 35; + this.tsbSave.Text = "打印"; + this.tsbSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.tsbSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.tsbSave.UseVisualStyleBackColor = true; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // btnCommSend + // + this.btnCommSend.Enabled = false; + this.btnCommSend.Location = new System.Drawing.Point(780, 385); + this.btnCommSend.Name = "btnCommSend"; + this.btnCommSend.Size = new System.Drawing.Size(80, 32); + this.btnCommSend.TabIndex = 52; + this.btnCommSend.Text = "连接设备"; + this.btnCommSend.UseVisualStyleBackColor = true; + this.btnCommSend.Click += new System.EventHandler(this.btnCom_Click); + // + // groupBox3 + // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.TBRCV); + this.groupBox3.Location = new System.Drawing.Point(791, 469); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(365, 149); + this.groupBox3.TabIndex = 53; + this.groupBox3.TabStop = false; + // + // TBRCV + // + this.TBRCV.Dock = System.Windows.Forms.DockStyle.Fill; + this.TBRCV.Location = new System.Drawing.Point(3, 17); + this.TBRCV.Name = "TBRCV"; + this.TBRCV.Size = new System.Drawing.Size(359, 129); + this.TBRCV.TabIndex = 0; + this.TBRCV.Text = ""; + // + // textBox1 + // + this.textBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textBox1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox1.FormattingEnabled = true; + this.textBox1.Location = new System.Drawing.Point(876, 386); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(280, 32); + this.textBox1.TabIndex = 21; + //this.textBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); + // + // TBSEND + // + this.TBSEND.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TBSEND.Location = new System.Drawing.Point(876, 433); + this.TBSEND.Multiline = true; + this.TBSEND.Name = "TBSEND"; + this.TBSEND.Size = new System.Drawing.Size(279, 38); + this.TBSEND.TabIndex = 54; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label1.Location = new System.Drawing.Point(777, 444); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(93, 16); + this.label1.TabIndex = 21; + this.label1.Text = "连接编码:"; + // + // SlushMoldingPrintForOldForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1223, 798); + this.Controls.Add(this.label1); + this.Controls.Add(this.TBSEND); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.btnCommSend); + this.Controls.Add(this.tsbSave); + this.Controls.Add(this.ErrorMessage); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "SlushMoldingPrintForOldForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "单色搪塑机条码打印"; + this.Load += new System.EventHandler(this.Form_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox comPosition; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comColor; + private System.Windows.Forms.Label label15; + private DateTimePickerA dtpDate; + private System.Windows.Forms.ComboBox cBoxModelCode; + private System.Windows.Forms.ComboBox comMachineCode; + private System.Windows.Forms.CheckBox cbM; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox comMouldNumber; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label ErrorMessage; + private System.Windows.Forms.LinkLabel lblLock; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.Button tsbSave; + private System.Windows.Forms.DataGridViewTextBoxColumn MAINCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn COLOR; + private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME; + private System.Windows.Forms.Button btnCommSend; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.RichTextBox TBRCV; + private System.Windows.Forms.ComboBox textBox1; + private System.Windows.Forms.TextBox TBSEND; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/.svn/pristine/63/63718959900c960734927da1e7ce7f311bcbd17e.svn-base b/.svn/pristine/63/63718959900c960734927da1e7ce7f311bcbd17e.svn-base new file mode 100644 index 0000000..a8158f4 Binary files /dev/null and b/.svn/pristine/63/63718959900c960734927da1e7ce7f311bcbd17e.svn-base differ diff --git a/.svn/pristine/64/64f2f30066d428dc3c3bd806f23a62d4d3d00e99.svn-base b/.svn/pristine/64/64f2f30066d428dc3c3bd806f23a62d4d3d00e99.svn-base new file mode 100644 index 0000000..7fc3254 --- /dev/null +++ b/.svn/pristine/64/64f2f30066d428dc3c3bd806f23a62d4d3d00e99.svn-base @@ -0,0 +1,483 @@ +namespace QMAPP.WinForm +{ + partial class MainForm + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.btnInjectGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnInjectPrint = new System.Windows.Forms.ToolStripMenuItem(); + this.btnInjectPut = new System.Windows.Forms.ToolStripMenuItem(); // + this.btnInjectPutNEW = new System.Windows.Forms.ToolStripMenuItem(); // + this.btnInjectPrintForm = new System.Windows.Forms.ToolStripMenuItem(); + this.搪塑下线ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.btnvVWSinglePrint = new System.Windows.Forms.ToolStripMenuItem(); + this.btnSlushPut = new System.Windows.Forms.ToolStripMenuItem(); + this.浇注投料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiFoamingFeed = new System.Windows.Forms.ToolStripMenuItem(); + this.btnOperateGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnOperateStation = new System.Windows.Forms.ToolStripMenuItem(); + this.PrintCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPrintPlanlabel = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmDPAssmblyItem = new System.Windows.Forms.ToolStripMenuItem(); + this.btnMendGroup = new System.Windows.Forms.ToolStripMenuItem(); + this.btnMendOperate = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPartReplace = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiCheck = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiLabelRegeneration = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiDefectRecording = new System.Windows.Forms.ToolStripMenuItem(); + this.btnUserOut = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiWarehouse = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiPutIn = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiTakeOut = new System.Windows.Forms.ToolStripMenuItem(); + this.tsiShipment = new System.Windows.Forms.ToolStripMenuItem(); + this.FrmPlace = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiQuery = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiProductInfo = new System.Windows.Forms.ToolStripMenuItem(); + this.andonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.AodonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSetting = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiSetStartUp = new System.Windows.Forms.ToolStripMenuItem(); + this.tsmiUserManage = new System.Windows.Forms.ToolStripMenuItem(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.tslServerHost = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslblOPCStatus = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslblIps = new System.Windows.Forms.ToolStripStatusLabel(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.menuStrip1.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // menuStrip1 + // + this.menuStrip1.Font = new System.Drawing.Font("微软雅黑", 13F); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnInjectGroup, + this.搪塑下线ToolStripMenuItem, + this.浇注投料ToolStripMenuItem, + this.btnOperateGroup, + this.btnMendGroup, + this.btnUserOut, + this.tsmiWarehouse, + this.tsiShipment, + this.tsmiQuery, + this.andonToolStripMenuItem, + this.tsmiSetting}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1203, 32); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // btnInjectGroup + // + this.btnInjectGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnInjectPrint, + this.btnInjectPut, + this.btnInjectPutNEW, + this.btnInjectPrintForm}); + this.btnInjectGroup.Name = "btnInjectGroup"; + this.btnInjectGroup.Size = new System.Drawing.Size(94, 28); + this.btnInjectGroup.Text = "注塑下线"; + // + // btnInjectPrint + // + this.btnInjectPrint.Name = "btnInjectPrint"; + this.btnInjectPrint.Size = new System.Drawing.Size(188, 28); + this.btnInjectPrint.Text = "注塑条码打印"; + this.btnInjectPrint.Click += new System.EventHandler(this.btnInjectPrint_Click); + // + // btnInjectPut + // + this.btnInjectPut.Name = "btnInjectPut"; + this.btnInjectPut.Size = new System.Drawing.Size(188, 28); + this.btnInjectPut.Text = "注塑投料"; + this.btnInjectPut.Click += new System.EventHandler(this.btnInjectPut_Click); + // + // btnInjectPutNEW + // + this.btnInjectPutNEW.Name = "btnInjectPutNEW"; + this.btnInjectPutNEW.Size = new System.Drawing.Size(188, 28); + this.btnInjectPutNEW.Text = "注塑投料新版"; + this.btnInjectPutNEW.Click += new System.EventHandler(this.btnInjectPutNEW_Click); + // + // btnInjectPutNEW + // + this.btnInjectPrintForm.Name = "btnInjectPrintForm"; + this.btnInjectPrintForm.Size = new System.Drawing.Size(188, 28); + this.btnInjectPrintForm.Text = "注塑条码补打"; + this.btnInjectPrintForm.Click += new System.EventHandler(this.btnInjectPrintForm_Click); + // + // 搪塑下线ToolStripMenuItem + // + this.搪塑下线ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnvVWSinglePrint, + this.btnSlushPut}); + this.搪塑下线ToolStripMenuItem.Name = "搪塑下线ToolStripMenuItem"; + this.搪塑下线ToolStripMenuItem.Size = new System.Drawing.Size(94, 28); + this.搪塑下线ToolStripMenuItem.Text = "搪塑下线"; + // + // btnvVWSinglePrint + // + this.btnvVWSinglePrint.Name = "btnvVWSinglePrint"; + this.btnvVWSinglePrint.Size = new System.Drawing.Size(152, 28); + this.btnvVWSinglePrint.Text = "条码打印"; + this.btnvVWSinglePrint.Click += new System.EventHandler(this.btnvVWSinglePrint_Click); + // + // btnSlushPut + // + this.btnSlushPut.Name = "btnSlushPut"; + this.btnSlushPut.Size = new System.Drawing.Size(152, 28); + this.btnSlushPut.Text = "搪塑投料"; + this.btnSlushPut.Click += new System.EventHandler(this.btnSlushPut_Click); + // + // 浇注投料ToolStripMenuItem + // + this.浇注投料ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiFoamingFeed}); + this.浇注投料ToolStripMenuItem.Name = "浇注投料ToolStripMenuItem"; + this.浇注投料ToolStripMenuItem.Size = new System.Drawing.Size(94, 28); + this.浇注投料ToolStripMenuItem.Text = "浇注投料"; + // + // tsmiFoamingFeed + // + this.tsmiFoamingFeed.Name = "tsmiFoamingFeed"; + this.tsmiFoamingFeed.Size = new System.Drawing.Size(152, 28); + this.tsmiFoamingFeed.Text = "浇注投料"; + this.tsmiFoamingFeed.Click += new System.EventHandler(this.tsmiFoamingFeed_Click); + // + // btnOperateGroup + // + this.btnOperateGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnOperateStation, + this.PrintCodeToolStripMenuItem, + this.tsmiPrintPlanlabel, + this.tsmDPAssmblyItem}); + this.btnOperateGroup.Name = "btnOperateGroup"; + this.btnOperateGroup.Size = new System.Drawing.Size(94, 28); + this.btnOperateGroup.Text = "加工工位"; + // + // btnOperateStation + // + this.btnOperateStation.Name = "btnOperateStation"; + this.btnOperateStation.Size = new System.Drawing.Size(224, 28); + this.btnOperateStation.Text = "加工操作"; + this.btnOperateStation.Click += new System.EventHandler(this.btnOperateStation_Click); + // + // PrintCodeToolStripMenuItem + // + this.PrintCodeToolStripMenuItem.Name = "PrintCodeToolStripMenuItem"; + this.PrintCodeToolStripMenuItem.Size = new System.Drawing.Size(224, 28); + this.PrintCodeToolStripMenuItem.Text = "总成装配条码打印"; + this.PrintCodeToolStripMenuItem.Click += new System.EventHandler(this.PrintCodeToolStripMenuItem_Click); + // + // tsmiPrintPlanlabel + // + this.tsmiPrintPlanlabel.Name = "tsmiPrintPlanlabel"; + this.tsmiPrintPlanlabel.Size = new System.Drawing.Size(224, 28); + this.tsmiPrintPlanlabel.Text = "门板计划标签打印"; + this.tsmiPrintPlanlabel.Click += new System.EventHandler(this.tsmiPrintPlanlabel_Click); + // + // tsmDPAssmblyItem + // + this.tsmDPAssmblyItem.Name = "tsmDPAssmblyItem"; + this.tsmDPAssmblyItem.ShowShortcutKeys = false; + this.tsmDPAssmblyItem.Size = new System.Drawing.Size(224, 28); + this.tsmDPAssmblyItem.Text = "门板FIS补码"; + this.tsmDPAssmblyItem.Click += new System.EventHandler(this.tsmDPAssmblyItem_Click); + // + // btnMendGroup + // + this.btnMendGroup.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.btnMendOperate, + this.tsmiPartReplace, + this.tsmiCheck, + this.tsmiLabelRegeneration, + this.tsmiDefectRecording}); + this.btnMendGroup.Name = "btnMendGroup"; + this.btnMendGroup.Size = new System.Drawing.Size(94, 28); + this.btnMendGroup.Text = "质量管理"; + // + // btnMendOperate + // + this.btnMendOperate.Name = "btnMendOperate"; + this.btnMendOperate.Size = new System.Drawing.Size(188, 28); + this.btnMendOperate.Text = "质量操作"; + this.btnMendOperate.Click += new System.EventHandler(this.btnMendOperate_Click); + // + // tsmiPartReplace + // + this.tsmiPartReplace.Name = "tsmiPartReplace"; + this.tsmiPartReplace.Size = new System.Drawing.Size(188, 28); + this.tsmiPartReplace.Text = "零件替换操作"; + this.tsmiPartReplace.Click += new System.EventHandler(this.替换操作ToolStripMenuItem_Click); + // + // tsmiCheck + // + this.tsmiCheck.Name = "tsmiCheck"; + this.tsmiCheck.Size = new System.Drawing.Size(188, 28); + this.tsmiCheck.Text = "抽检操作"; + this.tsmiCheck.Click += new System.EventHandler(this.抽检操作ToolStripMenuItem_Click); + // + // tsmiLabelRegeneration + // + this.tsmiLabelRegeneration.Name = "tsmiLabelRegeneration"; + this.tsmiLabelRegeneration.Size = new System.Drawing.Size(188, 28); + this.tsmiLabelRegeneration.Text = "总成条码替换"; + this.tsmiLabelRegeneration.Click += new System.EventHandler(this.总成条码替换ToolStripMenuItem_Click); + // + // tsmiDefectRecording + // + this.tsmiDefectRecording.Name = "tsmiDefectRecording"; + this.tsmiDefectRecording.Size = new System.Drawing.Size(188, 28); + this.tsmiDefectRecording.Text = "缺陷录入"; + this.tsmiDefectRecording.Click += new System.EventHandler(this.tsmiDefectRecording_Click); + // + // btnUserOut + // + this.btnUserOut.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.btnUserOut.Name = "btnUserOut"; + this.btnUserOut.Size = new System.Drawing.Size(58, 28); + this.btnUserOut.Text = "注销"; + this.btnUserOut.Click += new System.EventHandler(this.注销ToolStripMenuItem_Click); + // + // tsmiWarehouse + // + this.tsmiWarehouse.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiPutIn, + this.tsmiTakeOut}); + this.tsmiWarehouse.Name = "tsmiWarehouse"; + this.tsmiWarehouse.Size = new System.Drawing.Size(112, 28); + this.tsmiWarehouse.Text = "出入库管理"; + // + // tsmiPutIn + // + this.tsmiPutIn.Name = "tsmiPutIn"; + this.tsmiPutIn.Size = new System.Drawing.Size(170, 28); + this.tsmiPutIn.Text = "入库管理"; + this.tsmiPutIn.Click += new System.EventHandler(this.toolStripMenuItem2_Click); + // + // tsmiTakeOut + // + this.tsmiTakeOut.Name = "tsmiTakeOut"; + this.tsmiTakeOut.Size = new System.Drawing.Size(170, 28); + this.tsmiTakeOut.Text = "计划外出库"; + this.tsmiTakeOut.Click += new System.EventHandler(this.tsmiTakeOut_Click); + // + // tsiShipment + // + this.tsiShipment.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.FrmPlace}); + this.tsiShipment.Name = "tsiShipment"; + this.tsiShipment.Size = new System.Drawing.Size(94, 28); + this.tsiShipment.Text = "发货管理"; + // + // FrmPlace + // + this.FrmPlace.Name = "FrmPlace"; + this.FrmPlace.Size = new System.Drawing.Size(152, 28); + this.FrmPlace.Text = "仪表发运"; + this.FrmPlace.Click += new System.EventHandler(this.FrmPlace_Click); + // + // tsmiQuery + // + this.tsmiQuery.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiProductInfo}); + this.tsmiQuery.Name = "tsmiQuery"; + this.tsmiQuery.Size = new System.Drawing.Size(94, 28); + this.tsmiQuery.Text = "信息查询"; + // + // tsmiProductInfo + // + this.tsmiProductInfo.Name = "tsmiProductInfo"; + this.tsmiProductInfo.Size = new System.Drawing.Size(188, 28); + this.tsmiProductInfo.Text = "产品状态查询"; + this.tsmiProductInfo.Click += new System.EventHandler(this.tsmiProductInfo_Click); + // + // andonToolStripMenuItem + // + this.andonToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.AodonToolStripMenuItem}); + this.andonToolStripMenuItem.Name = "andonToolStripMenuItem"; + this.andonToolStripMenuItem.Size = new System.Drawing.Size(116, 28); + this.andonToolStripMenuItem.Text = "Andon呼叫"; + // + // AodonToolStripMenuItem + // + this.AodonToolStripMenuItem.Name = "AodonToolStripMenuItem"; + this.AodonToolStripMenuItem.Size = new System.Drawing.Size(152, 28); + this.AodonToolStripMenuItem.Text = "报警呼叫"; + this.AodonToolStripMenuItem.Click += new System.EventHandler(this.AodonToolStripMenuItem_Click); + // + // tsmiSetting + // + this.tsmiSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiSetStartUp, + this.tsmiUserManage}); + this.tsmiSetting.Name = "tsmiSetting"; + this.tsmiSetting.Size = new System.Drawing.Size(58, 28); + this.tsmiSetting.Text = "设置"; + // + // tsmiSetStartUp + // + this.tsmiSetStartUp.Name = "tsmiSetStartUp"; + this.tsmiSetStartUp.Size = new System.Drawing.Size(260, 28); + this.tsmiSetStartUp.Text = "设置当前界面为启动页"; + this.tsmiSetStartUp.Click += new System.EventHandler(this.tsmiSetStartUp_Click); + // + // tsmiUserManage + // + this.tsmiUserManage.Name = "tsmiUserManage"; + this.tsmiUserManage.Size = new System.Drawing.Size(260, 28); + this.tsmiUserManage.Text = "用户管理"; + this.tsmiUserManage.Click += new System.EventHandler(this.tsmiUserManage_Click); + // + // statusStrip1 + // + this.statusStrip1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.tslServerHost, + this.tsslblOPCStatus, + this.tsslblIps}); + this.statusStrip1.Location = new System.Drawing.Point(0, 357); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(1203, 30); + this.statusStrip1.TabIndex = 2; + this.statusStrip1.Text = "statusStrip1"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(171, 25); + this.toolStripStatusLabel1.Text = "toolStripStatusLabel1"; + // + // tslServerHost + // + this.tslServerHost.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tslServerHost.Name = "tslServerHost"; + this.tslServerHost.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tslServerHost.Size = new System.Drawing.Size(19, 25); + // + // tsslblOPCStatus + // + this.tsslblOPCStatus.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tsslblOPCStatus.Name = "tsslblOPCStatus"; + this.tsslblOPCStatus.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tsslblOPCStatus.Size = new System.Drawing.Size(99, 25); + this.tsslblOPCStatus.Text = "OPC服务:"; + this.tsslblOPCStatus.Visible = false; + // + // tsslblIps + // + this.tsslblIps.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Left; + this.tsslblIps.Name = "tsslblIps"; + this.tsslblIps.Padding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.tsslblIps.Size = new System.Drawing.Size(92, 25); + this.tsslblIps.Text = "本机IP:"; + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Interval = 5000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1203, 387); + this.Controls.Add(this.statusStrip1); + this.Controls.Add(this.menuStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.IsMdiContainer = true; + this.MainMenuStrip = this.menuStrip1; + this.Name = "MainForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "富维安道拓成都数字化工厂"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); + this.Load += new System.EventHandler(this.MainForm_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem btnInjectGroup; + private System.Windows.Forms.ToolStripMenuItem btnInjectPut; + private System.Windows.Forms.ToolStripMenuItem btnInjectPutNEW; + private System.Windows.Forms.ToolStripMenuItem btnInjectPrintForm; + private System.Windows.Forms.ToolStripMenuItem btnOperateGroup; + private System.Windows.Forms.ToolStripMenuItem btnOperateStation; + private System.Windows.Forms.ToolStripMenuItem btnMendGroup; + private System.Windows.Forms.ToolStripMenuItem btnMendOperate; + private System.Windows.Forms.ToolStripMenuItem btnUserOut; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripMenuItem PrintCodeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tsiShipment; + private System.Windows.Forms.ToolStripMenuItem FrmPlace; + private System.Windows.Forms.ToolStripMenuItem andonToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem AodonToolStripMenuItem; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ToolStripMenuItem tsmiSetting; + private System.Windows.Forms.ToolStripMenuItem tsmiSetStartUp; + private System.Windows.Forms.ToolStripMenuItem tsmiWarehouse; + private System.Windows.Forms.ToolStripMenuItem tsmiPutIn; + private System.Windows.Forms.ToolStripStatusLabel tslServerHost; + private System.Windows.Forms.ToolStripMenuItem tsmiPrintPlanlabel; + private System.Windows.Forms.ToolStripMenuItem tsmiTakeOut; + private System.Windows.Forms.ToolStripMenuItem tsmiPartReplace; + private System.Windows.Forms.ToolStripMenuItem tsmiCheck; + private System.Windows.Forms.ToolStripMenuItem tsmiLabelRegeneration; + private System.Windows.Forms.ToolStripMenuItem tsmiQuery; + private System.Windows.Forms.ToolStripMenuItem tsmiProductInfo; + private System.Windows.Forms.ToolStripMenuItem 搪塑下线ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem btnvVWSinglePrint; + private System.Windows.Forms.ToolStripMenuItem btnInjectPrint; + private System.Windows.Forms.ToolStripMenuItem tsmDPAssmblyItem; + private System.Windows.Forms.ToolStripMenuItem 浇注投料ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tsmiFoamingFeed; + private System.Windows.Forms.ToolStripMenuItem btnSlushPut; + private System.Windows.Forms.ToolStripStatusLabel tsslblOPCStatus; + private System.Windows.Forms.ToolStripStatusLabel tsslblIps; + private System.Windows.Forms.ToolStripMenuItem tsmiUserManage; + private System.Windows.Forms.ToolStripMenuItem tsmiDefectRecording; + } +} + diff --git a/.svn/pristine/65/654253cb393081ce559a19ae3c5f6d14bb58f7c5.svn-base b/.svn/pristine/65/654253cb393081ce559a19ae3c5f6d14bb58f7c5.svn-base new file mode 100644 index 0000000..756dd59 Binary files /dev/null and b/.svn/pristine/65/654253cb393081ce559a19ae3c5f6d14bb58f7c5.svn-base differ diff --git a/.svn/pristine/66/6668a5312f8dd6c638d56b9fa78b430e0de20ca0.svn-base b/.svn/pristine/66/6668a5312f8dd6c638d56b9fa78b430e0de20ca0.svn-base new file mode 100644 index 0000000..5cfbb05 --- /dev/null +++ b/.svn/pristine/66/6668a5312f8dd6c638d56b9fa78b430e0de20ca0.svn-base @@ -0,0 +1,390 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.MD.Entity; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.FJC.DAL.BZD +{ + /// + /// 模块名称:BZD配置 + /// 作 者:宁红钢 + /// 编写日期:2020年04月29日 + /// + public class BZDConfigDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BZDConfig Get(BZDConfig info) + { + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BZDConfig GetMaterial(BZDConfig info) + { + try + { + string sql = null; + List parameters = new List(); + + sql = $"select * from T_BD_BZDConfig where MATERIALCODDE = '{info.MATERIALCODDE}'"; + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //获取信息 + info = session.Get(sql, parameters.ToArray()); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BZDConfig condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + // 对应多种数据库 + //string sqlChange = this.ChangeSqlByDB(sql, session); + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取全部规则 + /// + /// + public List GetAllList() + { + try + { + string sql = "SELECT * FROM [T_BD_BZDConfig]"; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BZDConfig condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句//[PID],[MPID],[barcodeFist],[Company_code],[Vehicle_type],[MATERIALCODDE],[configColor],[CREATEUSER],[CREATEDATE],[FLGDEL] + sqlBuilder.Append("SELECT * "); + sqlBuilder.Append("FROM [T_BD_BZDConfig] "); + whereBuilder.Append(" AND FLGDEL<> '1' "); + //查询条件 + + ////查询条件 + //if (string.IsNullOrEmpty(condition.FACTORY_CODE) == false) + //{ + // whereBuilder.Append(" AND FACTORY_CODE = @FACTORY_CODE "); + // parameters.Add(new DataParameter { ParameterName = "FACTORY_CODE", DataType = DbType.String, Value = condition.FACTORY_CODE }); + //} + //if (string.IsNullOrEmpty(condition.REGEX) == false) + //{ + // whereBuilder.Append(" AND REGEX LIKE @REGEX "); + // parameters.Add(new DataParameter { ParameterName = "REGEX", DataType = DbType.String, Value = "%" + condition.REGEX + "%" }); + //} + + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(BZDConfig info) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql(info, ref parameters); + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "BZDConfig"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BZDConfig info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_BD_BZDConfig"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BZDConfig info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BZDConfig info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(BZDConfig info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_BD_BZDConfig "); + sqlBuilder.Append("SET FLGDEL = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入 + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBZD")) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (BZDConfig info in list) + { + if (info.IsNewInfo) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + #endregion + + /// + /// + /// + /// 产品编号 + /// + public DataTable GetMaterialCode(String productCode) + { + DataTable returnVal = new DataTable(); + List parameters = new List(); + + string sqlScript = + @"select TOP 1 * from T_AW_PRODUCT where ProductCode = '" + productCode + "' ORDER BY CREATEDATE DESC"; + + //DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + returnVal = session.GetTable(sqlScript.ToString(), parameters.ToArray()); + } + return returnVal; + } + + public DataTable GetAppConfigValue(string pConfigCode) + { + string sqlScript = $"select Value from T_MD_AppConfig_QD where Code='{pConfigCode}'"; + List parameters = new List(); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetTable(sqlScript.ToString(), parameters.ToArray()); + } + } + + } +} diff --git a/.svn/pristine/66/66a20d36a37c4668a383bc0f1ef02807987836da.svn-base b/.svn/pristine/66/66a20d36a37c4668a383bc0f1ef02807987836da.svn-base new file mode 100644 index 0000000..6c57fbb --- /dev/null +++ b/.svn/pristine/66/66a20d36a37c4668a383bc0f1ef02807987836da.svn-base @@ -0,0 +1,1480 @@ + + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + QMAPP.FJC.Web + QMAPP.FJC.Web + v4.0 + false + + + 4.0 + + + + false + + + + + + + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\DLL\EmitMapper.dll + + + ..\..\DLL\Globale_Variablen.dll + + + ..\..\DLL\itextsharp.dll + + + False + ..\..\DLL\log4net.dll + + + ..\..\DLL\MySql.Data.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\NPOI.dll + + + False + ..\..\DLL\NPOI.OOXML.dll + + + False + ..\..\DLL\NPOI.OpenXml4Net.dll + + + False + ..\..\DLL\NPOI.OpenXmlFormats.dll + + + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + False + ..\..\APPMESReport\QMAPP.MESReport.Web\bin\QMAPP.MESReport.Entity.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.Expand.dll + + + + + 3.5 + + + + + + + + + + + + + False + ..\..\DLL\System.Web.Mvc.dll + + + + + + + + + + + + True + True + AppResource.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PrintMaster.Master + ASPXCodeBehind + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + + + Designer + Always + + + Designer + + + Designer + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + Always + + + + + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE} + QMAPP.Common.Web + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {4B533C1B-7D16-4BD3-9285-D6E7E9740645} + QMAPP.MD.Web + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {C78C8970-0737-4F36-8F54-137032EAFE41} + Common + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + ResXFileCodeGenerator + AppResource.Designer.cs + Designer + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + + False + False + 1777 + / + + + False + False + + + False + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/67/674816a2eeb96d16f843a85f7af7c1915a02a074.svn-base b/.svn/pristine/67/674816a2eeb96d16f843a85f7af7c1915a02a074.svn-base new file mode 100644 index 0000000..8429e6f --- /dev/null +++ b/.svn/pristine/67/674816a2eeb96d16f843a85f7af7c1915a02a074.svn-base @@ -0,0 +1,2321 @@ + + + + + <_PublishTargetUrl>C:\Users\Administrator\Desktop\发布\CDMES\APPWeb + + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 06/08/2021 15:41:43 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:18:55 + + + 09/01/2021 10:48:00 + + + 02/26/2021 09:31:12 + + + 09/01/2021 10:48:00 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:46 + + + 07/19/2012 10:59:52 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:44 + + + 09/02/2021 16:44:44 + + + 09/01/2021 10:48:01 + + + 09/01/2021 10:48:01 + + + 09/01/2021 10:47:59 + + + 09/01/2021 10:47:59 + + + 09/02/2021 16:44:47 + + + 02/26/2021 09:19:26 + + + 09/02/2021 16:44:47 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:42 + + + 09/02/2021 16:44:42 + + + 09/02/2021 16:44:48 + + + 09/02/2021 16:44:48 + + + 09/02/2021 16:44:45 + + + 09/02/2021 16:44:45 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:43 + + + 09/02/2021 16:44:42 + + + 09/02/2021 16:44:42 + + + 09/02/2021 16:44:44 + + + 05/26/2021 14:26:31 + + + 09/02/2021 16:44:44 + + + 09/02/2021 16:43:46 + + + 09/02/2021 16:43:46 + + + 09/01/2021 10:47:59 + + + 02/26/2021 09:27:17 + + + 09/01/2021 10:47:59 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/01/2012 09:06:22 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 05/25/2021 15:34:18 + + + 02/26/2021 09:20:37 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 05/25/2021 15:10:43 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 08/11/2021 08:03:25 + + + 07/20/2021 10:28:32 + + + 08/11/2021 08:17:06 + + + 07/21/2021 09:09:17 + + + 08/11/2021 14:43:39 + + + 08/11/2021 14:28:37 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/24/2021 21:46:03 + + + 05/24/2021 21:41:10 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 07/22/2021 15:26:52 + + + 08/24/2021 13:56:30 + + + 07/22/2021 15:27:35 + + + 08/10/2021 10:51:20 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 08/24/2021 14:26:02 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 09/01/2021 08:59:33 + + + \ No newline at end of file diff --git a/.svn/pristine/68/68a5249050a534a0f939b86b60cd3aec64221d30.svn-base b/.svn/pristine/68/68a5249050a534a0f939b86b60cd3aec64221d30.svn-base new file mode 100644 index 0000000..bea6558 --- /dev/null +++ b/.svn/pristine/68/68a5249050a534a0f939b86b60cd3aec64221d30.svn-base @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketMaterial Get(BucketMaterial info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketMaterial Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_BucketMaterial] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BucketMaterial condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + #region + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetBucketMaterialList(BucketMaterial info) + { + string sql = null; + var list = new List(); + List parameters = new List(); + try + { + sql = $"select * from T_MD_BucketMaterial where BucketCode = '{info.BucketCode}' and IsCheck <> '1'"; + //分页关键字段及排序 + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + list = session.GetList(sql, parameters.ToArray()).ToList(); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + } + + + #endregion + + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BucketMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,Line,BucketCode,RawMaterial,IsCheck,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_BucketMaterial "); + whereBuilder.Append(" AND IsCheck<> '1' "); + if (string.IsNullOrEmpty(condition.BucketCode) == false) + { + whereBuilder.Append(" AND BucketCode = @BucketCode"); + parameters.Add(new DataParameter { ParameterName = "BucketCode", DataType = DbType.String, Value = condition.BucketCode }); + } + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BucketMaterial info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_BucketMaterial"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BucketMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BucketMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_BucketMaterial "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/69/69282f19179decc7272644118d67e4a60943eee9.svn-base b/.svn/pristine/69/69282f19179decc7272644118d67e4a60943eee9.svn-base new file mode 100644 index 0000000..d520ccd --- /dev/null +++ b/.svn/pristine/69/69282f19179decc7272644118d67e4a60943eee9.svn-base @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_RawMaterial")] + public class RawMaterial : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 投料桶 + /// + [Description("投料桶")] + [DBColumn(ColumnName = "BucketCode", DataType = DbType.String)] + public string BucketCode { get; set; } + + /// + /// 零件号 + /// + [Description("零件号")] + [DBColumn(ColumnName = "PartCode", DataType = DbType.String)] + public string PartCode { get; set; } + + /// + /// 批次号 + /// + [Description("批次号")] + [DBColumn(ColumnName = "BatchCode", DataType = DbType.String)] + public string BatchCode { get; set; } + + /// + /// 流水号 + /// + [Description("流水号")] + [DBColumn(ColumnName = "SerialCode", DataType = DbType.String)] + public string SerialCode { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/6a/6a94c903f5db237b79910b1a489383395d34e0f5.svn-base b/.svn/pristine/6a/6a94c903f5db237b79910b1a489383395d34e0f5.svn-base new file mode 100644 index 0000000..0af7555 --- /dev/null +++ b/.svn/pristine/6a/6a94c903f5db237b79910b1a489383395d34e0f5.svn-base @@ -0,0 +1,2318 @@ + + + + + <_PublishTargetUrl>C:\Users\Administrator\Desktop\发布\CDMES\APPWeb + + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 06/08/2021 15:41:43 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:20:34 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:18:55 + + + 08/10/2021 12:10:56 + + + 02/26/2021 09:31:12 + + + 08/10/2021 12:10:56 + + + 02/26/2021 09:31:12 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:46 + + + 07/19/2012 10:59:52 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:46 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/12/2021 08:32:50 + + + 08/12/2021 08:32:50 + + + 08/12/2021 08:32:50 + + + 08/12/2021 08:32:50 + + + 08/10/2021 12:10:58 + + + 08/10/2021 12:10:58 + + + 08/10/2021 12:10:56 + + + 08/10/2021 12:10:56 + + + 08/12/2021 08:32:51 + + + 02/26/2021 09:19:26 + + + 08/12/2021 08:32:51 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:48 + + + 08/12/2021 08:32:48 + + + 08/12/2021 08:32:53 + + + 08/12/2021 08:32:53 + + + 08/12/2021 08:32:51 + + + 08/12/2021 08:32:51 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:49 + + + 08/12/2021 08:32:51 + + + 05/26/2021 14:26:31 + + + 08/12/2021 08:32:51 + + + 08/12/2021 08:25:23 + + + 08/12/2021 08:25:23 + + + 08/12/2021 08:32:48 + + + 02/26/2021 09:27:17 + + + 08/12/2021 08:32:48 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:34:05 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:31:37 + + + 08/01/2012 09:06:22 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 07/10/2012 12:03:34 + + + 02/26/2021 09:31:37 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 02/26/2021 09:20:36 + + + 05/25/2021 15:34:18 + + + 02/26/2021 09:20:37 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:42 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:43 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:44 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:46 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:47 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:41 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 05/25/2021 15:10:43 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 08/11/2021 08:03:25 + + + 07/20/2021 10:28:32 + + + 08/11/2021 08:17:06 + + + 07/21/2021 09:09:17 + + + 08/11/2021 14:43:39 + + + 08/11/2021 14:28:37 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/08/2021 14:24:07 + + + 05/24/2021 21:46:03 + + + 05/24/2021 21:41:10 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:48 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:49 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:50 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:51 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 02/26/2021 09:20:52 + + + 07/22/2021 15:26:52 + + + 07/22/2021 15:24:33 + + + 07/22/2021 15:27:35 + + + 08/10/2021 10:51:20 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 02/26/2021 09:20:53 + + + 07/19/2021 10:02:18 + + + \ No newline at end of file diff --git a/.svn/pristine/6a/6aaef438068f5c4c99bb13422a450df2eb844054.svn-base b/.svn/pristine/6a/6aaef438068f5c4c99bb13422a450df2eb844054.svn-base new file mode 100644 index 0000000..7d09a05 --- /dev/null +++ b/.svn/pristine/6a/6aaef438068f5c4c99bb13422a450df2eb844054.svn-base @@ -0,0 +1,236 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M12-1 + /// 作 用:投料记录 + /// 作 者:王庆男 + /// 编写日期:2015年06月08日 + /// + public partial class InjectionMoldingNEWEditForm1 : Form + { + RawMaterial recorder = new RawMaterial();//编辑保存实体 + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + + /// + /// 新建 + /// + public InjectionMoldingNEWEditForm1() + { + InitializeComponent(); + BucketCode.Focus(); + } + + /// + /// 编辑 + /// + /// + public InjectionMoldingNEWEditForm1(string pid) + { + recorder.PID = pid; + InitializeComponent(); + BucketCode.Focus(); + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + BucketCode.Focus(); + new KeyEvent().SetKeyToTxt(this); + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + + #endregion + + #region 加载编辑 + //判断是否为编辑加载编辑数据 + if (string.IsNullOrEmpty(recorder.PID) == false) + { + recorder = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Get.ToString(), recorder).Result; + + this.BatchCode.Text = recorder.BatchCode; + this.BucketCode.Text = recorder.BucketCode; + this.textBox1.Text = recorder.PartCode; + this.SerialCode.Text = recorder.SerialCode; + } + #endregion + } + + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + #region 加载保存信息 + + //批次 + recorder.BatchCode = this.BatchCode.Text; + recorder.BucketCode = this.BucketCode.Text; + recorder.PartCode = this.textBox1.Text; + recorder.SerialCode = this.SerialCode.Text; + + #endregion + + #region 保存 + DataResult result;//判断是否成功 + if (string.IsNullOrEmpty(recorder.PID) == true) + { + result = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Insert.ToString(), recorder); + } + else + { + result = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Update.ToString(), recorder); + } + //保存成功 + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + #endregion + } + + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + + + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region 校验 + string strMessage = ""; + + if (!string.IsNullOrEmpty(this.BucketCode.Text) && !string.IsNullOrEmpty(this.textBox1.Text)) + { + var List = _agent.InvokeServiceFunction>(DictService.BucketMaterialBLL_GetBucketMaterialList.ToString(), new BucketMaterial() { BucketCode = this.BucketCode.Text }); + if (List != null && List.Count > 0) + { + var count = 0; + foreach (var t in List) + { + if (System.Text.RegularExpressions.Regex.IsMatch(this.textBox1.Text, t.RawMaterial)) + count++; + + } + if (count == 0) + { + strMessage += this.BucketCode.Text + "原料上料错误 \r\n"; + } + + } + } + + //批次 + if (this.BatchCode.Text == string.Empty) + { + strMessage += Resource1.MaterialBatchNullValidate + "\r\n"; + } + + //料筒 + if (this.BucketCode.Text == string.Empty) + { + strMessage += "料筒不能为空\r\n"; + } + + //零件号 + if (this.textBox1.Text == string.Empty) + { + strMessage += "零件号不能为空\r\n"; + } + + return strMessage; + #endregion + } + + private void PartCode_TextChanged(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "textBox1") + { + if (!string.IsNullOrEmpty(this.BucketCode.Text) && !string.IsNullOrEmpty(this.textBox1.Text)) + { + var List = _agent.InvokeServiceFunction>(DictService.BucketMaterialBLL_GetBucketMaterialList.ToString(), new BucketMaterial() { BucketCode = this.BucketCode.Text }); + if (List != null && List.Count > 0) + { + var count = 0; + foreach (var t in List) + { + if (this.textBox1.Text== t.RawMaterial) + count++; + + } + if (count == 0) + { + //SpVoice voice = new SpVoice(); + //voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0); + //voice.Speak(this.BucketCode.Text + "原料上料错误"); + //PlaySound.PlaySounds.Play(); + } + + } + } + else + { + //PlaySound.PlaySounds.Play("条码扫描不规范"); + //SpVoice voice = new SpVoice(); + //voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0); + //voice.Speak("条码扫描不规范"); + } + BatchCode.Focus(); + } + } + + private void BucketCode_TextChanged(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "BucketCode") + { + textBox1.Focus(); + } + + } + + private void BatchCode_TextChanged(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "BatchCode") + SerialCode.Focus(); + } + } +} diff --git a/.svn/pristine/6c/6c19deb065ba7b2f9f5f146f689c596a7b6e6960.svn-base b/.svn/pristine/6c/6c19deb065ba7b2f9f5f146f689c596a7b6e6960.svn-base new file mode 100644 index 0000000..11afa6b Binary files /dev/null and b/.svn/pristine/6c/6c19deb065ba7b2f9f5f146f689c596a7b6e6960.svn-base differ diff --git a/.svn/pristine/6c/6c31ae6f135d5a90d3cbc034ceb7b914755081b7.svn-base b/.svn/pristine/6c/6c31ae6f135d5a90d3cbc034ceb7b914755081b7.svn-base new file mode 100644 index 0000000..cdbaf63 Binary files /dev/null and b/.svn/pristine/6c/6c31ae6f135d5a90d3cbc034ceb7b914755081b7.svn-base differ diff --git a/.svn/pristine/6e/6e0d225a436f1c5be48a23082cf2324fe2cb751a.svn-base b/.svn/pristine/6e/6e0d225a436f1c5be48a23082cf2324fe2cb751a.svn-base new file mode 100644 index 0000000..c697d4a Binary files /dev/null and b/.svn/pristine/6e/6e0d225a436f1c5be48a23082cf2324fe2cb751a.svn-base differ diff --git a/.svn/pristine/6f/6f27518f2d0e0f60079b86581fad45fa45f7efc1.svn-base b/.svn/pristine/6f/6f27518f2d0e0f60079b86581fad45fa45f7efc1.svn-base new file mode 100644 index 0000000..45b9edb --- /dev/null +++ b/.svn/pristine/6f/6f27518f2d0e0f60079b86581fad45fa45f7efc1.svn-base @@ -0,0 +1,43 @@ +using System; +using System.IO; +using System.Text; + +namespace QMAPP.WinForm +{ + public static class LogHelper + { + public static readonly string LogPath = $"{IoHelper.GetDllPath()}//Logs"; + + public static void Write(string content, string path = null) + { + try + { + if (path == null) + path = LogPath; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + string filename = $"{path}//{DateTime.Now:yyyyMMdd}.log"; + StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); + sw.WriteLine($"{DateTime.Now:HH:mm:ss fff}\t{content}"); + sw.WriteLine($"-----------------------------------------{Environment.NewLine}"); + sw.Close(); + } + catch (Exception) + { + // MessageBox.Show(ex.ToString()); + } + } + + public static void WriteEx(Exception ex) + { + Write(ex.ToString()); + } + + public static void WriteEx(Exception ex, string path) + { + Write(ex.ToString(), path); + } + } +} \ No newline at end of file diff --git a/.svn/pristine/6f/6f8adcf317d796795c513f91d0086626d387c6b9.svn-base b/.svn/pristine/6f/6f8adcf317d796795c513f91d0086626d387c6b9.svn-base new file mode 100644 index 0000000..bb0044f --- /dev/null +++ b/.svn/pristine/6f/6f8adcf317d796795c513f91d0086626d387c6b9.svn-base @@ -0,0 +1,352 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; + +using QMFrameWork.Data; + +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.DAL.BZD; + +namespace QMAPP.FJC.BLL.BZD +{ + /// + /// 模块名称:BZD条码配置 + /// 作 者:宁红钢 + /// 编写日期:2019年10月12日 + /// + public class BZDConfigBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BZDConfig model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BZDConfigDAL().Get(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult GetMaterial(BZDConfig model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BZDConfigDAL().GetMaterial(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + + #endregion + + #region 获取列表(分页) + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BZDConfig condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + //获取物料信息列表 + DataPage dataPage = new BZDConfigDAL().GetList(condition, page); + + result.Result = dataPage; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + + } + /// + /// 获取全部条码格式规则 + /// + /// + public List GetAllList(string str) + { + return new BZDConfigDAL().GetAllList(); + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// 信息 + /// true:已存在;fasel:不存在。 + public bool Exists(BZDConfig info) + { + try + { + return new BZDConfigDAL().Exists(info); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(BZDConfig info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now; + info.UPDATEUSER = info.CREATEUSER; + info.UPDATEDATE = info.CREATEDATE; + info.FLGDEL = "0"; + BZDConfigDAL cmdDAL = new BZDConfigDAL(); + result.Result = new BZDConfigDAL().Insert(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// 信息 + /// 更新行数 + public DataResult Update(BZDConfig info) + { + DataResult result = new DataResult(); + try + { + info.UPDATEUSER = this.LoginUser.UserID; + info.UPDATEDATE = DateTime.Now; + info.FLGDEL = "0"; + result.Result = new BZDConfigDAL().Update(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除信息 + /// + /// 主键串 + /// 删除个数 + public DataResult Delete(string strs) + { + int count = 0; + DataResult result = new DataResult(); + string[] list = strs.Split(":".ToCharArray()); + try + { + foreach (string str in list) + { + count += this.DeleteBarcodeRules(new BZDConfig { PID = str }); + } + result.Result = count; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int DeleteBarcodeRules(BZDConfig info) + { + try + { + return new BZDConfigDAL().Delete(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(BZDConfig info) + { + try + { + return new BZDConfigDAL().GetExportData(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入数据 + /// + /// 导入数据 + /// + /// 数据 + /// 导入结果 + public DataResult ImportData(List list) + { + DataResult result = new DataResult(); + BZDConfigDAL cmDal = new BZDConfigDAL(); + List List = new List(); + int index = 0; + try + { + result.Result = new ImportMessage(); + result.Result.Errors = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //状态判断 + foreach (BZDConfig ma in list) + { + index++; + if (!string.IsNullOrEmpty(ma.InfoError)) + { + ma.PID = null; + result.Result.failureNum += 1; + continue; + } + //修改改时根据主键等信息获取详细内容信息 + BZDConfig oldInfo = cmDal.Get(ma); + if (oldInfo != null) + { + //更新 + ma.PID = oldInfo.PID; + ma.CREATEUSER = oldInfo.CREATEUSER; + ma.CREATEDATE = oldInfo.CREATEDATE; + ma.UPDATEUSER = this.LoginUser.UserID; + ma.UPDATEDATE = oldInfo.UPDATEDATE; + ma.IsNewInfo = false; + result.Result.updateNum += 1; + } + else + { + //新增 + oldInfo = new BZDConfig(); + ma.PID = Guid.NewGuid().ToString(); + ma.CREATEUSER = this.LoginUser.UserID; + ma.CREATEDATE = DateTime.Now; + ma.UPDATEUSER = ma.CREATEUSER; + ma.UPDATEDATE = ma.UPDATEDATE; + ma.IsNewInfo = true; + result.Result.insertNum += 1; + } + List.Add(ma); + } + } + //导入 + cmDal.GetImportData(List); + result.Msg = "导入成功"; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Ex = ex; + return result; + } + } + #endregion + + /// + /// 通过产品条码 搜索总成编码类型 052打印使用 + /// + /// + /// + public DataTable GetMaterialCode(string productCode) + { + try + { + return new BZDConfigDAL().GetMaterialCode(productCode); + } + catch (Exception ex) + { + throw ex; + } + } + + public DataTable GetAppConfigValue(string productCode) + { + try + { + return new BZDConfigDAL().GetAppConfigValue(productCode); + } + catch (Exception ex) + { + throw ex; + } + } + + + } +} diff --git a/.svn/pristine/70/70e018e035904d7785eece72c03ea8cb005faed4.svn-base b/.svn/pristine/70/70e018e035904d7785eece72c03ea8cb005faed4.svn-base new file mode 100644 index 0000000..d6705b2 Binary files /dev/null and b/.svn/pristine/70/70e018e035904d7785eece72c03ea8cb005faed4.svn-base differ diff --git a/.svn/pristine/71/71f613451003be3f64f69f8984e3e00c27a84961.svn-base b/.svn/pristine/71/71f613451003be3f64f69f8984e3e00c27a84961.svn-base new file mode 100644 index 0000000..1e9732d Binary files /dev/null and b/.svn/pristine/71/71f613451003be3f64f69f8984e3e00c27a84961.svn-base differ diff --git a/.svn/pristine/73/733bd13c8e7d287e9d9116c0729a5f955654e104.svn-base b/.svn/pristine/73/733bd13c8e7d287e9d9116c0729a5f955654e104.svn-base new file mode 100644 index 0000000..d5c3251 --- /dev/null +++ b/.svn/pristine/73/733bd13c8e7d287e9d9116c0729a5f955654e104.svn-base @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.svn/pristine/74/74b513a5f7432b516bcc8ffa8ac992fcc89f1a38.svn-base b/.svn/pristine/74/74b513a5f7432b516bcc8ffa8ac992fcc89f1a38.svn-base new file mode 100644 index 0000000..97604f9 --- /dev/null +++ b/.svn/pristine/74/74b513a5f7432b516bcc8ffa8ac992fcc89f1a38.svn-base @@ -0,0 +1,263 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Data.SqlClient; +using System.Data; +namespace QM.Assist +{ + public class PrintUtil + { + /// + /// 条码打印队列1 + /// + public static List LabelList1 = new List(); + + /// + /// 条码打印队列2(PDF虚拟打印机) + /// + public static List LabelList2 = new List(); + + int count1 = 0; + + /// + /// 截取字符串函数每行放20个字符 + /// + /// + /// + private string[] strSplit(string str) + { + //计数如果大于20则放弃 + string[] tempStr = new string[3]; + int strNo = 0; + //分解的次数 + int number = 0; + + string strTemp = string.Empty; + for (int i = 0; i < str.Length; i++) + { + strTemp = str.Substring(i, 1); + byte[] strByte = Encoding.Default.GetBytes(strTemp); + + if (strNo + strByte.Length <= 20) + { + strNo += strByte.Length; + tempStr[number] = tempStr[number] + strTemp; + } + else + { + strNo = strByte.Length; + number += 1; + tempStr[number] = tempStr[number] + strTemp; + } + } + return tempStr; + + + } + + /// + /// 打印条码2(PDF) + /// + public void PrintLabel2(string proPath, string temPath, string dataPath) + { + + /*************************************测试用***********************************************************************************************************/ + #region + while (true) + { + count1 = LabelList2.Count; + + System.Diagnostics.Process[] thisproc = System.Diagnostics.Process.GetProcessesByName("Lmwprint"); + if (thisproc.Length == 0) + { + if (count1 > 0) + { + ModifyDataBase2(dataPath); + try + { + System.Diagnostics.Process proc = new System.Diagnostics.Process(); + proc.StartInfo.FileName = "\"" + proPath + "\""; + proc.StartInfo.Arguments = " \"" + temPath + "\""; + + proc.Start(); + + for (int i = 0; i < count1; i++) + { + LabelList2.RemoveAt(0); + } + + break; + + } + catch (Exception ex) + { + throw ex; + } + } + } + else + { + thisproc[0].Kill(); + } + System.Threading.Thread.Sleep(1000); + } + #endregion + } + + /// + /// 修改2号条码数据文件(PDF) + /// + private void ModifyDataBase2(string dataPath) + { + #region + while (true) + { + try + { + string head = System.IO.File.ReadAllLines(dataPath, Encoding.ASCII)[0]; + string[] lines = new string[count1 + 1]; + lines[0] = head; + + for (int i = 1; i <= count1; i++) + { + lines[i] = LabelList2[i - 1].BarCode; + //QM.Assist.ExceptionUtil.WriteTrace(lines[i]); + } + System.IO.File.WriteAllLines(dataPath, lines, Encoding.Default); + lines = null; + break; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } + + + /// + /// 打印条码 + /// + public void PrintLabel() + { + + #region + while (true) + { + count1 = LabelList2.Count; + + System.Diagnostics.Process[] thisproc = System.Diagnostics.Process.GetProcessesByName("Lmwprint"); + if (thisproc.Length == 0) + { + if (count1 > 0) + { + ModifyDataBase(); + try + { + System.Diagnostics.Process proc = new System.Diagnostics.Process(); + proc.StartInfo.FileName = "\"" + "程序文件" + "\""; + proc.StartInfo.Arguments = " \"" + "模板文件" + "\""; + proc.Start(); + + for (int i = 0; i < count1; i++) + { + LabelList2.RemoveAt(0); + } + + break; + + } + catch (Exception ex) + { + throw ex; + } + } + } + else + { + thisproc[0].Kill(); + } + System.Threading.Thread.Sleep(1000); + } + #endregion + } + /// + /// 修改2号条码数据文件(PDF) + /// + private void ModifyDataBase() + { + #region + while (true) + { + try + { + string head = System.IO.File.ReadAllLines("数据文件", Encoding.ASCII)[0]; + string[] lines = new string[count1 + 1]; + lines[0] = head; + + for (int i = 1; i <= count1; i++) + { + lines[i] = LabelList2[i - 1].LabelData.Rows[0]["LABELID"].ToString() + + "," + "零件号 " + LabelList2[i - 1].LabelData.Rows[0]["MATNO"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["ITEMNAME"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["MATNAME"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["PACKAAGEQUAN"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["COLOR"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["SIZE"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["WEIGHT"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["BATCH"].ToString() + + "," + "供应商编号 " + LabelList2[i - 1].LabelData.Rows[0]["VENDORID"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["VENDORNAME"].ToString(); + + //QM.Assist.ExceptionUtil.WriteTrace(lines[i]); + } + System.IO.File.WriteAllLines("数据文件", lines, Encoding.Default); + lines = null; + break; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } + + public static class BarCode + { + + public static string Get128CodeString(string inputData) + { + string result; + int checksum = 104; + + for (int ii = 0; ii < inputData.Length; ii++) + { + if (inputData[ii] >= 32) + { + checksum += (inputData[ii] - 32) * (ii + 1); + } + else + { + checksum += (inputData[ii] + 64) * (ii + 1); + } + } + + checksum = checksum % 103; + if (checksum < 95) + { + checksum += 32; + } + else + { + checksum += 100; + } + + result = Convert.ToChar(204) + inputData + Convert.ToChar(checksum) + Convert.ToChar(206); + return result; + } + } + + } +} diff --git a/.svn/pristine/74/74c6cdab6aae48959e49d13481e940f97a8b6b9f.svn-base b/.svn/pristine/74/74c6cdab6aae48959e49d13481e940f97a8b6b9f.svn-base new file mode 100644 index 0000000..7c59081 --- /dev/null +++ b/.svn/pristine/74/74c6cdab6aae48959e49d13481e940f97a8b6b9f.svn-base @@ -0,0 +1,884 @@ + + + + EpidermisBLL + 表皮查询 + QMAPP.FJC.BLL.FeedInManage.EpidermisBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialCodeBLL + 物料号查询 + QMAPP.FJC.BLL.Operation.MaterialCodeBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.DLL + + + + + + FISOrderBLL + FIS计划查询 + QMAPP.FJC.BLL.FIS.FISOrderBLL + QMAPP.FJC.BLL.DLL + + + + + + OrderPlanBLL + 注塑管理计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + DashBoardPlanBLL + 仪表板计划 + QMAPP.FJC.BLL.FIS.DashBoardPlanBLL + QMAPP.FJC.BLL.DLL + + + + + DoorPlankPlanBLL + 门板计划 + QMAPP.FJC.BLL.FIS.DoorPlankPlanBLL + QMAPP.FJC.BLL.DLL + + + + + FrmPlaceBLL + 发运模块 + QMAPP.FJC.BLL.FrmPlace.FrmPlaceBLL + QMAPP.FJC.BLL.DLL + + + + StocktakingBLL + 库存盘点 + QMAPP.FJC.BLL.Stocktaking.StocktakingBLL + QMAPP.FJC.BLL.DLL + + + + + FISOrderSendBLL + FIS订单发货信息 + QMAPP.FJC.BLL.FIS.FISOrderSendBLL + QMAPP.FJC.BLL.DLL + + + + + OrderPlanBLL + 订单生产计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + + + + + + + + + + UnQualityProductBLL + 不合格品数量 + QMAPP.FJC.BLL.Basic.UnQualityProductBLL + QMAPP.FJC.BLL.DLL + + + + WorkCenterBLL + 工作中心信息 + QMAPP.FJC.BLL.Basic.WorkCenterBLL + QMAPP.FJC.BLL.DLL + + + + CapacityBLL + 班次产能 + QMAPP.FJC.BLL.Basic.CapacityBLL + QMAPP.FJC.BLL.DLL + + + + + ProcessRouteBLL + 工艺路线 + QMAPP.FJC.BLL.Basic.ProcessRouteBLL + QMAPP.FJC.BLL.DLL + + + + BomHdrBLL + Bom信息维护 + QMAPP.FJC.BLL.Basic.BomHdrBLL + QMAPP.FJC.BLL.DLL + + + + MaterielBLL + 物料号信息 + QMAPP.FJC.BLL.Basic.MaterielBLL + QMAPP.FJC.BLL.DLL + + + + + MaterielVersionBLL + 物料类型信息 + QMAPP.FJC.BLL.Basic.MaterielVersionBLL + QMAPP.FJC.BLL.DLL + + + + + MachineInfoBLL + 设备信息 + QMAPP.FJC.BLL.Basic.MachineInfoBLL + QMAPP.FJC.BLL.DLL + + + + MachineInfoModelBLL + 设备模具信息 + QMAPP.FJC.BLL.Basic.MachineInfoModelBLL + QMAPP.FJC.BLL.DLL + + + + MouldBLL + 模具信息 + QMAPP.FJC.BLL.Equipment.MouldBLL + QMAPP.FJC.BLL.DLL + + + + ProduceShiftBLL + 班次信息 + QMAPP.FJC.BLL.Basic.ProduceShiftBLL + QMAPP.FJC.BLL.DLL + + + + ProductCodeIdentityBLL + 零件条码标识 + QMAPP.FJC.BLL.Basic.ProductCodeIdentityBLL + QMAPP.FJC.BLL.DLL + + + + OperatorInfoBLL + 操作员 + QMAPP.FJC.BLL.Basic.OperatorInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessInfoBLL + 工序名称 + QMAPP.FJC.BLL.Basic.ProcessInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessSetBLL + 工序设置 + QMAPP.FJC.BLL.Basic.ProcessSetBLL + QMAPP.FJC.BLL.DLL + + + + ProcessRuleBLL + 工序先决条件 + QMAPP.FJC.BLL.Basic.ProcessRuleBLL + QMAPP.FJC.BLL.DLL + + + + ProcessParameterBLL + 加工参数标准值设定 + QMAPP.FJC.BLL.Basic.ProcessParameterBLL + QMAPP.FJC.BLL.DLL + + + + ProductMderuleBLL + 投料配置规则 + QMAPP.FJC.BLL.Basic.ProductMderuleBLL + QMAPP.FJC.BLL.DLL + + + + MaterialShelfTypeBLL + 物料架类型维护 + QMAPP.FJC.BLL.Basic.MaterialShelfTypeBLL + QMAPP.FJC.BLL.DLL + + + + + InjectionRecorderBLL + 注塑投料记录 + QMAPP.FJC.BLL.Injection.InjectionRecorderBLL + QMAPP.FJC.BLL.DLL + + + + SlushRecorderBLL + 搪塑投料记录 + QMAPP.FJC.BLL.Injection.SlushRecorderBLL + QMAPP.FJC.BLL.DLL + + + + PouringRecorderBLL + 浇注投料记录 + QMAPP.FJC.BLL.Injection.PouringRecorderBLL + QMAPP.FJC.BLL.DLL + + + + ProductBLL + 零件条码 + QMAPP.FJC.BLL.Operation.ProductBLL + QMAPP.FJC.BLL.DLL + + + + ProductBasicBLL + 零件类别 + QMAPP.FJC.BLL.Basic.ProductBasicBLL + QMAPP.FJC.BLL.DLL + + + + ProductInfoBLL + 零件号 + QMAPP.FJC.BLL.Basic.ProductInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProductAttributeBLL + 零件条码属性 + QMAPP.FJC.BLL.Operation.ProductAttributeBLL + QMAPP.FJC.BLL.DLL + + + + EquipmentMaintainBLL + 设备停机维护 + QMAPP.FJC.BLL.Equipment.EquipmentMaintainBLL + QMAPP.FJC.BLL.DLL + + + + + ProductInjectionBLL + 投料与零件关联 + QMAPP.FJC.BLL.Operation.ProductInjectionBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanInfoBLL + 贴车单记录 + QMAPP.FJC.BLL.SendPlan.SendPlanInfoBLL + QMAPP.FJC.BLL.DLL + + + + MainBLL + 加工本体 + QMAPP.FJC.BLL.Operation.MainBLL + QMAPP.FJC.BLL.DLL + + + + ProductEndBLL + 成品查询 + QMAPP.FJC.BLL.Operation.ProductEndBLL + QMAPP.FJC.BLL.DLL + + + + MainProductBLL + 主体与零件关联关系 + QMAPP.FJC.BLL.Operation.MainProductBLL + QMAPP.FJC.BLL.DLL + + + + SPCControlBLL + SPC监控 + QMAPP.FJC.BLL.IPC.SPCControlBLL + QMAPP.FJC.BLL.DLL + + + + ProducePlanBLL + 生产记录维护 + QMAPP.FJC.BLL.ProduceManage.ProducePlanBLL + QMAPP.FJC.BLL.DLL + + + + UnQualityBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.UnQualityBLL + QMAPP.FJC.BLL.DLL + + + + MainOperationBLL + 加工查询 + QMAPP.FJC.BLL.Operation.MainOperationBLL + QMAPP.FJC.BLL.DLL + + + + ProductArchivesBLL + 产品档案 + QMAPP.FJC.BLL.ProductPetrospect.ProductArchivesBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentAlarmBLL + 设备报警维护 + QMAPP.FJC.BLL.WarnManage.EquipMentAlarmBLL + QMAPP.FJC.BLL.DLL + + + + WarnManageBLL + 自动报警维护 + QMAPP.FJC.BLL.WarnManage.WarnManageBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentMaintainSearchBLL + 设备停机记录 + QMAPP.FJC.BLL.WarnManage.EquipMentMaintainSearchBLL + QMAPP.FJC.BLL.DLL + + + + StorageAlarmBLL + 低储报警信息 + QMAPP.FJC.BLL.WIPManage.StorageAlarmBLL + QMAPP.FJC.BLL.DLL + + + + DetentionBLL + 滞留品查询 + QMAPP.FJC.BLL.WIPManage.DetentionBLL + QMAPP.FJC.BLL.DLL + + + + + + MendRecorderBLL + 返修记录 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + + MainProductCountBLL + 成品数量查询 + QMAPP.FJC.BLL.Operation.MainProductCountBLL + QMAPP.FJC.BLL.dll + + + + WIPInventoryBLL + 在制品库存 + QMAPP.FJC.BLL.WIPManage.WIPInventoryBLL + QMAPP.FJC.BLL.DLL + + + WIPInRecorderBLL + 在制品入库信息 + QMAPP.FJC.BLL.WIPManage.WIPInRecorderBLL + QMAPP.FJC.BLL.DLL + + + WIPOutRecorderBLL + 在制品出库信息 + QMAPP.FJC.BLL.WIPManage.WIPOutRecorderBLL + QMAPP.FJC.BLL.DLL + + + + WIPProductCountBLL + 在制品数量查询 + QMAPP.FJC.BLL.WIPManage.WIPProductCountBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanRecordBLL + 贴车单查询 + QMAPP.FJC.BLL.SendManage.SendPlanRecordBLL + QMAPP.FJC.BLL.DLL + + + FISInfoBLL + FIS M100生产信息查询 + QMAPP.FJC.BLL.FIS.FISInfoBLL + QMAPP.FJC.BLL.DLL + + + CheckWipBLL + 定时查询在制品库存 + QMAPP.FJC.BLL.WipService.CheckWipBLL + QMAPP.FJC.BLL.DLL + + + + FisBLL + 返修记录 + QMAPP.FJC.BLL.FIS.FisBLL + QMAPP.FJC.BLL.DLL + + + + + ScrapRecordBLL + 报废记录 + QMAPP.FJC.BLL.ProduceManage.ScrapRecordBLL + QMAPP.FJC.BLL.DLL + + + + OutWarehouseBLL + FISM100接口 + QMAPP.FJC.BLL.WarehouseManage.OutWarehouseBLL + QMAPP.FJC.BLL.DLL + + + InWarehouseBLL + 入库操作 + QMAPP.FJC.BLL.WarehouseManage.InWarehouseBLL + QMAPP.FJC.BLL.DLL + + + + FileCopyRecordBLL + 文件复制 + QMAPP.FJC.BLL.FileCopy.FileCopyRecordBLL + QMAPP.FJC.BLL.DLL + + + + MoldConfigBLL + 模具配置信息 + QMAPP.FJC.BLL.Basic.MoldConfigBLL + QMAPP.FJC.BLL.DLL + + + + MoldSetBLL + 模腔配置信息 + QMAPP.FJC.BLL.Basic.MoldSetBLL + QMAPP.FJC.BLL.DLL + + + + CastCounterBLL + 模腔配置信息 + QMAPP.FJC.BLL.Operation.CastCounterBLL + QMAPP.FJC.BLL.DLL + + + + InjectionCheckBLL + 注塑查验信息 + QMAPP.FJC.BLL.Operation.InjectionCheckBLL + QMAPP.FJC.BLL.DLL + + + + DefectTypeBLL + 缺陷类型 + QMAPP.FJC.BLL.ProduceManage.DefectTypeBLL + QMAPP.FJC.BLL.DLL + + + + PrintModelCopyBLL + 获取打印模板 + QMAPP.FJC.BLL.Basic.PrintModelCopyBLL + QMAPP.FJC.BLL.DLL + + + + CompleteStatisticsBLL + 完工统计Business + QMAPP.FJC.BLL.CompleteStatistics.CompleteStatisticsBLL + QMAPP.FJC.BLL.DLL + + + + ShipmentMonitorBLL + 发运看板 + QMAPP.FJC.BLL.Monitor.ShipmentMonitorBLL + QMAPP.FJC.BLL.DLL + + + + LineDWQTYCountBLL + 生产日报 + QMAPP.MESReport.BLL.LineQTY.LineDWQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + LineShiftQTYCountBLL + 班次对比分析 + QMAPP.MESReport.BLL.LineQTY.LineShiftQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + ShipmentCountBLL + 生产发运统计 + QMAPP.MESReport.BLL.LineQTY.ShipmentCountBLL + QMAPP.MESReport.BLL.DLL + + + + StandardRateCountBLL + 合格率分析 + QMAPP.MESReport.BLL.LineQTY.StandardRateCountBLL + QMAPP.MESReport.BLL.DLL + + + DAIBLL + 完工统计Business + QMAPP.FJC.BLL.QT.DAIBLL + QMAPP.FJC.BLL.DLL + + + BarcodeRulesBLL + 条码规则数据服务 + QMAPP.FJC.BLL.Basic.BarcodeRulesBLL + QMAPP.FJC.BLL.dll + + + DAI + 条码规则数据服务 + QMAPP.FJC.TRACING.DAHandler.DataAcquirer + QMAPP.FJC.TRACING.dll + + + DAICacheBLL + 采集缓存数据服务 + QMAPP.FJC.BLL.QT.DAICacheBLL + QMAPP.FJC.BLL.dll + + + DAIValidationBLL + 采集校验服务 + QMAPP.FJC.BLL.QT.DAIValidationBLL + QMAPP.FJC.BLL.dll + + + MeterReadingsBLL + 设备能耗统计 + QMAPP.FJC.BLL.EnergyManage.MeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + QTYInfoCountBLL + 生产统计 + QMAPP.MESReport.BLL.LineQTY.QTYInfoCountBLL + QMAPP.MESReport.BLL.DLL + + + + EmMeterReadingsBLL + 能源统计 + QMAPP.FJC.BLL.EM.EmMeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + MeterBLL + 能源表维护 + QMAPP.FJC.BLL.EnergyManage.MeterBLL + QMAPP.FJC.BLL.DLL + + + + mbM100BLL + 门板FIS数据获取 + QMAPP.FJC.BLL.QdFis.mbM100BLL + QMAPP.FJC.BLL.DLL + + + + ybbM100BLL + 仪表板FIS数据获取 + QMAPP.FJC.BLL.QdFis.ybbM100BLL + QMAPP.FJC.BLL.DLL + + + + QTYCompletionRateBLL + 生产完成率分析 + QMAPP.MESReport.BLL.LineQTY.QTYCompletionRateBLL + QMAPP.MESReport.BLL.DLL + + + + WorkOrderBLL + 派工单 + QMAPP.FJC.BLL.ProductionPlan.WorkOrderBLL + QMAPP.FJC.BLL.dll + + + + + WasteRateCountBLL + 废品率统计 + QMAPP.MESReport.BLL.LineQTY.WasteRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + ProduceCycleTimeBLL + 节拍统计 + QMAPP.MESReport.BLL.LineQTY.ProduceCycleTimeBLL + QMAPP.MESReport.BLL.DLL + + + + RepairRateCountBLL + 返修率统计 + QMAPP.MESReport.BLL.LineQTY.RepairRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + EquConsumeCountBLL + 设备用电分析 + QMAPP.MESReport.BLL.LineQTY.EquConsumeCountBLL + QMAPP.MESReport.BLL.DLL + + + + EqueUseCountBLL + 设备利用率分析 + QMAPP.MESReport.BLL.LineQTY.EqueUseCountBLL + QMAPP.MESReport.BLL.DLL + + + + AnDongCallBLL + 安东呼叫统计 + QMAPP.MESReport.BLL.LineQTY.AnDongCallBLL + QMAPP.MESReport.BLL.DLL + + + + + ProcessRecordBLL + 加工记录 + QMAPP.FJC.BLL.QT.ProcessRecordBLL + QMAPP.FJC.BLL.dll + + + + VideoInfoBLL + 视频播放 + QMAPP.FJC.BLL.ODS.VideoInfoBLL + QMAPP.FJC.BLL.DLL + + + + VideoTypeBLL + 视频类型 + QMAPP.FJC.BLL.ODS.VideoTypeBLL + QMAPP.FJC.BLL.DLL + + + + AndonCallBLL + 安东呼叫 + QMAPP.FJC.BLL.Andon.AndonCallBLL + QMAPP.FJC.BLL.DLL + + + + MachineCheckBLL + 设备点检 + QMAPP.FJC.BLL.MachineCheck.MachineCheckBLL + QMAPP.FJC.BLL.DLL + + + + UsageLogBLL + 模具统计 + QMAPP.FJC.BLL.Equipment.UsageLogBLL + QMAPP.FJC.BLL.DLL + + + + TempProductBLL + 模具资料获取 + QMAPP.FJC.BLL.Equipment.TempProductBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentRecordBLL + 设备维修记录 + QMAPP.FJC.BLL.Equipment.EquipMentRecordBLL + QMAPP.FJC.BLL.DLL + + + + ProductOutBLL + 出库 + QMAPP.FJC.BLL.Operation.ProductOutBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库查询 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.dll + + + + MaterialBindingBLL + 物料信息绑定关系 + QMAPP.FJC.BLL.QT.MaterialBindingBLL + QMAPP.FJC.BLL.dll + + + + AnalyzerBLL + 解析类别 + QMAPP.FJC.BLL.QT.AnalyzerBLL + QMAPP.FJC.BLL.dll + + + + + ProductCheckBLL + 抽检 + QMAPP.FJC.BLL.Operation.ProductCheckBLL + QMAPP.FJC.BLL.dll + + + + PackageBLL + 线边库存大屏显示 + QMAPP.FJC.BLL.Package.PackageBLL + QMAPP.FJC.BLL.dll + + + + MainCodeChangeBLL + 总成条码替换 + QMAPP.FJC.BLL.Operation.MainCodeChangeBLL + QMAPP.FJC.BLL.DLL + + + + MendRecorderBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + FISPhraseBLL + FIS短语字典 + QMAPP.FJC.BLL.FIS.FISPhraseBLL + QMAPP.FJC.BLL.DLL + + + LeakInspectRecordBLL + 漏装检测记录 + QMAPP.FJC.BLL.InterfaceData.LeakInspectRecordBLL + QMAPP.FJC.BLL.DLL + + + AppConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.AppConfigBLL + QMAPP.FJC.BLL.DLL + + + PbomItemBLL + BOM明细 + QMAPP.FJC.BLL.Operation.PbomItemBLL + QMAPP.FJC.BLL.DLL + + + ScanIPConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.ScanIPConfigBLL + QMAPP.FJC.BLL.DLL + + + aterialBomConfigBLLBLL + 配置表 + QMAPP.FJC.BLL.Basic.aterialBomConfigBLLBLL + QMAPP.FJC.BLL.DLL + + + + + BZDConfigBLL + BZD配置 + QMAPP.FJC.BLL.BZD.BZDConfigBLL + QMAPP.FJC.BLL.DLL + + + + BZDRecorderBLL + BZD记录 + QMAPP.FJC.BLL.BZD.BZDRecorderBLL + QMAPP.FJC.BLL.DLL + + + \ No newline at end of file diff --git a/.svn/pristine/76/76abd3c81300c872e1e75cf6b78d7ce83e468ff0.svn-base b/.svn/pristine/76/76abd3c81300c872e1e75cf6b78d7ce83e468ff0.svn-base new file mode 100644 index 0000000..24c9859 --- /dev/null +++ b/.svn/pristine/76/76abd3c81300c872e1e75cf6b78d7ce83e468ff0.svn-base @@ -0,0 +1,93 @@ +using System; +using QMFrameWork.Data.Attributes; +using QMAPP.Entity; +using System.Data; + +namespace QMAPP.FJC.Entity.CheckTime +{ + public class ProductTime + { + public string PID { get; set; } + /// + /// 当前工位编号 + /// + public string CWorkLoc_Code { get; set; } + /// + /// 产品码列名 + /// + public string Product_Column { get; set; } + + + + /// + /// 校验工位编号 + /// + public string PWorkLoc_Code { get; set; } + /// + /// 校验工位列名 + /// + public string PWorkLoc_Column { get; set; } + + /// + /// 是否验证 + /// + public string Check { get; set; } + /// + /// 验证运算符 + /// + public string Operator { get; set; } + /// + /// 验证类型 + /// + public string Check_Type { get; set; } + /// + /// 验证值 + /// + public string Check_Value { get; set; } + /// + /// 校验表 + /// + public string Check_Table { get; set; } + /// + /// 校验字段 + /// + public string Check_Column { get; set; } + /// + /// 描述 + /// + public string Remark { get; set; } + /// + /// 创建时间 + /// + public DateTime? CREATEDATE { get; set; } + /// + /// 创建用户 + /// + public string CREATEUSER { get; set; } + /// + /// 更新用户 + /// + public string UPDATEUSER { get; set; } + /// + /// 更新时间 + /// + public DateTime? UPDATEDATE { get; set; } + /// + /// 备用字段1 + /// + public string Column1 { get; set; } + /// + /// 备用字段2 + /// + public string Column2 { get; set; } + + public string PWhere { get; set; } + + /// + /// 采集点 + /// + public string DAI_Code { get; set; } + + public string Check_ValueTo { get; set; } + } +} diff --git a/.svn/pristine/77/7711622f9e53e3e66508362c802d949d594a4063.svn-base b/.svn/pristine/77/7711622f9e53e3e66508362c802d949d594a4063.svn-base new file mode 100644 index 0000000..ef299e2 Binary files /dev/null and b/.svn/pristine/77/7711622f9e53e3e66508362c802d949d594a4063.svn-base differ diff --git a/.svn/pristine/78/78c1889e56d30fe956ca8b8afe137579381491ce.svn-base b/.svn/pristine/78/78c1889e56d30fe956ca8b8afe137579381491ce.svn-base new file mode 100644 index 0000000..b156f33 --- /dev/null +++ b/.svn/pristine/78/78c1889e56d30fe956ca8b8afe137579381491ce.svn-base @@ -0,0 +1,1059 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Reflection; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.DAL.QT; +using QMAPP.BLL; +using QMAPP.MD.DAL; +using QMAPP.FJC.Entity.Basic; +using QMFrameWork.Log; + +namespace QMAPP.FJC.TRACING.DAHandler +{ + /// + /// 数据获取类 + /// + public class DataAcquirer : BaseBLL + { + #region 静态字段 + /// + /// 数据解析类列表 + /// + static Dictionary _AnalyzerList; + /// + /// 数据解析类列表 + /// + static List _ValidatorList; + /// + /// 状态动作列表 + /// + static Dictionary _StateActionList; + #endregion + + /// + /// 输入数据 + /// + /// 工序编码 + /// 工位编码 + /// 采集点编码 + /// 采集值 + /// 返回采集结果 + public DAResult Input(DAArgs Args) + { + DAResult result = new DAResult(); + result.MouldCode = Args.MouldCode; + DAObject data = null; + StringBuilder log = new StringBuilder(); + try + { + + System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); + log.AppendFormat("{0},{1},{2}\t", Args.WorkLocCode, Args.DACode, Args.DAValue); + stopwatch.Start(); + //初始化采集数据对象 + data = InitDAObject(Args); + + stopwatch.Stop(); + log.AppendFormat("INITDA:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + AnalyzeData(data);//解析数据 + + stopwatch.Stop(); + log.AppendFormat("ANADA:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + data.WorkLocState.LoadState(data.MouldCode); + + stopwatch.Stop(); + log.AppendFormat("LOADCH:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + if (data.OrderPlan == null) + { + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.ORDERPLAN_PID)) + { + //DAL.FIS.OrderPlanDAL orderplandal = new DAL.FIS.OrderPlanDAL(); + //data.OrderPlan = orderplandal.Get(new Entity.FIS.OrderPlan { PID = data.WorkLocState.CurrentState.ORDERPLAN_PID }); + DAL.ProductionPlan.WorkOrderDAL workorderdal = new DAL.ProductionPlan.WorkOrderDAL(); + data.OrderPlan = workorderdal.GetOneByID(data.WorkLocState.CurrentState.ORDERPLAN_PID); + } + } + if (data.OrderPlan != null) + { + data.WorkLocState.CurrentState.ORDERPLAN_PID = data.OrderPlan.PID; + } + result.MouldCode = data.MouldCode; + + //工序状态与采集点工序状态是否匹配 + if (!string.IsNullOrWhiteSpace(data.DAI.STATE_CODE) && !string.Equals(data.DAI.STATE_CODE, data.WorkLocState.CurrentState.STATE_CODE)) + { + if (string.Equals(data.DAI.CANPREINPUT, "1")) + { + return PreInput(data); + } + else + { + result.Message = string.Format("当前状态“{0}”,无法接收“{1}”输入!", data.WorkLocState.CurrentState.STATE_NAME, data.DAI.DA_NAME); + return result; + } + } + + if (!(string.Equals(data.DAI.DA_MODE, "3") || string.Equals(data.DAI.DA_MODE, "5")) && data.WorkLocState.DataCache.Count(p => p.DA_MODE == "3" || p.DA_MODE == "5") > 0)//如果当前采集项不是自适应项并且采集点列表中包含自适应项 + { + LoadAdaptiveDA(data); + } + + stopwatch.Stop(); + log.AppendFormat("CHECKDA:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + var vresult = ValidateData(data);//校验数据 + + stopwatch.Stop(); + log.AppendFormat("VALIDDA:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + if (!vresult.Passed)//验证未通过 + { + result.Message = vresult.Message; + return result; + } + if (string.Equals(data.DAI.DA_MODE, "3") || string.Equals(data.DAI.DA_MODE, "5")) //如果为自适应项 + { + SaveAdaptiveMaterial(data); + } + SetDACache(data);//设置数据采集缓存 + + stopwatch.Stop(); + log.AppendFormat("SETCH:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + CheckState(data, result);//检查状态变化 + + stopwatch.Stop(); + log.AppendFormat("STCHANGE:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + + + data.DataSession.OpenTs();//开启事务 + data.PersistEntitys(); + data.ExcuteSQL(); + data.DataSession.CommitTs();//提交事务 + + stopwatch.Stop(); + log.AppendFormat("EXECSQL:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + result.StateName = data.WorkLocState.CurrentState.STATE_NAME; + result.StateCode = data.WorkLocState.CurrentState.STATE_CODE; + //2017-10-1 闫永刚 + result.MATERIAL_CODE = data.MaterialCode; + result.MATERIAL_NAME = data.MaterialName; + result.WorkOrderID = data.WorkOrderID; + result.AnalyzedValue = data.AnalyzedValue; + result.Success = true; + + stopwatch.Stop(); + log.AppendFormat("END:{0}ms\t", stopwatch.ElapsedMilliseconds); + stopwatch.Start(); + + return result; + } + catch (Exception ex) + { + if (data != null) + { + data.DataSession.RollbackTs();//回滚事务 + } + result.Message = ex.Message; + return result; + } + finally + { + log.Append(result.Message); + LogManager.LogHelper.Debug(new LogInfo() + { + Info = log.ToString(), + }); + } + } + /// + /// 保存采集模式为自适应的上料信息 + /// + /// + private static void SaveAdaptiveMaterial(DAObject data) + { + DAL.Produce.ProductDAL pdal = new DAL.Produce.ProductDAL(); + var product = pdal.GetByPID(data.ObjectPID); + product.WORKLOC_CODE = data.WorkLocState.WORKLOC_CODE; + //查找之前使用的上料信息 + var usingmaterial = pdal.GetUsingMaterial(data.WorkLocState.WORKLOC_CODE).FirstOrDefault(p => p.MATERIAL_CODE == product.MATERIAL_CODE); + if (usingmaterial != null && !string.Equals(usingmaterial.PID, product.PID)) + { + usingmaterial.WORKLOC_CODE = ""; + data.AddToPersistentList(usingmaterial, usingmaterial.PID); + } + data.AddToPersistentList(product, product.PID); + } + + /// + /// 回滚/撤销 + /// + /// + public DAResult Rollback(DAArgs Args) + { + DAResult result = new DAResult(); + DAObject data = null; + try + { + //初始化无采集点对象的 + data = InitDAObjectForPass(Args); + data.WorkLocState.LoadState(Args.MouldCode); + result.MouldCode = data.MouldCode; + ////判断是否已生成产品数据 + //if (string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.PROCESS_CODE)) + //{ + // throw new Exception(string.Format("当前状态“{0}”,无法执行撤销操作!", data.WorkLocState.CurrentState.STATE_NAME)); + //} + //StateActions.RollbackWithOrder rollback = new StateActions.RollbackWithOrder(); //执行数据回滚动作 + //rollback.Execute(data); + //StateActions.ResetData resetdata = new StateActions.ResetData(); //执行数据复位 + //resetdata.Execute(data); + if (string.Equals(data.WorkLocState.CurrentState.ROLLBACK_ACTION, "N/A")) + { + throw new Exception(string.Format("当前状态“{0}”,无法执行撤销操作!", data.WorkLocState.CurrentState.STATE_NAME)); + } + if (data.WorkLocState.CurrentState.ROLLBACK_ACTION != null) + { + foreach (var action in data.WorkLocState.CurrentState.ROLLBACK_ACTION.Split(';'))//执行放行动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + } + result.StateChanged = true; + SetToFirstState(data); + foreach (var action in data.WorkLocState.CurrentState.ENTRY_ACTION.Split(';'))//执行进入状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + CheckState(data, result); + data.DataSession.OpenTs();//开启事务 + data.PersistEntitys(); + data.ExcuteSQL(); + data.DataSession.CommitTs();//提交事务 + result.StateName = data.WorkLocState.CurrentState.STATE_NAME; + result.StateCode = data.WorkLocState.CurrentState.STATE_CODE; + result.Success = true; + + return result; + } + catch (Exception ex) + { + if (data != null) + { + data.DataSession.RollbackTs();//回滚事务 + } + result.Message = ex.Message; + return result; + } + } + + /// + /// 重置 + /// + /// + public DAResult Reset(DAArgs Args) + { + DAResult result = new DAResult(); + DAObject data = null; + try + { + //初始化无采集点对象的 + data = InitDAObjectForPass(Args); + data.WorkLocState.LoadState(Args.MouldCode); + result.MouldCode = data.MouldCode; + //判断是否已生成产品数据 + //if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.PROCESS_CODE)) + //{ + // throw new Exception(string.Format("当前状态“{0}”,无法执行重置操作!", data.WorkLocState.CurrentState.STATE_NAME)); + //} + //StateActions.ResetData resetdata = new StateActions.ResetData(); //执行数据复位 + //resetdata.Execute(data); + + if (string.Equals(data.WorkLocState.CurrentState.RESET_ACTION, "N/A")) + { + throw new Exception(string.Format("当前状态“{0}”,无法执行复位操作!", data.WorkLocState.CurrentState.STATE_NAME)); + } + if (data.WorkLocState.CurrentState.RESET_ACTION != null) + { + foreach (var action in data.WorkLocState.CurrentState.RESET_ACTION.Split(';'))//执行放行动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + } + + + result.StateChanged = true; + SetToFirstState(data); + foreach (var action in data.WorkLocState.CurrentState.ENTRY_ACTION.Split(';'))//执行进入状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + data.DataSession.OpenTs();//开启事务 + data.PersistEntitys(); + data.ExcuteSQL(); + data.DataSession.CommitTs();//提交事务 + result.StateName = data.WorkLocState.CurrentState.STATE_NAME; + result.StateCode = data.WorkLocState.CurrentState.STATE_CODE; + result.Success = true; + + return result; + } + catch (Exception ex) + { + if (data != null) + { + data.DataSession.RollbackTs();//回滚事务 + } + result.Message = ex.Message; + return result; + } + } + + /// + /// 放行 + /// + /// + /// + public DAResult LetPass(DAArgs Args) + { + DAResult result = new DAResult(); + DAObject data = null; + try + { + //初始化无采集点对象的 + data = InitDAObjectForPass(Args); + data.WorkLocState.LoadState(Args.MouldCode); + + if (data.OrderPlan == null) + { + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.ORDERPLAN_PID)) + { + //DAL.FIS.OrderPlanDAL orderplandal = new DAL.FIS.OrderPlanDAL(); + //data.OrderPlan = orderplandal.Get(new Entity.FIS.OrderPlan { PID = data.WorkLocState.CurrentState.ORDERPLAN_PID }); + DAL.ProductionPlan.WorkOrderDAL workorderdal = new DAL.ProductionPlan.WorkOrderDAL(); + data.OrderPlan = workorderdal.GetOneByID(data.WorkLocState.CurrentState.ORDERPLAN_PID); + } + } + if (data.OrderPlan != null) + { + data.WorkLocState.CurrentState.ORDERPLAN_PID = data.OrderPlan.PID; + } + + result.MouldCode = data.MouldCode; + + if (string.Equals(data.WorkLocState.CurrentState.MANUALPASS_ACTION, "N/A")) + { + throw new Exception(string.Format("当前状态“{0}”,无法执行放行操作!", data.WorkLocState.CurrentState.STATE_NAME)); + } + if (data.WorkLocState.CurrentState.MANUALPASS_ACTION != null) + { + foreach (var action in data.WorkLocState.CurrentState.MANUALPASS_ACTION.Split(';'))//执行放行动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + } + + result.StateChanged = true; + foreach (var action in data.WorkLocState.CurrentState.EXIT_ACTION.Split(';'))//执行退出状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + SetToNextState(data); + foreach (var action in data.WorkLocState.CurrentState.ENTRY_ACTION.Split(';'))//执行进入状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + } + CheckState(data, result); + data.DataSession.OpenTs();//开启事务 + data.PersistEntitys(); + data.ExcuteSQL(); + data.DataSession.CommitTs();//提交事务 + result.StateName = data.WorkLocState.CurrentState.STATE_NAME; + result.StateCode = data.WorkLocState.CurrentState.STATE_CODE; + result.Success = true; + + return result; + } + catch (Exception ex) + { + if (data != null) + { + data.DataSession.RollbackTs();//回滚事务 + } + result.Message = ex.Message; + return result; + } + } + /// + /// 提前输入 + /// + /// + /// + public DAResult PreInput(DAObject data) + { + data.PreInput = true; + DAResult result = new DAResult(); + result.PreInput = true; + try + { + var percache= LoadPreInputCache(data); + + foreach (var pre in percache) + { + var cache = data.WorkLocState.DataCache.FirstOrDefault(p => p.DA_CODE == pre.DA_CODE); + if (cache != null) + { + cache.DA_CODE = pre.DA_CODE; + cache.DA_SEQ = pre.DA_SEQ; + cache.DA_STATE = pre.DA_STATE; + cache.DA_VALUE = pre.DA_VALUE; + cache.OBJ_PID = pre.OBJ_PID; + cache.DATA_TYPE = pre.DATA_TYPE; + cache.MATERIAL_CODE = pre.MATERIAL_CODE; + cache.DA_MODE = pre.DA_MODE; + cache.DA_NAME = pre.DA_NAME; + cache.PIVOTAL = pre.PIVOTAL; + cache.ISPROCESSCODE = pre.ISPROCESSCODE; + cache.MATERIAL_TYPE = pre.MATERIAL_TYPE; + cache.PID = pre.PID; + cache.STATE_CODE = pre.STATE_CODE; + cache.WORKCELL_CODE = pre.WORKCELL_CODE; + cache.WORKLOC_CODE = data.WorkLocState.WORKLOC_CODE; + cache.PREINPUT = pre.PREINPUT; + cache.IsNewInfo = pre.IsNewInfo; + } + else + { + data.WorkLocState.DataCache.Add(pre); + } + } + + AnalyzeData(data);//解析数据 + + //if (!string.Equals(data.DAI.DA_MODE, "3") && data.WorkLocState.DataCache.Count(p => p.DA_MODE == "3") > 0)//如果当前采集项不是自适应项并且采集点列表中包含自适应项 + //{ + // LoadAdaptiveDA(data, false); + //} + if (!(string.Equals(data.DAI.DA_MODE, "3") || string.Equals(data.DAI.DA_MODE, "5")) && data.WorkLocState.DataCache.Count(p => p.DA_MODE == "3" || p.DA_MODE == "5") > 0)//如果当前采集项不是自适应项并且采集点列表中包含自适应项 + { + LoadAdaptiveDA(data); + } + + var vresult = ValidateData(data);//校验数据 + if (!vresult.Passed)//验证未通过 + { + result.Message = vresult.Message; + return result; + } + //if (string.Equals(data.DAI.DA_MODE, "3")) //如果为自适应项 + //{ + // SaveAdaptiveMaterial(data); + //} + if (string.Equals(data.DAI.DA_MODE, "3") || string.Equals(data.DAI.DA_MODE, "5")) //如果为自适应项 + { + SaveAdaptiveMaterial(data); + } + SetDACache(data);//设置数据采集缓存 + //CheckState(data, result);//检查状态变化 + data.DataSession.OpenTs();//开启事务 + data.PersistEntitys(); + data.DataSession.CommitTs();//提交事务 + result.StateName = data.WorkLocState.CurrentState.STATE_NAME; + result.StateCode = data.WorkLocState.CurrentState.STATE_CODE; + //2017-10-1 闫永刚 + result.MATERIAL_CODE = data.MaterialCode; + result.MATERIAL_NAME = data.MaterialName; + result.MouldCode = data.MouldCode; + result.Success = true; + + + return result; + } + catch (Exception ex) + { + if (data != null) + { + data.DataSession.RollbackTs();//回滚事务 + } + result.Message = ex.Message; + return result; + } + } + /// + /// 加载提前扫描数据 + /// + /// + private List LoadPreInputCache(DAObject data) + { + DAICacheDAL dal = new DAICacheDAL(); + var cachelist = dal.GetList(data.WorkLocState.WORKCELL_CODE, data.WorkLocState.WORKLOC_CODE).Where(p => string.Equals(p.PREINPUT, "1")).ToList(); + DAIDAL daidal = new DAIDAL(); + var predailist = daidal.GetList(data.WorkLocState.WORKCELL_CODE).Where(p => string.Equals(p.CANPREINPUT, "1")).ToList(); + + DAL.Basic.MachineInfoDAL machinedal = new DAL.Basic.MachineInfoDAL(); + var machine= machinedal.GetMachineInfo(new MachineInfo { MACHINECODDE = data.MachineCode }); + if (machine.ISSTATION == 2) + { + cachelist = cachelist.Where(p => p.MOULD_CODE == data.MouldCode).ToList(); + } + + if (cachelist == null || cachelist.Count == 0) + { + cachelist = new List(); + foreach (var dai in predailist) + { + cachelist.Add(new DAICache + { + DA_CODE = dai.DA_CODE, + DA_SEQ = dai.DA_SEQ, + DA_STATE = dai.DA_STATUS, + DA_VALUE = "", + OBJ_PID = "", + DATA_TYPE = dai.DATA_TYPE, + MATERIAL_CODE = "", + DA_MODE = dai.DA_MODE, + DA_NAME = dai.DA_NAME, + PIVOTAL = dai.PIVOTAL, + ISPROCESSCODE = dai.ISPROCESSCODE, + MATERIAL_TYPE = dai.MATERIAL_TYPE, + PID = Guid.NewGuid().ToString(), + STATE_CODE = dai.STATE_CODE, + WORKCELL_CODE = dai.WORKCELL_CODE, + WORKLOC_CODE = data.WorkLocState.WORKLOC_CODE, + UPDATEDATE = DateTime.Now, + PREINPUT = "1", + MOULD_CODE = data.MouldCode + }); + } + dal.Insert(cachelist); + } + else if (cachelist.Count < predailist.Count) + { + foreach (var dai in predailist) + { + if (!cachelist.Exists(p => p.DA_CODE == dai.DA_CODE)) + { + cachelist.Add(new DAICache + { + DA_CODE = dai.DA_CODE, + DA_SEQ = dai.DA_SEQ, + DA_STATE = dai.DA_STATUS, + DA_VALUE = "", + OBJ_PID = "", + DATA_TYPE = dai.DATA_TYPE, + MATERIAL_CODE = "", + DA_MODE = dai.DA_MODE, + DA_NAME = dai.DA_NAME, + PIVOTAL = dai.PIVOTAL, + ISPROCESSCODE = dai.ISPROCESSCODE, + MATERIAL_TYPE = dai.MATERIAL_TYPE, + PID = Guid.NewGuid().ToString(), + STATE_CODE = dai.STATE_CODE, + WORKCELL_CODE = dai.WORKCELL_CODE, + WORKLOC_CODE = data.WorkLocState.WORKLOC_CODE, + UPDATEDATE = DateTime.Now, + PREINPUT = "1", + IsNewInfo = true, + MOULD_CODE = data.MouldCode + }); + } + } + dal.Insert(cachelist.Where(p => p.IsNewInfo).ToList()); + } + return cachelist; + } + + #region 采集点数据初始化 + /// + /// 初始化采集数据对象 + /// + /// + private DAObject InitDAObject(DAArgs Args) + { + var workcell = new WorkCellDAL().GetWorkCellByCode(Args.WorkCellCode); + if (workcell == null) + { + throw new Exception("无法根据输入信息找到工序!请检查工序设置。"); + } + var dai = new DAIDAL().GetDAIByCode(Args.WorkCellCode, Args.DACode); + if (dai == null) + { + throw new Exception("无法根据输入信息找到数据采集接口!请检查采集接口设置。"); + } + dai.WORKLOC_CODE = Args.WorkLocCode; + + var shift = new FJC.BLL.Basic.ProduceShiftBLL().GetWorkingShift(workcell.WORKCENTER_CODE); + + + int iscontrol = 0; + int.TryParse(Args.IsControl, out iscontrol); + //初始化采集数据对象 + DAObject data = new DAObject() + { + DAI = dai, + WorkLocState = new WorkLocState(workcell, Args.WorkLocCode), + DAValue = Args.DAValue, + UserID = base.LoginUser.UserID, + MaterialCode = Args.MaterialCode, + MachineCode = Args.MachineCode, + MachineName = Args.MachineName, + IsControl = iscontrol, + MouldCode = Args.MouldCode, + Date = DateTime.Now, + Shift = shift != null ? shift : new ProduceShift { PRODUCESHIFTTCODE="-" }, + AttachData=Args.AttachData, + MouldReLocate=false + }; + return data; + } + /// + /// 初始化采集数据对象(无采集点对象) + /// + /// + /// + private DAObject InitDAObjectForPass(DAArgs Args) + { + var workcell = new WorkCellDAL().GetWorkCellByCode(Args.WorkCellCode); + if (workcell == null) + { + throw new Exception("无法根据输入信息找到工序!请检查工序设置。"); + } + int iscontrol = 0; + int.TryParse(Args.IsControl, out iscontrol); + var shift = new FJC.BLL.Basic.ProduceShiftBLL().GetWorkingShift(workcell.WORKCENTER_CODE); + //初始化采集数据对象 + DAObject data = new DAObject() + { + DAI = null, + WorkLocState = new WorkLocState(workcell, Args.WorkLocCode), + DAValue = Args.DAValue, + UserID = base.LoginUser.UserID, + MaterialCode = Args.MaterialCode, + MachineCode = Args.MachineCode, + MachineName = Args.MachineName, + IsControl = iscontrol, + MouldCode = Args.MouldCode, + Date=DateTime.Now, + Shift = shift != null ? shift : new ProduceShift { PRODUCESHIFTTCODE = "-" }, + AttachData = Args.AttachData, + MouldReLocate = false + }; + return data; + } + /// + /// 加载自适应采集项 + /// + /// + private void LoadAdaptiveDA(DAObject data, bool Persistent = true) + { + //提取采集数据中的物料号信息 + var materials = (from da in data.WorkLocState.DataCache + where !string.IsNullOrWhiteSpace(da.MATERIAL_CODE) + && !string.Equals(da.DA_MODE, "2") //过滤掉可省略的采集点 + && !string.Equals(da.DA_MODE, "3") //过滤掉自适应采集点 + && !string.Equals(da.DA_MODE, "5") //过滤掉自适应采集点 + && !string.Equals(da.DA_CODE, data.DAI.DA_CODE) //过滤掉当前输入的采集点 + select da.MATERIAL_CODE).ToList(); + PbomDAL dal = new PbomDAL(); + materials.Add(data.MaterialCode + ""); + var bomlocates = dal.LocateBom(materials.Distinct().ToArray()); //匹配物料BOM + MD.Entity.View.BomLocation bomloc = null; + if (bomlocates.Count>0) + { + if (data.OrderPlan != null) + { + bomloc = bomlocates.FirstOrDefault(p => p.BOMCode == data.OrderPlan.PBOM_CODE); + } + else if(bomlocates.GroupBy(p=>p.UP_MATERIAL_CODE).ToList().Count==1) + { + bomloc = bomlocates[0]; + } + } + if (bomloc != null) //如果存在匹配的BOM + { + var bomitems = dal.GetBomItemsByLocate(bomloc); //查找组成物料列表 + var adaptmaterials = (from bomtiem in bomitems + select bomtiem.MATERIAL_CODE).ToArray(); + DAL.Produce.ProductDAL productdal = new DAL.Produce.ProductDAL(); + var adapts = productdal.GetUsingMaterial(data.WorkLocState.WORKLOC_CODE); + foreach (var da in data.WorkLocState.DataCache.Where(p => p.DA_MODE == "3" || p.DA_MODE == "5")) + { + var adaptmaterial = adapts.FirstOrDefault(p => adaptmaterials.Contains(p.MATERIAL_CODE) && (p.MATERIAL_TYPE == da.MATERIAL_TYPE || p.PARENT_MATERIAL_TYPE == da.MATERIAL_TYPE)); + if (adaptmaterial != null)//找到匹配的物料 + { + da.DA_VALUE = adaptmaterial.PRODUCTCODE; + da.MATERIAL_CODE = adaptmaterial.MATERIAL_CODE; + da.OBJ_PID = adaptmaterial.PID; + } + else + { + da.DA_VALUE = ""; + da.MATERIAL_CODE = ""; + da.OBJ_PID = ""; + } + if (Persistent) + { + data.AddToPersistentList(da, da.PID); + } + } + } + } + #endregion + + #region 采集处理方法 + /// + /// 解析数据 + /// + /// + private void AnalyzeData(DAObject data) + { + if (_AnalyzerList == null)//如果解析类列表未加载,则执行加载 + { + LoadAnalyzer(); + } + IDataAnalyzer analyzer = null; + if (!string.IsNullOrWhiteSpace(data.DAI.ANALYZE_CODE) && _AnalyzerList.ContainsKey(data.DAI.ANALYZE_CODE)) //检查采集数据的解析编码是否存在于解析类列表中 + { + analyzer = CreateInstance(_AnalyzerList[data.DAI.ANALYZE_CODE].ASSEMBLYNAME, _AnalyzerList[data.DAI.ANALYZE_CODE].CLASSNAME); + } + else // 不存在则执行默认解析方法 + { + analyzer = new DataAnalyzers.DefaultAnalyzer(); + } + analyzer.Analyze(data); + } + /// + /// 校验采集数据 + /// + /// + private ValidateResult ValidateData(DAObject data) + { + if (_ValidatorList == null)//如果解析类列表未加载,则执行加载 + { + LoadValidator(); + } + //获取采集点校验配置 + DAIValidationDAL dal = new DAIValidationDAL(); + var daivalidations = dal.GetList(data.DAI.PID); + foreach (var validator in _ValidatorList) //遍历校验类 + { + var daioption = daivalidations.FirstOrDefault(p => p.VALIDATION_CODE == validator.VALIDATOR_CODE); + if (string.Equals("1", validator.REQUIRED) || daioption != null) //如果校验类为必选项 或 采集点配置此校验 + { + if (daioption == null || !string.Equals(daioption.DISABLE, "1")) + { + IDataValidator datavalidator; + datavalidator = CreateInstance(validator.ASSEMBLYNAME, validator.CLASSNAME); + var result = datavalidator.Validate(data, daioption); + if (!result.Passed)//校验未通过 + { + return new ValidateResult(false, + string.Format("采集数据校验未通过,{0}:{1}", validator.VALIDATOR_NAME, result.Message)); + } + } + } + } + return new ValidateResult(true, ""); + } + /// + /// 检查工序状态 + /// + /// + private void CheckState(DAObject data,DAResult result) + { + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.PROCESS_CODE)) + { + result.ProcessCode = data.WorkLocState.CurrentState.PROCESS_CODE; + } + //查找当前状态下未赋值的采集点数量 + var novalue_count = data.WorkLocState.DataCache.Count(p => p.STATE_CODE == data.WorkLocState.CurrentState.STATE_CODE //采集点采集状态为当前工序状态 + && string.IsNullOrWhiteSpace(p.DA_VALUE) //采集点采集值不为空 + && !string.Equals(p.DA_MODE, "2") //过滤掉可省略的采集点 + && !string.Equals(p.DA_MODE, "5") //过滤掉可省略的采集点 + && (data.ReadSignal || !string.Equals(p.DA_CODE, "PLC_PARM"))); //如果当前设备设置为不读信号则过滤掉从当前设备采集的数据 + if (novalue_count == 0) //当前工序状态下得采集点采集完成 + { + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.MATERIAL_CODE)) + { + var emptyDa = (from dai in data.WorkLocState.DataCache + where dai.STATE_CODE == data.WorkLocState.CurrentState.STATE_CODE //采集点采集状态为当前工序状态 + && string.IsNullOrWhiteSpace(dai.DA_VALUE) //采集值为空 + && (string.Equals(dai.DA_MODE, "2") //采集模式不是可忽略的 + || string.Equals(dai.DA_MODE, "5")) //采集模式不是可忽略的 + orderby dai.DA_SEQ descending + select dai).ToList(); + if (emptyDa.Count > 0) + { + PbomDAL dal = new PbomDAL(); + MD.Entity.View.BomLocation bomloc=null; + var bomlocates = dal.LocateBomByUpMaterial(data.WorkLocState.CurrentState.MATERIAL_CODE); + if (bomlocates.Count > 0) + { + bomloc = bomlocates[0]; + } + if (bomloc != null) + { + var bomitems = dal.GetBomItemsByLocateWithType(bomloc); //查找组成物料列表 + foreach (var da in emptyDa) + { + if (bomitems.Exists(p => p.MATERIAL_TYPE_CODE == da.MATERIAL_TYPE || p.UP_MATERIAL_TYPE_CODE == da.MATERIAL_TYPE)) + { + return; + } + } + } + } + } + + result.StateChanged = true; + foreach (var action in data.WorkLocState.CurrentState.EXIT_ACTION.Split(';'))//执行退出状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.PROCESS_CODE)) + { + result.ProcessCode = data.WorkLocState.CurrentState.PROCESS_CODE; + } + } + SetToNextState(data); + foreach (var action in data.WorkLocState.CurrentState.ENTRY_ACTION.Split(';'))//执行进入状态动作 + { + ExecuteAction(action, data); + if (!string.IsNullOrWhiteSpace(action)) + result.Actions.Add(action); + if (!string.IsNullOrWhiteSpace(data.WorkLocState.CurrentState.PROCESS_CODE)) + { + result.ProcessCode = data.WorkLocState.CurrentState.PROCESS_CODE; + } + } + + CheckState(data, result);//递归调用 + } + } + + /// + /// 设置工序到下一个状态 + /// + /// + private void SetToNextState(DAObject data) + { + WorkCellRunStateDAL dal = new WorkCellRunStateDAL(); + var state = dal.GetNextState(data.WorkLocState.WORKCELL_CODE, data.WorkLocState.CurrentState.STATE_SEQ); + if (state == null) //如果状态为空则获取第一个状态 + { + state = dal.GetNextState(data.WorkLocState.WORKCELL_CODE, 0); + } + //更新工序状态 + data.WorkLocState.CurrentState.UPDATEDATE = DateTime.Now; + data.WorkLocState.CurrentState.ENTRY_ACTION = state.ENTRY_ACTION; + data.WorkLocState.CurrentState.EXIT_ACTION = state.EXIT_ACTION; + data.WorkLocState.CurrentState.STATE_SEQ = state.STATE_SEQ; + data.WorkLocState.CurrentState.STATE_CODE = state.STATE_CODE; + data.WorkLocState.CurrentState.STATE_NAME = state.STATE_NAME; + + data.AddToPersistentList(data.WorkLocState.CurrentState,data.WorkLocState.CurrentState.PID); + //dal.Update(data.WorkLocState.CurrentState, data.DataSession); + } + + /// + /// 设置工序到第一个状态 + /// + /// + private void SetToFirstState(DAObject data) + { + WorkCellRunStateDAL dal = new WorkCellRunStateDAL(); + var state = dal.GetNextState(data.WorkLocState.WORKCELL_CODE, 0); + //更新工序状态 + data.WorkLocState.CurrentState.UPDATEDATE = DateTime.Now; + data.WorkLocState.CurrentState.ENTRY_ACTION = state.ENTRY_ACTION; + data.WorkLocState.CurrentState.EXIT_ACTION = state.EXIT_ACTION; + data.WorkLocState.CurrentState.STATE_SEQ = state.STATE_SEQ; + data.WorkLocState.CurrentState.STATE_CODE = state.STATE_CODE; + data.WorkLocState.CurrentState.STATE_NAME = state.STATE_NAME; + + data.AddToPersistentList(data.WorkLocState.CurrentState, data.WorkLocState.CurrentState.PID); + //dal.Update(data.WorkLocState.CurrentState, data.DataSession); + } + /// + /// 执行状态动作 + /// + /// + private void ExecuteAction(string action,DAObject data) + { + + if (_StateActionList == null) + { + LoadStateAction(); + } + if (string.IsNullOrWhiteSpace(action)) + { + return; + } + if (_StateActionList.ContainsKey(action)) + { + var act = CreateInstance(_StateActionList[action].ASSEMBLYNAME, _StateActionList[action].CLASSNAME); + act.Execute(data); + } + + } + /// + /// 设置数据采集缓存 + /// + /// + private void SetDACache(DAObject data) + { + //DAICacheDAL dal = new DAICacheDAL(); + var daicache = data.WorkLocState.DataCache.FirstOrDefault(p => p.DA_CODE == data.DAI.DA_CODE); + daicache.DA_VALUE = data.AnalyzedValue; + daicache.OBJ_PID = data.ObjectPID; + daicache.MATERIAL_CODE = data.MaterialCode; + daicache.DA_MODE = data.DAI.DA_MODE; + daicache.DA_SEQ = data.DAI.DA_SEQ; + daicache.DA_STATE = data.DAI.DA_STATUS; + daicache.DATA_TYPE = data.DAI.DATA_TYPE; + daicache.ISPROCESSCODE = data.DAI.ISPROCESSCODE; + daicache.MATERIAL_TYPE = data.DAI.MATERIAL_TYPE; + daicache.PIVOTAL = data.DAI.PIVOTAL; + daicache.STATE_CODE = data.DAI.STATE_CODE; + daicache.SAVED = daicache.SAVED.Replace(data.MouldCode, ""); + daicache.MOULD_CODE = data.MouldCode; + data.AddToPersistentList(daicache, daicache.PID); + //dal.Update(daicache, data.DataSession); + } + #endregion + + #region 静态方法 + /// + /// 加载解析类 + /// + private static void LoadAnalyzer() + { + //lock (_AnalyzerList) + //{ + AnalyzerDAL dal = new AnalyzerDAL(); + var list = dal.GetList(); + if (_AnalyzerList == null) + { + _AnalyzerList = new Dictionary(); + } + else + { + if (_AnalyzerList.Count == list.Count) + { + return; + } + } + _AnalyzerList.Clear(); + foreach (var analyzer in list) + { + _AnalyzerList.Add(analyzer.ANALYZER_CODE, analyzer); + } + //} + } + /// + /// 加载状态动作 + /// + private static void LoadStateAction() + { + //lock (_StateActionList) + //{ + StateActionDAL dal = new StateActionDAL(); + var list = dal.GetServerActionList(); + if (_StateActionList == null) + { + _StateActionList = new Dictionary(); + } + else + { + if (_StateActionList.Count == list.Count) + { + return; + } + } + _StateActionList.Clear(); + foreach (var action in list) + { + _StateActionList.Add(action.ACTION_CODE, action); + } + //} + } + /// + /// 加载校验类 + /// + private static void LoadValidator() + { + //lock (_ValidatorList) + //{ + ValidatorDAL dal = new ValidatorDAL(); + var list = dal.GetList(); + if (_ValidatorList == null) + { + _ValidatorList = new List(); + } + else + { + if (_ValidatorList.Count == list.Count) + { + return; + } + } + _ValidatorList.Clear(); + foreach (var validator in list) + { + _ValidatorList.Add(validator); + } + //} + } + /// + /// 根据配置信息创建所对应的接口 + /// + /// 要创建的接口 + /// 程序集 + /// 实现类全路径 + /// 创建的接口 + public static T CreateInstance(String AssemblyName, String ClassPath) + { + Assembly _asse; + Type _type; + Object _obj; + T _mc; + _asse = Assembly.Load(AssemblyName); + _type = _asse.GetType(ClassPath); + _obj = System.Activator.CreateInstance(_type); + _mc = (T)_obj; + return _mc; + } + #endregion + } +} diff --git a/.svn/pristine/78/78c1a61a4cca8013532e24f87cbca0a2943e7bbe.svn-base b/.svn/pristine/78/78c1a61a4cca8013532e24f87cbca0a2943e7bbe.svn-base new file mode 100644 index 0000000..69f76f2 --- /dev/null +++ b/.svn/pristine/78/78c1a61a4cca8013532e24f87cbca0a2943e7bbe.svn-base @@ -0,0 +1,1836 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using QMFrameWork.Data; +using QMAPP.Entity; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.DAL; +using QMFrameWork.Log; +using QMAPP.FJC.Entity.Stocktaking; + +namespace QMAPP.FJC.DAL.Operation +{ + /// + /// 模块编号:M13-1 + /// 作 用:零件条码表 + /// 作 者:王庆男 + /// 编写日期:2015年05月29日 + /// + public class ProductDAL : BaseDAL + { + + /// + /// 数据会话 + /// + //public IDataSession BaseSession = null; + + #region 获取信息 + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Product Get(Product model) + { + try + { + if (this.BaseSession != null) + { + model = BaseSession.Get(model); + } + else + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_AW_PRODUCT WHERE 1=1 "; + if (string.IsNullOrEmpty(model.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", model.PID)); + } + if (string.IsNullOrEmpty(model.PRODUCTCODE) == false) + { + sql += " AND PRODUCTCODE = @PRODUCTCODE"; + parameters.Add(new DataParameter("PRODUCTCODE", model.PRODUCTCODE)); + } + + if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false) + { + sql += " AND MATERIAL_CODE = @MATERIAL_CODE"; + parameters.Add(new DataParameter("MATERIAL_CODE", model.MATERIAL_CODE)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + string sqlChange = this.ChangeSqlByDB(sql, session); + //获取信息 + model = session.Get(sqlChange, parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + RecordExceptionLog(ex, "物料号信息数据层-获取信息"); + throw ex; + } + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取T_AW_PACKAGE信息 + /// + /// + /// + public Entity.Operation.Package GetPackage(Entity.Operation.Package model) + { + try + { + if (this.BaseSession != null) + { + model = BaseSession.Get(model); + } + else + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_AW_PACKAGE WHERE '1'='1'"; + if (string.IsNullOrEmpty(model.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", model.PID)); + } + if (string.IsNullOrEmpty(model.PACKAGECODE) == false) + { + sql += " AND PACKAGECODE = @PACKAGECODE"; + parameters.Add(new DataParameter("PACKAGECODE", model.PACKAGECODE)); + } + sql += " ORDER BY CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + string sqlChange = this.ChangeSqlByDB(sql, session); + //获取信息 + model = session.Get(sqlChange, parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + RecordExceptionLog(ex, "信息数据层-获取信息"); + throw ex; + } + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + + #region 获取列表 + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(Product condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + page.SortExpression = "CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetListAndAttribute(Product condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetAttributeQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "A.PID"; + page.SortExpression = "CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取替换列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetProductReplaceList(ProductReplace condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySqlProductReplace(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + page.SortExpression = "CREATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #region 替换件获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExpProductReplaceList(ProductReplace model) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySqlProductReplace(model, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "ProductReplaceExp"; + } + return dt; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "导出获取数据错误!" + }); + throw ex; + } + } + #endregion + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListAndAttribute(Product condition) + { + string sql = null; + List list = new List(); + List parameters = new List(); + try + { + sql = this.GetAttributeQuerySql(condition, ref parameters); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + list = session.GetList(sql, parameters.ToArray()).ToList(); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + public List GetList(Product condition) + { + List list = new List(); + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + list = session.GetList(sql, parameters.ToArray()).ToList(); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + + #region 获取查询语句 + + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(Product condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT A.PID,A.CREATEDATE,"); + sqlBuilder.Append("A.PRODUCTTYPE,A.PRODUCTCODE,A.PRODUCTSOURCE,"); + sqlBuilder.Append("A.MACHINENAME,A.MACHINECODDE,A.STATUS,"); + sqlBuilder.Append("A.CURRENTPROCESS,A.PRODUCELINE,A.PRODUCESHIFTNAME,"); + sqlBuilder.Append("A.PRODUCESHIFTTCODE,A.OUTFLAG,A.USINGSTATE, "); + sqlBuilder.Append("A.CAPACITY,A.USINGCOUNT,A.CREATEUSER, "); + sqlBuilder.Append("A.UPDATEUSER,A.UPDATEDATE, "); + sqlBuilder.Append("A.MATERIAL_TYPE, "); + sqlBuilder.Append("A.MATERIAL_CODE, "); + sqlBuilder.Append("A.ENDOFLINE, "); + sqlBuilder.Append("A.WORKCELL_CODE, "); + sqlBuilder.Append("A.WORKLOC_CODE, "); + sqlBuilder.Append("A.WORKCENTER_CODE,"); + sqlBuilder.Append("A.PLAN_NO, "); + sqlBuilder.Append("A.PLAN_ID, "); + sqlBuilder.Append("M.MATERIAL_NAME, "); + sqlBuilder.Append("M.PROJECTCODE, "); + sqlBuilder.Append("C.USERNAME AS CREATEUSERNAME,B.PRODUCTNAME as PRODUCTTYPENAME, "); + sqlBuilder.Append("E.MFGCODE AS ERP_WORKLINE "); + sqlBuilder.Append("FROM T_AW_PRODUCT A "); + sqlBuilder.Append("LEFT JOIN T_QM_USER C ON C.USERID=A.CREATEUSER "); + sqlBuilder.Append("LEFT JOIN T_BD_PRODUCTBASIC B ON A.PRODUCTTYPE=B.PRODUCTTYPE "); + sqlBuilder.Append("LEFT JOIN T_MD_MATERIAL M ON M.MATERIAL_CODE=A.MATERIAL_CODE "); + sqlBuilder.Append("LEFT JOIN T_AW_MENDRECORDERERP E ON E.TYPE_CODE=A.WORKCENTER_CODE AND MFGCODETYPE='WORKLINE' "); + + + if (string.IsNullOrEmpty(condition.CREATESTARTDATE) == false) + { + whereBuilder.Append(" AND A.CREATEDATE >@CREATESTARTDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATESTARTDATE", + DataType = DbType.String, + Value = condition.CREATESTARTDATE + }); + + } + + if (string.IsNullOrEmpty(condition.CREATEENDDATE) == false) + { + whereBuilder.Append(" AND A.CREATEDATE < @CREATEENDDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEENDDATE", + DataType = DbType.String, + Value = condition.CREATEENDDATE + }); + + } + + if (string.IsNullOrEmpty(condition.MACHINECODDE) == false) + { + whereBuilder.Append(" AND A.MACHINECODDE = " + "@MACHINECODDE"); + parameters.Add(new DataParameter + { + ParameterName = "MACHINECODDE", + DataType = DbType.String, + Value = condition.MACHINECODDE + }); + } + + if (string.IsNullOrEmpty(condition.MATERIAL_TYPE) == false) + { + whereBuilder.Append(" AND A.MATERIAL_TYPE = " + "@MATERIAL_TYPE"); + parameters.Add(new DataParameter + { + ParameterName = "MATERIAL_TYPE", + DataType = DbType.String, + Value = condition.MATERIAL_TYPE + }); + } + if (string.IsNullOrEmpty(condition.MATERIAL_CODE) == false) + { + whereBuilder.Append(" AND A.MATERIAL_CODE = " + "@MATERIAL_CODE"); + parameters.Add(new DataParameter + { + ParameterName = "MATERIAL_CODE", + DataType = DbType.String, + Value = condition.MATERIAL_CODE + }); + } + //if (string.IsNullOrEmpty(condition.PRODUCTCODELIKE) == false) + //{ + // whereBuilder.Append(" AND A.PRODUCTCODE LIKE '%'+" + "@PRODUCTCODE" + "+'%'"); + // parameters.Add(new DataParameter { ParameterName = "PRODUCTCODE", DataType = DbType.String, Value = condition.PRODUCTCODELIKE }); + //} + if (string.IsNullOrEmpty(condition.PRODUCTCODELIKE) == false) + { + whereBuilder.Append(" AND (A.PRODUCTCODE LIKE '%'+" + "@PRODUCTCODE" + + "+'%' OR M.MAINCODE LIKE '%'+" + "@PRODUCTCODE" + "+'%')"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = condition.PRODUCTCODELIKE + }); + } + + if (string.IsNullOrEmpty(condition.PID) == false) + { + whereBuilder.Append(" AND A.PID = @PID"); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = condition.PID + }); + } + + if (string.IsNullOrEmpty(condition.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND A.PRODUCTCODE = @PRODUCTCODE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = condition.PRODUCTCODE + }); + } + + if (condition.CREATEDATE != null && condition.CREATEDATE != DateTime.MinValue) + { + whereBuilder.Append(" AND (CONVERT(varchar(100), A.CREATEDATE, 23)) = " + "@CREATEDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEDATE", + DataType = DbType.String, + Value = condition.CREATEDATE.ToString("yyyy-MM-dd") + }); + } + + if (string.IsNullOrEmpty(condition.PRODUCTTYPE) == false) + { + whereBuilder.Append(" AND A.PRODUCTTYPE = " + "@PRODUCTTYPE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTTYPE", + DataType = DbType.String, + Value = condition.PRODUCTTYPE + }); + } + + if (string.IsNullOrEmpty(condition.PRODUCTTYPES) == false) + { + whereBuilder.Append(" AND A.PRODUCTTYPE IN ('" + condition.PRODUCTTYPES.Replace(",", "','") + "')"); + //parameters.Add(new DataParameter { ParameterName = "PRODUCTTYPE", DataType = DbType.String, Value = condition.PRODUCTTYPE }); + } + + if (string.IsNullOrEmpty(condition.PRODUCELINE) == false) + { + whereBuilder.Append(" AND A.PRODUCELINE = " + "@PRODUCELINE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCELINE", + DataType = DbType.String, + Value = condition.PRODUCELINE + }); + } + if (string.IsNullOrEmpty(condition.PRODUCTSOURCE) == false) + { + whereBuilder.Append(" AND A.PRODUCTSOURCE = " + "@PRODUCTSOURCE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTSOURCE", + DataType = DbType.String, + Value = condition.PRODUCTSOURCE + }); + } + + + + if (string.IsNullOrEmpty(condition.USINGSTATE) == false) + { + if (condition.USINGSTATE.Equals("3")) + { + whereBuilder.Append(" AND A.USINGSTATE != '2'"); + } + else + { + whereBuilder.Append(" AND A.USINGSTATE = " + "@USINGSTATE"); + parameters.Add(new DataParameter + { + ParameterName = "USINGSTATE", + DataType = DbType.String, + Value = condition.USINGSTATE + }); + } + } + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + + sqlBuilder.Append(" order by A.CREATEDATE desc "); + + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取替换查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySqlProductReplace(ProductReplace condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT * "); + sqlBuilder.Append(",(select USERNAME from T_QM_USER where USERID=CREATEUSER) as CREATEUSERNAME"); + sqlBuilder.Append(" FROM T_AW_PRODUCT_REPLACE"); + + if (string.IsNullOrEmpty(condition.CREATEDATESTART) == false) + { + whereBuilder.Append(" AND CREATEDATE >@CREATEDATESTART"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEDATESTART", + DataType = DbType.String, + Value = condition.CREATEDATESTART + }); + + } + + if (string.IsNullOrEmpty(condition.CREATEDATEEND) == false) + { + whereBuilder.Append(" AND CREATEDATE < @CREATEDATEEND"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEDATEEND", + DataType = DbType.String, + Value = condition.CREATEDATEEND + }); + + } + + + + //if (string.IsNullOrEmpty(condition.PID) == false) + //{ + // whereBuilder.Append(" AND A.PID = @PID"); + // parameters.Add(new DataParameter + // { + // ParameterName = "PID", + // DataType = DbType.String, + // Value = condition.PID + // }); + //} + + if (string.IsNullOrEmpty(condition.MAIN_PRODUCTCODE) == false) + { + whereBuilder.Append(" AND (MAIN_PRODUCTCODE like @MAIN_PRODUCTCODE or CHILD_PRODUCTCODE like @MAIN_PRODUCTCODE or REPLACE_PRODUCTCODE like @MAIN_PRODUCTCODE)"); + parameters.Add(new DataParameter + { + ParameterName = "MAIN_PRODUCTCODE", + DataType = DbType.String, + Value = "%"+ condition.MAIN_PRODUCTCODE + "%" + }); + } + + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + + //sqlBuilder.Append(" order by CREATEDATE desc "); + + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + + private string GetQuerySqlByAssemble(string code) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT A.PID,A.CREATEDATE,"); + sqlBuilder.Append("A.PRODUCTTYPE,A.PRODUCTCODE,A.PRODUCTSOURCE, "); + sqlBuilder.Append("A.MACHINENAME,A.MACHINECODDE,A.STATUS, "); + sqlBuilder.Append("A.CURRENTPROCESS,A.PRODUCELINE,A.PRODUCESHIFTNAME, "); + sqlBuilder.Append("A.PRODUCESHIFTTCODE,A.OUTFLAG,A.USINGSTATE, "); + sqlBuilder.Append("A.CAPACITY,A.USINGCOUNT,A.CREATEUSER, "); + sqlBuilder.Append("A.UPDATEUSER,A.UPDATEDATE, "); + sqlBuilder.Append("A.MATERIAL_TYPE, "); + sqlBuilder.Append("A.MATERIAL_CODE, "); + sqlBuilder.Append("A.PLAN_NO, "); + sqlBuilder.Append("A.PLAN_ID, "); + sqlBuilder.Append("A.WORKCELL_CODE, "); + sqlBuilder.Append("A.WORKLOC_CODE, "); + sqlBuilder.Append("A.WORKCENTER_CODE, "); + sqlBuilder.Append("A.ENDOFLINE, "); + sqlBuilder.Append("M.MAINCODE, "); + sqlBuilder.Append("C.USERNAME AS CREATEUSERNAME,"); + sqlBuilder.Append("'' as PRODUCTTYPENAME "); + sqlBuilder.Append("FROM T_AW_PRODUCT A "); + sqlBuilder.Append("LEFT JOIN T_QM_USER C ON C.USERID=A.CREATEUSER "); + sqlBuilder.Append( + "LEFT JOIN T_AW_MAIN M ON M.EPIDERMISCODE=A.PRODUCTCODE AND A.MATERIAL_CODE=M.MATERIAL_CODE "); + whereBuilder.AppendFormat("AND A.WORKCENTER_CODE IS NOT NULL "); + if (code.StartsWith("052 ")) + { + whereBuilder.AppendFormat("AND M.MAINCODE='{0}'", code); + } + //else if(System.Text.RegularExpressions.Regex.IsMatch(code,"^D\\d{2}\\w+[RF][LR]\\d{2}(10|11|12|0[1-9])(30|31|2\\d|1\\d|0[1-9])\\w\\d{5}$")) + //{ + // whereBuilder.AppendFormat("AND A.PLAN_NO = '{0}'", code); + //} + else if (code.StartsWith("D01") || code.StartsWith("DP2")) + { + whereBuilder.AppendFormat("AND A.PLAN_NO = '{0}'", code); + } + else + { + whereBuilder.AppendFormat("AND A.PRODUCTCODE = '{0}'", code); + } + + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + sqlBuilder.Append(" ORDER BY CREATEDATE DESC"); + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + + private string GetQuerySqlNew(Product condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + //sqlBuilder.Append("SELECT T.MID, M.MAINCODE, "); + //sqlBuilder.Append("P.PRODUCTTYPE, P.PRODUCTCODE, P.PRODUCTSOURCE, "); + //sqlBuilder.Append("P.CURRENTPROCESS, P.PRODUCELINE, P.STATUS, "); + //sqlBuilder.Append("P.MATERIAL_CODE, P.MATERIAL_TYPE, "); + //sqlBuilder.Append("P.PRODUCESHIFTTCODE, P.USINGSTATE, P.PID "); + //sqlBuilder.Append("FROM dbo.T_AW_MAINPRODUCT T "); + //sqlBuilder.Append("LEFT OUTER JOIN dbo.T_AW_MAIN M ON T.MID = M.PID "); + //sqlBuilder.Append("LEFT OUTER JOIN dbo.T_AW_PRODUCT P ON T.PDID = P.PID "); + sqlBuilder.Append( + "SELECT M.PID AS MID, M.MAINCODE, P.PRODUCTTYPE, P.PRODUCTCODE, P.PRODUCTSOURCE, P.CURRENTPROCESS, P.PRODUCELINE, P.STATUS, P.MATERIAL_CODE, P.MATERIAL_TYPE, P.PRODUCESHIFTTCODE,P.USINGSTATE, P.PID, MD.PROJECTCODE,E.MFGCODE AS ERP_WORKLINE "); + sqlBuilder.Append( + "FROM T_AW_MAIN M LEFT JOIN T_AW_PRODUCT P ON P.PRODUCTCODE=M.EPIDERMISCODE AND P.MATERIAL_CODE=M.MATERIAL_CODE "); + sqlBuilder.Append("LEFT JOIN T_MD_MATERIAL MD ON MD.MATERIAL_CODE=P.MATERIAL_CODE "); + sqlBuilder.Append("LEFT JOIN T_AW_MENDRECORDERERP E ON E.TYPE_CODE=P.WORKCENTER_CODE AND MFGCODETYPE='WORKLINE' "); + + //查询条件 + //if (string.IsNullOrEmpty(condition.UserName) == false) + //{ + //whereBuilder.Append(" AND USERNAME LIKE '%'+" + "@USERNAME" + "+'%'"); + //parameters.Add(new DataParameter { ParameterName = "USERNAME", DataType = DbType.String, Value = condition.UserName}); + //} + + + + if (string.IsNullOrEmpty(condition.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND M.MAINCODE=@PRODUCTCODE "); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = condition.PRODUCTCODE + }); + } + + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + + sqlBuilder.Append(" order by M.CREATEDATE desc "); + + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetAttributeQuerySql(Product condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append( + "SELECT A.PID,PRODUCTTYPE,PRODUCTCODE,C.MATERIAL_NAME,A.MATERIAL_CODE,A.PLAN_NO,A.PLAN_ID,PRODUCTSOURCE,MACHINENAME,MACHINECODDE,STATUS,CURRENTPROCESS,PRODUCELINE,PRODUCESHIFTNAME,PRODUCESHIFTTCODE,OUTFLAG,USINGSTATE,A.CAPACITY,USINGCOUNT,A.CREATEUSER,A.CREATEDATE,A.UPDATEUSER,A.UPDATEDATE,O.USERNAME as CREATEUSERNAME "); + sqlBuilder.Append( + ",B.PID as PAPID,VAL1,VAL2,VAL3,VAL4,VAL5,VAL6,VAL7,VAL8,VAL9,VAL10,VAL11,VAL12,VAL13,VAL14,VAL15 "); + sqlBuilder.Append( + "FROM T_AW_PRODUCT A LEFT JOIN T_AW_PRODUCTATTRIBUTE B ON A.PID = B.MPPID LEFT JOIN T_QM_USER O ON O.USERID=A.CREATEUSER"); + //20171010 zxd 添加 + sqlBuilder.Append(" LEFT JOIN T_MD_MATERIAL C ON C.MATERIAL_CODE=A.MATERIAL_CODE"); + //查询条件 + + if (string.IsNullOrEmpty(condition.PID) == false) + { + whereBuilder.Append(" AND A.PID = " + "@PID"); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = condition.PID + }); + } + + if (string.IsNullOrEmpty(condition.CREATESTARTDATE) == false) + { + whereBuilder.Append(" AND A.CREATEDATE >@CREATESTARTDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATESTARTDATE", + DataType = DbType.String, + Value = condition.CREATESTARTDATE + }); + + } + + if (string.IsNullOrEmpty(condition.CREATEENDDATE) == false) + { + whereBuilder.Append(" AND A.CREATEDATE < @CREATEENDDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEENDDATE", + DataType = DbType.String, + Value = condition.CREATEENDDATE + }); + + } + + if (string.IsNullOrEmpty(condition.PRODUCTTYPE) == false) + { + whereBuilder.Append(" AND PRODUCTTYPE = @PRODUCTTYPE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTTYPE", + DataType = DbType.String, + Value = condition.PRODUCTTYPE + }); + } + + if (string.IsNullOrEmpty(condition.MACHINECODDE) == false) + { + whereBuilder.Append(" AND MACHINECODDE = " + "@MACHINECODDE"); + parameters.Add(new DataParameter + { + ParameterName = "MACHINECODDE", + DataType = DbType.String, + Value = condition.MACHINECODDE + }); + } + + if (string.IsNullOrEmpty(condition.PRODUCTCODELIKE) == false) + { + whereBuilder.Append(" AND A.PRODUCTCODE LIKE '%'+" + "@PRODUCTCODE" + "+'%'"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = condition.PRODUCTCODELIKE + }); + } + + if (string.IsNullOrEmpty(condition.CURRENTPROCESS) == false) + { + whereBuilder.Append(" AND A.CURRENTPROCESS = @CURRENTPROCESS"); + parameters.Add(new DataParameter + { + ParameterName = "CURRENTPROCESS", + DataType = DbType.String, + Value = condition.CURRENTPROCESS + }); + } + + if (string.IsNullOrEmpty(condition.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND A.PRODUCTCODE = @PRODUCTCODE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = condition.PRODUCTCODE + }); + } + if (string.IsNullOrEmpty(condition.VAL4) == false) + { + whereBuilder.Append(" AND VAL4 = " + "@VAL4"); + parameters.Add(new DataParameter { ParameterName = "VAL4", DataType = DbType.String, Value = condition.VAL4 }); + } + if (string.IsNullOrEmpty(condition.PRODUCELINE) == false) + { + whereBuilder.Append(" AND PRODUCELINE = " + "@PRODUCELINE"); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCELINE", + DataType = DbType.String, + Value = condition.PRODUCELINE + }); + } + + if (condition.CREATEDATE != null && condition.CREATEDATE != DateTime.MinValue) + { + whereBuilder.Append(" AND (CONVERT(varchar(100), A.CREATEDATE, 23)) = " + "@CREATEDATE"); + parameters.Add(new DataParameter + { + ParameterName = "CREATEDATE", + DataType = DbType.String, + Value = condition.CREATEDATE.ToString("yyyy-MM-dd") + }); + } + + + + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取导出的数据 + + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(Product model) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql(model, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "T_AW_PRODUCT"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 信息是否重复 + + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool ExistsProduct(Product model) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(1) FROM T_AW_PRODUCT"); + if (string.IsNullOrEmpty(model.PID) == false) + { + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = model.PID + }); + } + if (string.IsNullOrEmpty(model.PRODUCTCODE) == false) + { + whereBuilder.Append(" AND PRODUCTCODE =@PRODUCTCODE "); + parameters.Add(new DataParameter + { + ParameterName = "PRODUCTCODE", + DataType = DbType.String, + Value = model.PRODUCTCODE + }); + } + //if (string.IsNullOrEmpty(model.) == false) + //{ + //whereBuilder.Append(" AND AREACODE=@AREACODE"); + //parameters.Add(new DataParameter { ParameterName = "AREACODE", DataType = DbType.String, Value = ""model.AREACODE + "" }); + //} + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + if (count > 0) + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool IsUsedProduct(Product model) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(1) FROM T_AW_PRODUCT"); + if (string.IsNullOrEmpty(model.PID) == false) + { + whereBuilder.Append(" AND PID = @PID "); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = model.PID + }); + } + if (string.IsNullOrEmpty(model.USINGSTATE) == false) + { + whereBuilder.Append(" AND USINGSTATE = @USINGSTATE "); + parameters.Add(new DataParameter + { + ParameterName = "USINGSTATE", + DataType = DbType.String, + Value = model.USINGSTATE + }); + } + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + if (count > 0) + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 插入信息 + + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(Product model) + { + int count = 0; + try + { + if (this.BaseSession != null) + { + count = this.BaseSession.Insert(model); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(model); + } + } + + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 插入信息(俩表包括Attribute) + /// + /// 信息 + /// 插入行数 + public int InsertMainAndAttribute(Product model) + { + int count = 0; + try + { + if (BaseSession != null) + { + count = BaseSession.Insert(model); + if (count > 0 && model.PRODUCTATTRIBUTE != null && !string.IsNullOrEmpty(model.PID)) + { + count = BaseSession.Insert(model.PRODUCTATTRIBUTE); + } + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + session.OpenTs(); + //插入基本信息 + count = session.Insert(model); + if (count > 0 && model.PRODUCTATTRIBUTE != null && !string.IsNullOrEmpty(model.PID)) + { + count = session.Insert(model.PRODUCTATTRIBUTE); + } + session.CommitTs(); + } + catch (Exception) + { + session.RollbackTs(); + throw; + } + + } + } + + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 插入T_AW_PACKAGE信息(单表) + /// + /// 信息 + /// 插入行数 + public int InsertPackage(Entity.Operation.Package model) + { + int count = 0; + try + { + if (this.BaseSession != null) + { + count = this.BaseSession.Insert(model); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(model); + } + } + + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(Product model) + { + int count = 0; + try + { + if (this.BaseSession != null) + { + count = this.BaseSession.Update(model); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(model); + } + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(List models) + { + int count = 0; + try + { + if (BaseSession != null) + { + //更新基本信息 + count = BaseSession.Update(models); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(models); + } + } + + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(Product model, MendRecorder recorder) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + session.OpenTs(); + count = session.Update(model); + count = session.Insert(recorder); + session.CommitTs(); + } + catch (Exception) + { + session.RollbackTs(); + throw; + } + + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 逻辑删除 + + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(Product model) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + if (this.BaseSession != null) + { + //删除基本信息 + sqlBuilder.Append("DELETE T_AW_PRODUCT "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = model.PID + }); + count = BaseSession.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("DELETE T_AW_PRODUCT "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter + { + ParameterName = "PID", + DataType = DbType.String, + Value = model.PID + }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + } + + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 导入 + + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (Product info in list) + { + if (info.IsNewInfo == true) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + + #endregion + + #region 获取信息 + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public Product GetProductInfo(Product model) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(model, ref parameters); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + model = session.Get(sql, parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + public Product GetProductInfoNew(Product model) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySqlNew(model, ref parameters); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + model = session.Get(sql, parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取流水号信息 + + /// + /// 获取流水号信息 + /// + /// 条件 + /// 信息 + public int GetNum(Product model) + { + int num = 0; + StringBuilder sqlBuilder = new StringBuilder(); + try + { + sqlBuilder.AppendLine("SELECT count(*) FROM T_AW_PRODUCT "); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取数量信息 + num = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString())) + 1; + } + return num; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "零件条码信息数据层-获取信息" + }); + throw; + } + } + + #endregion + + public int ExistsCheck(string barCode) + { + int productSum = 0; + string sql = null; + List parameters = new List(); + try + { + sql = string.Format("select count(1) from t_aw_product where productcode='{0}'", barCode); + + LogManager.LogHelper.Info(new LogInfo() {Info = sql}); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + productSum = Convert.ToInt32(session.ExecuteSqlScalar(sql, new List().ToArray())); + } + return productSum; + } + catch (Exception ex) + { + throw ex; + } + } + + public Product GetProductByAssembleCode(string code) + { + string sql = null; + Product model = new Product(); + List parameters = new List(); + try + { + sql = this.GetQuerySqlByAssemble(code); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + model = session.Get(sql, parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + #region 获取主体条码下的零件列表 + + public List GetMainProductMaterialCodeList(string productcode) + { + List parameters = new List(); + try + { + var sql = + "SELECT * FROM T_AW_PRODUCT T where T.PID in (select PART_PID from T_QT_PRODUCT_STRUCTURE where PROCESS_CODE='" + + productcode + "') "; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + + } + + #endregion + + #region 替换并添加临时表 + + public int ReplaceProductMaterialCode(Product mainProduct, Product childProduct, Product replaceProduct, + string UserID) + { + List parameters = new List(); + int count = 0; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + // 开始事务 + session.OpenTs(); + if (string.IsNullOrWhiteSpace(replaceProduct.PID) + && !string.IsNullOrWhiteSpace(replaceProduct.PRODUCTCODE)) + { + replaceProduct.PID = Guid.NewGuid().ToString(); + replaceProduct.USINGSTATE = "2"; + replaceProduct.USINGCOUNT = replaceProduct.USINGCOUNT + 1; + session.Insert(replaceProduct); + } + else + { + //修改替换条码的状态和使用数量 + replaceProduct.USINGSTATE = "2"; + replaceProduct.USINGCOUNT = replaceProduct.USINGCOUNT + 1; + session.Update(replaceProduct); + } + string sql = ""; + if (childProduct != null&&!string.IsNullOrWhiteSpace(childProduct.PID)) + { + //替换T_QT_PRODUCT_STRUCTURE表里的PART_PID + sql = "update T_QT_PRODUCT_STRUCTURE set PART_PID='" + replaceProduct.PID + + "' where PART_PID='" + childProduct.PID + "'"; + count = session.ExecuteSql(sql, parameters.ToArray()); + childProduct.USINGCOUNT = childProduct.USINGCOUNT - 1; + childProduct.USINGSTATE = "0"; + //childProduct.UPDATEDATE = DateTime.Now; + session.Update(childProduct); + } + else + { + sql = "INSERT INTO [T_QT_PRODUCT_STRUCTURE] VALUES(NEWID(),'" + mainProduct.PRODUCTCODE + "','" + mainProduct.PID + "','" + replaceProduct.PID + "')"; + count = session.ExecuteSql(sql, parameters.ToArray()); + } + + //添加临时表 + var pid = Guid.NewGuid().ToString(); + sql = + "INSERT INTO T_AW_PRODUCT_REPLACE (PID,MAIN_PID,MAIN_PRODUCTCODE,MAIN_MATERIAL_CODE,MAIN_STATUS,CHILD_PID,CHILD_PRODUCTCODE,CHILD_MATERIAL_CODE,CHILD_STATUS,REPLACE_PID,REPLACE_PRODUCTCODE,REPLACE_STATUS,CREATEUSER,CREATEDATE) "; + sql += "VALUES('" + pid + "','" + mainProduct.PID + "','" + mainProduct.PRODUCTCODE + "','" + + mainProduct.MATERIAL_CODE + "','0','" + (childProduct != null ? childProduct.PID : "") + "','" + (childProduct != null ? childProduct.PRODUCTCODE : "") + "','" + + (childProduct != null ? childProduct.MATERIAL_CODE : "") + "','0','" + replaceProduct.PID + "','" + replaceProduct.PRODUCTCODE + + "','0','" + UserID + "','" + DateTime.Now + "')"; + session.ExecuteSql(sql, parameters.ToArray()); + + // 事务提交 + session.CommitTs(); + } + catch (Exception) + { + + session.RollbackTs(); + return 0; + } + + } + + return count; + + + } + #endregion + + #region 获取T_MD_PACKAGESET信息 + /// + /// 获取T_MD_PACKAGESET信息 + /// + /// + /// + public PackageSet GetPackageSetInfo(PackageSet model) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + sqlBuilder.Append(" SELECT * "); + sqlBuilder.Append(" FROM T_MD_MATERIAL "); + //sqlBuilder.Append(" FROM T_MD_PACKAGESET "); + + if (string.IsNullOrEmpty(model.PID) == false) + { + whereBuilder.Append(" AND PID= @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID }); + } + + if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false) + { + whereBuilder.Append(" AND MATERIAL_CODE= @MATERIAL_CODE "); + parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = model.MATERIAL_CODE }); + } + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + + try + { + if (null != BaseSession) + { + string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), BaseSession); + model = BaseSession.Get(sqlChange, parameters.ToArray()); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), session); + //获取信息 + model = session.Get(sqlChange, parameters.ToArray()); + } + } + return model; + } + catch (Exception ex) + { + RecordExceptionLog(ex, "数据层-获取信息"); + throw ex; + } + } + #endregion + + #region 通过零件号获取产品信息数量 + + public int GetCountByMaterialCode(string materialCode) + { + int count = 0; + + string sql = string.Format("select isnull(sum(CAPACITY),0) from T_AW_PRODUCT p inner join t_md_material_class c on c.MATERIAL_TYPE_CODE= MATERIAL_TYPE where (PRODUCTCODE like 'CFAA%' AND MATERIAL_CODE='{0}' and MATERIAL_ATTRIBUTE='1' ) or (MATERIAL_CODE='{0}' and MATERIAL_ATTRIBUTE='2' and p.outflag='0' and p.status in ('0','1'))", materialCode); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sql, new List().ToArray())); + } + + return count; + + } + + #endregion + + #region 通过零件号获取使用数量 + + public int GetUsedCountByMaterialCode(string materialCode) + { + int count = 0; + + string sql = string.Format("select isnull(sum(USINGCOUNT),0) from T_AW_PRODUCT where USINGSTATE<>'0' AND MATERIAL_CODE='{0}'", materialCode); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sql, new List().ToArray())); + } + + return count; + + } + + #endregion + + public int ReplaceBarcode(string oldcode, string newcode) + { + try + { + int count = 0; + List parameters = new List(); + string sql = "UPDATE T_AW_PRODUCT SET PRODUCTCODE=@newcode WHERE PRODUCTCODE=@oldcode"; + parameters.Add(new DataParameter("newcode", newcode)); + parameters.Add(new DataParameter("oldcode", oldcode)); + if (this.BaseSession != null) + { + count = this.BaseSession.ExecuteSql(sql, parameters.ToArray()); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.ExecuteSql(sql, parameters.ToArray()); + } + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + public int ReplacePlanNo(string productcode, string planno,string planid) + { + try + { + int count = 0; + List parameters = new List(); + string sql = "UPDATE T_AW_PRODUCT SET PLAN_NO=@planno,PLAN_NO_REV=@plannorev,PLAN_ID=@planid WHERE PRODUCTCODE=@productcode"; + parameters.Add(new DataParameter("planno", planno)); + parameters.Add(new DataParameter("plannorev", new string(planno.Reverse().ToArray()))); + parameters.Add(new DataParameter("planid", planid)); + parameters.Add(new DataParameter("productcode", productcode)); + if (this.BaseSession != null) + { + count = this.BaseSession.ExecuteSql(sql, parameters.ToArray()); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.ExecuteSql(sql, parameters.ToArray()); + } + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + public Product GetProductByPartID(string partid) + { + StringBuilder sql = new StringBuilder(); + Product model = new Product(); + List parameters = new List(); + try + { + sql.AppendLine("SELECT * "); + sql.AppendLine(" FROM T_AW_PRODUCT "); + sql.AppendLine(" WHERE PRODUCTCODE=(SELECT PROCESS_CODE "); + sql.AppendLine(" FROM T_QT_PRODUCT_STRUCTURE "); + sql.AppendLine(" WHERE PART_PID=@partid) "); + sql.AppendLine(" ORDER BY CREATEDATE DESC "); + parameters.Add(new DataParameter("partid", partid)); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + model = session.Get(sql.ToString(), parameters.ToArray()); + } + return model; + } + catch (Exception ex) + { + throw ex; + } + } + + + public List GetPartList(string productcode) + { + List parameters = new List(); + try + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT P.* "); + sql.AppendLine(" ,M.MATERIAL_NAME "); + sql.AppendLine(" FROM T_AW_PRODUCT AS P "); + sql.AppendLine(" LEFT JOIN T_MD_MATERIAL AS M "); + sql.AppendLine(" ON P.MATERIAL_CODE=M.MATERIAL_CODE "); + sql.AppendLine(" WHERE P.PID IN (SELECT PART_PID "); + sql.AppendLine(" FROM T_QT_PRODUCT_STRUCTURE "); + sql.AppendLine(" WHERE PROCESS_CODE=@productcode) "); + sql.AppendLine(" ORDER BY UPDATEDATE DESC "); + parameters.Add(new DataParameter("productcode", productcode)); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + + public ShipmentInfo GetShipmentInfo(string productcode) + { + List parameters = new List(); + try + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT F.VWSEQ "); + sql.AppendLine(" ,F.VIN "); + sql.AppendLine(" ,F.KIN "); + sql.AppendLine(" ,D.SANBARCODE "); + sql.AppendLine(" ,D.SCANDATE "); + sql.AppendLine(" FROM T_PP_PASCARDDETAILS AS D "); + sql.AppendLine(" LEFT JOIN T_PP_FISORDER AS F "); + sql.AppendLine(" ON D.FISDETAILID=F.PID "); + sql.AppendLine(" WHERE D.SANBARCODE=@productcode "); + sql.AppendLine(" ORDER BY SCANDATE DESC "); + parameters.Add(new DataParameter("productcode", productcode)); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + } + +} diff --git a/.svn/pristine/79/79012ec5d5a1dd0de217d1ce4b1e14ef3488e61d.svn-base b/.svn/pristine/79/79012ec5d5a1dd0de217d1ce4b1e14ef3488e61d.svn-base new file mode 100644 index 0000000..ba205d1 --- /dev/null +++ b/.svn/pristine/79/79012ec5d5a1dd0de217d1ce4b1e14ef3488e61d.svn-base @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMFrameWork.Data.Attributes; +using QMAPP.Entity; +using System.Data; + +namespace QMAPP.FJC.Entity.MD +{ + /// + /// 模块名称:物料类型信息 + /// 作 者:张鹏 + /// 编写日期:2017年09月08日 + /// + [DBTable(TableName = "T_MD_MATERIAL_CLASS")] + public class MaterialClass : BaseEntity + { + /// + /// 主键 + /// + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + public string MATERIAL_TYPE_CODE { get; set; } + + public string MATERIAL_TYPE_NAME { get; set; } + + public string MATERIAL_ATTRIBUTE { get; set; } + + public string LAYER_NUM { get; set; } + + public string SEQ_NUM { get; set; } + + public string UP_MATERIAL_TYPE_CODE { get; set; } + + public string REMARK { get; set; } + + } +} diff --git a/.svn/pristine/79/797284e4c5bc29459dbc9168a6c8facbc736eeea.svn-base b/.svn/pristine/79/797284e4c5bc29459dbc9168a6c8facbc736eeea.svn-base new file mode 100644 index 0000000..b137c69 --- /dev/null +++ b/.svn/pristine/79/797284e4c5bc29459dbc9168a6c8facbc736eeea.svn-base @@ -0,0 +1,532 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectionMoldingNEWForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InjectionMoldingForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + this.comOpereator = new System.Windows.Forms.ComboBox(); + this.comMaterialCode = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.txtBatch = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSearch = new System.Windows.Forms.ToolStripButton(); + this.tsbAdd = new System.Windows.Forms.ToolStripButton(); + this.tsbEdit = new System.Windows.Forms.ToolStripButton(); + this.tsbDelete = new System.Windows.Forms.ToolStripButton(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MachineName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MaterialCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dgcMaterialName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.materialType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MaterialBatch = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.METERIALWEIGHT = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.USEDMETERIALWEIGHT = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CreateDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CreateUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Pid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panelSearchTitle = new System.Windows.Forms.Panel(); + this.lblSearchTitle = new System.Windows.Forms.Label(); + this.panelSearch = new System.Windows.Forms.Panel(); + this.dtpCreateUserEnd = new DateTimePickerA(); + this.dtpCreateUserStart = new DateTimePickerA(); + this.pager1 = new QMAPP.WinForm.Controls.Pager(); + this.panel1 = new System.Windows.Forms.Panel(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.panelSearchTitle.SuspendLayout(); + this.panelSearch.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // comOpereator + // + this.comOpereator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comOpereator.Font = new System.Drawing.Font("宋体", 11F); + this.comOpereator.FormattingEnabled = true; + this.comOpereator.Location = new System.Drawing.Point(676, 58); + this.comOpereator.Name = "comOpereator"; + this.comOpereator.Size = new System.Drawing.Size(169, 23); + this.comOpereator.TabIndex = 6; + // + // comMaterialCode + // + this.comMaterialCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMaterialCode.Font = new System.Drawing.Font("宋体", 11F); + this.comMaterialCode.FormattingEnabled = true; + this.comMaterialCode.Items.AddRange(new object[] { + "否", + "是"}); + this.comMaterialCode.Location = new System.Drawing.Point(123, 16); + this.comMaterialCode.Name = "comMaterialCode"; + this.comMaterialCode.Size = new System.Drawing.Size(438, 23); + this.comMaterialCode.TabIndex = 2; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(579, 59); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(69, 20); + this.label6.TabIndex = 4; + this.label6.Text = "操作人员"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(579, 17); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(69, 20); + this.label3.TabIndex = 4; + this.label3.Text = "投料批次"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(316, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(24, 20); + this.label5.TabIndex = 2; + this.label5.Text = "至"; + // + // txtBatch + // + this.txtBatch.Font = new System.Drawing.Font("宋体", 11F); + this.txtBatch.Location = new System.Drawing.Point(676, 15); + this.txtBatch.Name = "txtBatch"; + this.txtBatch.Size = new System.Drawing.Size(169, 24); + this.txtBatch.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(47, 17); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(54, 20); + this.label2.TabIndex = 2; + this.label2.Text = "物料号"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(36, 59); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(69, 20); + this.label4.TabIndex = 0; + this.label4.Text = "投料日期"; + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSearch, + this.tsbAdd, + this.tsbEdit, + this.tsbDelete}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(984, 70); + this.toolStrip1.Stretch = true; + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSearch + // + this.tsbSearch.AutoSize = false; + this.tsbSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSearch.Image = ((System.Drawing.Image)(resources.GetObject("tsbSearch.Image"))); + this.tsbSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSearch.Name = "tsbSearch"; + this.tsbSearch.Size = new System.Drawing.Size(100, 60); + this.tsbSearch.Text = "查询"; + this.tsbSearch.Click += new System.EventHandler(this.tsbSearch_Click); + // + // tsbAdd + // + this.tsbAdd.AutoSize = false; + this.tsbAdd.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbAdd.Image = ((System.Drawing.Image)(resources.GetObject("tsbAdd.Image"))); + this.tsbAdd.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbAdd.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbAdd.Name = "tsbAdd"; + this.tsbAdd.Size = new System.Drawing.Size(100, 60); + this.tsbAdd.Text = "投料"; + this.tsbAdd.Click += new System.EventHandler(this.tsbAdd_Click); + // + // tsbEdit + // + this.tsbEdit.AutoSize = false; + this.tsbEdit.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbEdit.Image = ((System.Drawing.Image)(resources.GetObject("tsbEdit.Image"))); + this.tsbEdit.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbEdit.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbEdit.Name = "tsbEdit"; + this.tsbEdit.Size = new System.Drawing.Size(100, 60); + this.tsbEdit.Text = "修改"; + this.tsbEdit.Click += new System.EventHandler(this.tsbEdit_Click); + // + // tsbDelete + // + this.tsbDelete.AutoSize = false; + this.tsbDelete.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbDelete.Image = ((System.Drawing.Image)(resources.GetObject("tsbDelete.Image"))); + this.tsbDelete.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbDelete.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbDelete.Name = "tsbDelete"; + this.tsbDelete.Size = new System.Drawing.Size(100, 60); + this.tsbDelete.Text = "删除"; + this.tsbDelete.Click += new System.EventHandler(this.tsbDelete_Click); + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MachineName, + this.MaterialCode, + this.dgcMaterialName, + this.materialType, + this.MaterialBatch, + this.METERIALWEIGHT, + this.USEDMETERIALWEIGHT, + this.CreateDate, + this.CreateUser, + this.Pid}); + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle11.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGView.DefaultCellStyle = dataGridViewCellStyle11; + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(0, 0); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(984, 397); + this.DGView.TabIndex = 3; + this.DGView.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.DG_RowPostPaint); + // + // MachineName + // + this.MachineName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.MachineName.DataPropertyName = "MACHINENAME"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.MachineName.DefaultCellStyle = dataGridViewCellStyle2; + this.MachineName.HeaderText = "注塑设备"; + this.MachineName.Name = "MachineName"; + this.MachineName.ReadOnly = true; + this.MachineName.Width = 111; + // + // MaterialCode + // + this.MaterialCode.DataPropertyName = "MATERIALCODE"; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.MaterialCode.DefaultCellStyle = dataGridViewCellStyle3; + this.MaterialCode.HeaderText = "物料号"; + this.MaterialCode.Name = "MaterialCode"; + this.MaterialCode.ReadOnly = true; + this.MaterialCode.Width = 94; + // + // dgcMaterialName + // + this.dgcMaterialName.DataPropertyName = "MATERIALNAME"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F); + this.dgcMaterialName.DefaultCellStyle = dataGridViewCellStyle4; + this.dgcMaterialName.HeaderText = "物料名称"; + this.dgcMaterialName.Name = "dgcMaterialName"; + this.dgcMaterialName.ReadOnly = true; + this.dgcMaterialName.Width = 111; + // + // materialType + // + this.materialType.DataPropertyName = "MATERIALTYPE"; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F); + this.materialType.DefaultCellStyle = dataGridViewCellStyle5; + this.materialType.HeaderText = "产品零件"; + this.materialType.Name = "materialType"; + this.materialType.ReadOnly = true; + this.materialType.Width = 111; + // + // MaterialBatch + // + this.MaterialBatch.DataPropertyName = "MATERIALBATCH"; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 15.75F); + this.MaterialBatch.DefaultCellStyle = dataGridViewCellStyle6; + this.MaterialBatch.HeaderText = "投料批次"; + this.MaterialBatch.Name = "MaterialBatch"; + this.MaterialBatch.ReadOnly = true; + this.MaterialBatch.Width = 111; + // + // METERIALWEIGHT + // + this.METERIALWEIGHT.DataPropertyName = "METERIALWEIGHT"; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 15.75F); + this.METERIALWEIGHT.DefaultCellStyle = dataGridViewCellStyle7; + this.METERIALWEIGHT.HeaderText = "重量(KG)"; + this.METERIALWEIGHT.Name = "METERIALWEIGHT"; + this.METERIALWEIGHT.ReadOnly = true; + this.METERIALWEIGHT.Width = 113; + // + // USEDMETERIALWEIGHT + // + this.USEDMETERIALWEIGHT.DataPropertyName = "USEDWEIGHTSUM"; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 15.75F); + this.USEDMETERIALWEIGHT.DefaultCellStyle = dataGridViewCellStyle8; + this.USEDMETERIALWEIGHT.HeaderText = "已使用重量(KG)"; + this.USEDMETERIALWEIGHT.Name = "USEDMETERIALWEIGHT"; + this.USEDMETERIALWEIGHT.ReadOnly = true; + this.USEDMETERIALWEIGHT.Visible = false; + this.USEDMETERIALWEIGHT.Width = 123; + // + // CreateDate + // + this.CreateDate.DataPropertyName = "CREATEDATE"; + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle9.Format = "f"; + dataGridViewCellStyle9.NullValue = null; + this.CreateDate.DefaultCellStyle = dataGridViewCellStyle9; + this.CreateDate.HeaderText = "投料时间"; + this.CreateDate.Name = "CreateDate"; + this.CreateDate.ReadOnly = true; + this.CreateDate.Width = 111; + // + // CreateUser + // + this.CreateUser.DataPropertyName = "CREATEUSERNAME"; + dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 15.75F); + this.CreateUser.DefaultCellStyle = dataGridViewCellStyle10; + this.CreateUser.HeaderText = "操作人"; + this.CreateUser.Name = "CreateUser"; + this.CreateUser.ReadOnly = true; + this.CreateUser.Width = 94; + // + // Pid + // + this.Pid.DataPropertyName = "PID"; + this.Pid.HeaderText = "Pid"; + this.Pid.Name = "Pid"; + this.Pid.ReadOnly = true; + this.Pid.Visible = false; + // + // panelSearchTitle + // + this.panelSearchTitle.BackColor = System.Drawing.SystemColors.ScrollBar; + this.panelSearchTitle.Controls.Add(this.lblSearchTitle); + this.panelSearchTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearchTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearchTitle.Location = new System.Drawing.Point(0, 70); + this.panelSearchTitle.Name = "panelSearchTitle"; + this.panelSearchTitle.Size = new System.Drawing.Size(984, 35); + this.panelSearchTitle.TabIndex = 8; + // + // lblSearchTitle + // + this.lblSearchTitle.AutoSize = true; + this.lblSearchTitle.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSearchTitle.Location = new System.Drawing.Point(15, 7); + this.lblSearchTitle.Name = "lblSearchTitle"; + this.lblSearchTitle.Size = new System.Drawing.Size(69, 20); + this.lblSearchTitle.TabIndex = 0; + this.lblSearchTitle.Text = "查询条件"; + // + // panelSearch + // + this.panelSearch.BackColor = System.Drawing.SystemColors.InactiveBorder; + this.panelSearch.Controls.Add(this.dtpCreateUserEnd); + this.panelSearch.Controls.Add(this.dtpCreateUserStart); + this.panelSearch.Controls.Add(this.label4); + this.panelSearch.Controls.Add(this.comOpereator); + this.panelSearch.Controls.Add(this.label2); + this.panelSearch.Controls.Add(this.txtBatch); + this.panelSearch.Controls.Add(this.comMaterialCode); + this.panelSearch.Controls.Add(this.label5); + this.panelSearch.Controls.Add(this.label6); + this.panelSearch.Controls.Add(this.label3); + this.panelSearch.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearch.Location = new System.Drawing.Point(0, 105); + this.panelSearch.Name = "panelSearch"; + this.panelSearch.Size = new System.Drawing.Size(984, 100); + this.panelSearch.TabIndex = 9; + // + // dtpCreateUserEnd + // + this.dtpCreateUserEnd.CustomFormat = " "; + this.dtpCreateUserEnd.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.dtpCreateUserEnd.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserEnd.FormatString = "yyyy年MM月dd日"; + this.dtpCreateUserEnd.Location = new System.Drawing.Point(392, 56); + this.dtpCreateUserEnd.Name = "dtpCreateUserEnd"; + this.dtpCreateUserEnd.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserEnd.Size = new System.Drawing.Size(169, 26); + this.dtpCreateUserEnd.TabIndex = 8; + this.dtpCreateUserEnd.ValueX = null; + // + // dtpCreateUserStart + // + this.dtpCreateUserStart.CustomFormat = " "; + this.dtpCreateUserStart.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.dtpCreateUserStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserStart.FormatString = "yyyy年MM月dd日"; + this.dtpCreateUserStart.Location = new System.Drawing.Point(123, 56); + this.dtpCreateUserStart.Name = "dtpCreateUserStart"; + this.dtpCreateUserStart.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserStart.Size = new System.Drawing.Size(169, 26); + this.dtpCreateUserStart.TabIndex = 7; + this.dtpCreateUserStart.ValueX = null; + // + // pager1 + // + this.pager1.DataPage = ((QMFrameWork.Data.DataPage)(resources.GetObject("pager1.DataPage"))); + this.pager1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pager1.Location = new System.Drawing.Point(0, 602); + this.pager1.Name = "pager1"; + this.pager1.OSearch = null; + this.pager1.Size = new System.Drawing.Size(984, 40); + this.pager1.TabIndex = 7; + this.pager1.EventPaging += new QMAPP.WinForm.Controls.EventPagingHandler(this.pager1_EventPaging); + // + // panel1 + // + this.panel1.Controls.Add(this.DGView); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 205); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(984, 397); + this.panel1.TabIndex = 10; + // + // InjectionMoldingForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 642); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panelSearch); + this.Controls.Add(this.panelSearchTitle); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.pager1); + this.Name = "InjectionMoldingForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "注塑投料"; + this.Load += new System.EventHandler(this.Form_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.panelSearchTitle.ResumeLayout(false); + this.panelSearchTitle.PerformLayout(); + this.panelSearch.ResumeLayout(false); + this.panelSearch.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tsbSearch; + private System.Windows.Forms.ToolStripButton tsbAdd; + private System.Windows.Forms.ToolStripButton tsbEdit; + private System.Windows.Forms.ToolStripButton tsbDelete; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtBatch; + private System.Windows.Forms.ComboBox comMaterialCode; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.ComboBox comOpereator; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private Controls.Pager pager1; + private System.Windows.Forms.Panel panelSearchTitle; + private System.Windows.Forms.Label lblSearchTitle; + private System.Windows.Forms.Panel panelSearch; + private System.Windows.Forms.Panel panel1; + private DateTimePickerA dtpCreateUserStart; + private DateTimePickerA dtpCreateUserEnd; + private System.Windows.Forms.DataGridViewTextBoxColumn MachineName; + private System.Windows.Forms.DataGridViewTextBoxColumn MaterialCode; + private System.Windows.Forms.DataGridViewTextBoxColumn dgcMaterialName; + private System.Windows.Forms.DataGridViewTextBoxColumn materialType; + private System.Windows.Forms.DataGridViewTextBoxColumn MaterialBatch; + private System.Windows.Forms.DataGridViewTextBoxColumn METERIALWEIGHT; + private System.Windows.Forms.DataGridViewTextBoxColumn USEDMETERIALWEIGHT; + private System.Windows.Forms.DataGridViewTextBoxColumn CreateDate; + private System.Windows.Forms.DataGridViewTextBoxColumn CreateUser; + private System.Windows.Forms.DataGridViewTextBoxColumn Pid; + + + } +} \ No newline at end of file diff --git a/.svn/pristine/79/798bcd12a2cc4e31cbf16f918343e19e5ae140dc.svn-base b/.svn/pristine/79/798bcd12a2cc4e31cbf16f918343e19e5ae140dc.svn-base new file mode 100644 index 0000000..053d4ac --- /dev/null +++ b/.svn/pristine/79/798bcd12a2cc4e31cbf16f918343e19e5ae140dc.svn-base @@ -0,0 +1,148 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + Library + Properties + QMAPP.MD.BLL + QMAPP.MD.BLL + v4.0 + 512 + Svn + Svn + Svn + SubversionScc + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.InfoValidate.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE} + QMAPP.Common.Web + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + + + PublicResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + \ No newline at end of file diff --git a/.svn/pristine/7b/7b53339791e5aca34e9133e76c7a13a6638830cf.svn-base b/.svn/pristine/7b/7b53339791e5aca34e9133e76c7a13a6638830cf.svn-base new file mode 100644 index 0000000..309e08b Binary files /dev/null and b/.svn/pristine/7b/7b53339791e5aca34e9133e76c7a13a6638830cf.svn-base differ diff --git a/.svn/pristine/7c/7c6d7086d0d6eb7448d285c8fc1b2cf6ce88e167.svn-base b/.svn/pristine/7c/7c6d7086d0d6eb7448d285c8fc1b2cf6ce88e167.svn-base new file mode 100644 index 0000000..2c476f0 --- /dev/null +++ b/.svn/pristine/7c/7c6d7086d0d6eb7448d285c8fc1b2cf6ce88e167.svn-base @@ -0,0 +1,786 @@ + + + + + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 设置密码 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 查看/回复 + 导出 + + + + + 查询 + 导出 + + + + + + + + + 保存 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + 配置设备 + + + + + 查询 + 新建 + 修改 + 删除 + 工序配置 + + + + + 查询 + 新建 + 删除 + 配置BOM明细 + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加1 + 添加2 + 删除 + + + + + 查询 + 修改 + 同步数据 + + + + + 查询 + 修改 + 启用 + 禁用 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + + + + + 查询 + 修改 + + + + + 查询 + + + + + 查询 + 修改 + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 添加 + 整车添加 + 修改 + 修改计划顺序号 + 插单 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 新建 + 修改 + 修改计划顺序号 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 导出 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 盘点明细 + 盘点对比 + 比对结果 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + + + + + + + + + + + + + 查询 + 添加 + 编辑 + 删除 + + + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改 + 删除 + + + + + + 查询 + 修改 + 删除 + + + + + 查询 + 修改 + 删除 + + + + + 查询 + 修改批次号 + 删除 + + + + + 查询 + + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 查看明细 + 导出 + + + + + + 查询 + 导出 + + + + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出Excel + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/7d/7d9acd278a57a0ad18bfce907ce09df71c782cad.svn-base b/.svn/pristine/7d/7d9acd278a57a0ad18bfce907ce09df71c782cad.svn-base new file mode 100644 index 0000000..47c0fa1 Binary files /dev/null and b/.svn/pristine/7d/7d9acd278a57a0ad18bfce907ce09df71c782cad.svn-base differ diff --git a/.svn/pristine/80/8098b309f15e3980ac8e40b21e6a590923c9f471.svn-base b/.svn/pristine/80/8098b309f15e3980ac8e40b21e6a590923c9f471.svn-base new file mode 100644 index 0000000..fec3681 --- /dev/null +++ b/.svn/pristine/80/8098b309f15e3980ac8e40b21e6a590923c9f471.svn-base @@ -0,0 +1,73 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + +
+ <%=Html.QV(p => p.BucketName)%> + + <%=Html.QC(p => p.BucketName)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("BucketInfo", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("BucketInfo", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("BucketInfo", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("BucketInfo", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/82/823f630624a0ee2b027412ed66207839c810ed35.svn-base b/.svn/pristine/82/823f630624a0ee2b027412ed66207839c810ed35.svn-base new file mode 100644 index 0000000..fc75646 --- /dev/null +++ b/.svn/pristine/82/823f630624a0ee2b027412ed66207839c810ed35.svn-base @@ -0,0 +1,68 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.DAL.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.Entity; +using QMFrameWork.Log; +using System.Data; +using QMAPP.FJC.DAL.MD; +using QMAPP.FJC.Entity.MD; + +namespace QMAPP.FJC.BLL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年03月17日 + /// + public class AppConfigBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public AppConfig Get(string code) + { + try + { + return new AppConfigDAL().Get(code); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public MaterialClass GetMATERIAL(string code) + { + try + { + //查找物料号 + var MATERIAL = new MaterialDAL().Get(code); + var msg = ""; + var mater = new AppConfigDAL().GetMATERIAL(MATERIAL.MATERIAL_TYPE_CODE,ref msg); + mater.MATERIAL_TYPE_NAME = msg; + return mater; + } + catch (Exception ex) + { + throw ex; + } + } + } +} diff --git a/.svn/pristine/82/827185c075310955e72b5cfa3ea860a6f426aaf0.svn-base b/.svn/pristine/82/827185c075310955e72b5cfa3ea860a6f426aaf0.svn-base new file mode 100644 index 0000000..74fa926 --- /dev/null +++ b/.svn/pristine/82/827185c075310955e72b5cfa3ea860a6f426aaf0.svn-base @@ -0,0 +1,295 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + Library + Properties + QMAPP.FJC.Entity + QMAPP.FJC.Entity + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\APPMESReport\QMAPP.MESReport.Web\Bin\QMAPP.MESReport.Entity.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + + + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + PublicResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + + \ No newline at end of file diff --git a/.svn/pristine/82/82e698d9e3f908aafc985e93c7d4a07de48ad071.svn-base b/.svn/pristine/82/82e698d9e3f908aafc985e93c7d4a07de48ad071.svn-base new file mode 100644 index 0000000..9ba9872 --- /dev/null +++ b/.svn/pristine/82/82e698d9e3f908aafc985e93c7d4a07de48ad071.svn-base @@ -0,0 +1,370 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterial Get(RawMaterial info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterial Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_RawMaterial] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(RawMaterial condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListRaw(RawMaterial condition) + { + string sql = null; + List parameters = new List(); + var List = new List(); + try + { + sql = $"select BucketCode,PartCode, MAX(CREATEDATE) AS CREATEDATE,BatchCode from T_MD_RawMaterial where BucketCode = '{condition.BucketCode}' and PartCode = '{condition.PartCode}' group by BucketCode,PartCode,BatchCode order by CREATEDATE desc"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + List = session.GetList(sql, parameters.ToArray()).ToList(); + } + return List; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListTo(RawMaterial condition) + { + string sql = null; + List parameters = new List(); + var List = new List(); + try + { + sql = this.GetQuerySql2(condition, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + List = session.GetList(sql, parameters.ToArray()).ToList(); + } + return List; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql2(RawMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append(" SELECT R.PID,R.BucketCode,R.PartCode,R.BatchCode,R.IsCheck,R.SerialCode,R.CREATEUSER,R.CREATEDATE,R.UPDATEUSER,R.UPDATEDATE "); + sqlBuilder.Append(" FROM (SELECT BucketCode, MAX(UPDATEDATE) AS UPDATEDATE FROM T_MD_RawMaterial GROUP BY BucketCode) AS up LEFT JOIN T_MD_RawMaterial AS R ON UP.UPDATEDATE = R.UPDATEDATE AND UP.BucketCode = R.BucketCode "); + whereBuilder.Append(" AND R.IsCheck <> '1' "); + if (string.IsNullOrEmpty(condition.MaterialCode) == false) + { + + whereBuilder.Append($" AND R.PartCode in (select RawMaterial from T_MD_BucketMaterialClass where MaterialCode = '{condition.MaterialCode}') "); + } + + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(RawMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,BucketCode,PartCode,BatchCode,IsCheck,SerialCode,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE,ProductLine,MaterialType,MachineCode "); + sqlBuilder.Append("FROM T_MD_RawMaterial "); + whereBuilder.Append(" AND IsCheck<> '1' "); + if (string.IsNullOrEmpty(condition.BucketCode) == false) + { + whereBuilder.Append(" AND BucketCode = @BucketCode "); + parameters.Add(new DataParameter { ParameterName = "BucketCode", DataType = DbType.String, Value = condition.BucketCode }); + } + if (string.IsNullOrEmpty(condition.BatchCode) == false) + { + whereBuilder.Append(" AND BatchCode = @BatchCode "); + parameters.Add(new DataParameter { ParameterName = "BatchCode", DataType = DbType.String, Value = condition.BatchCode }); + } + if (!string.IsNullOrEmpty(condition.CreateDateStart)) + { + whereBuilder.Append(" AND CreateDate >= @CreateDateStart "); + parameters.Add(new DataParameter { ParameterName = "CreateDateStart", DataType = DbType.String, Value = condition.CreateDateStart }); + } + if (!string.IsNullOrEmpty(condition.CreateDateEnd)) + { + whereBuilder.Append(" AND CreateDate <= @CreateDateEnd "); + parameters.Add(new DataParameter { ParameterName = "CreateDateEnd", DataType = DbType.String, Value = condition.CreateDateEnd }); + } + + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(RawMaterial info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_RawMaterial"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(RawMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(RawMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_RawMaterial "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/84/8436086c12accf5d4dac73b204c75e2ae45b8fa8.svn-base b/.svn/pristine/84/8436086c12accf5d4dac73b204c75e2ae45b8fa8.svn-base new file mode 100644 index 0000000..e6e6f02 Binary files /dev/null and b/.svn/pristine/84/8436086c12accf5d4dac73b204c75e2ae45b8fa8.svn-base differ diff --git a/.svn/pristine/84/84488662bdb676ba96eb690881b6f475cbd0c7ce.svn-base b/.svn/pristine/84/84488662bdb676ba96eb690881b6f475cbd0c7ce.svn-base new file mode 100644 index 0000000..2a43588 --- /dev/null +++ b/.svn/pristine/84/84488662bdb676ba96eb690881b6f475cbd0c7ce.svn-base @@ -0,0 +1,378 @@ +//namespace QMAPP.WinForm.Forms.Injection +//{ +// partial class InjectionMoldingNEWEditForm +// { +// /// +// /// Required designer variable. +// /// +// private System.ComponentModel.IContainer components = null; + +// /// +// /// Clean up any resources being used. +// /// +// /// true if managed resources should be disposed; otherwise, false. +// protected override void Dispose(bool disposing) +// { +// if (disposing && (components != null)) +// { +// components.Dispose(); +// } +// base.Dispose(disposing); +// } + +// #region Windows Form Designer generated code + +// /// +// /// Required method for Designer support - do not modify +// /// the contents of this method with the code editor. +// /// +// private void InitializeComponent() +// { +// this.toolStrip1 = new System.Windows.Forms.ToolStrip(); +// this.tsbSave = new System.Windows.Forms.ToolStripButton(); +// this.tsbClose = new System.Windows.Forms.ToolStripButton(); +// this.groupBox1 = new System.Windows.Forms.GroupBox(); +// this.comMaterialType = new System.Windows.Forms.CheckedListBox(); +// this.cbProject = new System.Windows.Forms.CheckedListBox(); +// this.comMachineCode = new System.Windows.Forms.CheckedListBox(); +// this.label10 = new System.Windows.Forms.Label(); +// this.txtMeterialWeight = new System.Windows.Forms.TextBox(); +// this.label9 = new System.Windows.Forms.Label(); +// this.label12 = new System.Windows.Forms.Label(); +// this.label8 = new System.Windows.Forms.Label(); +// this.label16 = new System.Windows.Forms.Label(); +// this.label6 = new System.Windows.Forms.Label(); +// this.label4 = new System.Windows.Forms.Label(); +// this.txtMaterialBatch = new System.Windows.Forms.TextBox(); +// this.label13 = new System.Windows.Forms.Label(); +// this.label15 = new System.Windows.Forms.Label(); +// this.label7 = new System.Windows.Forms.Label(); +// this.label5 = new System.Windows.Forms.Label(); +// this.label3 = new System.Windows.Forms.Label(); +// this.textBox1 = new System.Windows.Forms.TextBox(); +// this.label1 = new System.Windows.Forms.Label(); +// this.textBox2 = new System.Windows.Forms.TextBox(); +// this.label2 = new System.Windows.Forms.Label(); +// this.toolStrip1.SuspendLayout(); +// this.groupBox1.SuspendLayout(); +// this.SuspendLayout(); +// // +// // toolStrip1 +// // +// this.toolStrip1.AutoSize = false; +// this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { +// this.tsbSave, +// this.tsbClose}); +// this.toolStrip1.Location = new System.Drawing.Point(0, 0); +// this.toolStrip1.Name = "toolStrip1"; +// this.toolStrip1.Size = new System.Drawing.Size(798, 60); +// this.toolStrip1.TabIndex = 0; +// this.toolStrip1.Text = "toolStrip1"; +// // +// // tsbSave +// // +// this.tsbSave.AutoSize = false; +// this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 12F); +// this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; +// this.tsbSave.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; +// this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta; +// this.tsbSave.Name = "tsbSave"; +// this.tsbSave.Size = new System.Drawing.Size(100, 60); +// this.tsbSave.Text = "保存"; +// this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); +// // +// // tsbClose +// // +// this.tsbClose.AutoSize = false; +// this.tsbClose.Font = new System.Drawing.Font("微软雅黑", 12F); +// this.tsbClose.Image = global::QMAPP.WinForm.Resource1.cancle; +// this.tsbClose.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; +// this.tsbClose.ImageTransparentColor = System.Drawing.Color.Magenta; +// this.tsbClose.Name = "tsbClose"; +// this.tsbClose.Size = new System.Drawing.Size(100, 60); +// this.tsbClose.Text = "关闭"; +// this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click); +// // +// // groupBox1 +// // +// this.groupBox1.Controls.Add(this.label1); +// this.groupBox1.Controls.Add(this.textBox2); +// this.groupBox1.Controls.Add(this.label2); +// this.groupBox1.Controls.Add(this.textBox1); +// this.groupBox1.Controls.Add(this.comMaterialType); +// this.groupBox1.Controls.Add(this.cbProject); +// this.groupBox1.Controls.Add(this.comMachineCode); +// this.groupBox1.Controls.Add(this.label10); +// this.groupBox1.Controls.Add(this.txtMeterialWeight); +// this.groupBox1.Controls.Add(this.label9); +// this.groupBox1.Controls.Add(this.label12); +// this.groupBox1.Controls.Add(this.label8); +// this.groupBox1.Controls.Add(this.label16); +// this.groupBox1.Controls.Add(this.label6); +// this.groupBox1.Controls.Add(this.label4); +// this.groupBox1.Controls.Add(this.txtMaterialBatch); +// this.groupBox1.Controls.Add(this.label13); +// this.groupBox1.Controls.Add(this.label15); +// this.groupBox1.Controls.Add(this.label7); +// this.groupBox1.Controls.Add(this.label5); +// this.groupBox1.Controls.Add(this.label3); +// this.groupBox1.Location = new System.Drawing.Point(3, 63); +// this.groupBox1.Name = "groupBox1"; +// this.groupBox1.Size = new System.Drawing.Size(789, 476); +// this.groupBox1.TabIndex = 1; +// this.groupBox1.TabStop = false; +// // +// // comMaterialType +// // +// this.comMaterialType.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); +// this.comMaterialType.FormattingEnabled = true; +// this.comMaterialType.Location = new System.Drawing.Point(501, 173); +// this.comMaterialType.Name = "comMaterialType"; +// this.comMaterialType.Size = new System.Drawing.Size(274, 290); +// this.comMaterialType.TabIndex = 6; +// // +// // cbProject +// // +// this.cbProject.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); +// this.cbProject.FormattingEnabled = true; +// this.cbProject.Location = new System.Drawing.Point(244, 173); +// this.cbProject.Name = "cbProject"; +// this.cbProject.Size = new System.Drawing.Size(250, 290); +// this.cbProject.TabIndex = 5; +// // +// // comMachineCode +// // +// this.comMachineCode.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); +// this.comMachineCode.FormattingEnabled = true; +// this.comMachineCode.Location = new System.Drawing.Point(13, 173); +// this.comMachineCode.Name = "comMachineCode"; +// this.comMachineCode.Size = new System.Drawing.Size(224, 290); +// this.comMachineCode.TabIndex = 4; +// // +// // label10 +// // +// this.label10.AutoSize = true; +// this.label10.ForeColor = System.Drawing.Color.Red; +// this.label10.Location = new System.Drawing.Point(394, 114); +// this.label10.Name = "label10"; +// this.label10.Size = new System.Drawing.Size(11, 12); +// this.label10.TabIndex = 12; +// this.label10.Text = "*"; +// // +// // txtMeterialWeight +// // +// this.txtMeterialWeight.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); +// this.txtMeterialWeight.Location = new System.Drawing.Point(493, 104); +// this.txtMeterialWeight.MaxLength = 20; +// this.txtMeterialWeight.Name = "txtMeterialWeight"; +// this.txtMeterialWeight.Size = new System.Drawing.Size(257, 31); +// this.txtMeterialWeight.TabIndex = 3; +// // +// // label9 +// // +// this.label9.AutoSize = true; +// this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label9.Location = new System.Drawing.Point(405, 112); +// this.label9.Name = "label9"; +// this.label9.Size = new System.Drawing.Size(68, 16); +// this.label9.TabIndex = 11; +// this.label9.Text = "流水号:"; +// // +// // label12 +// // +// this.label12.AutoSize = true; +// this.label12.ForeColor = System.Drawing.Color.Red; +// this.label12.Location = new System.Drawing.Point(15, 114); +// this.label12.Name = "label12"; +// this.label12.Size = new System.Drawing.Size(11, 12); +// this.label12.TabIndex = 9; +// this.label12.Text = "*"; +// // +// // label8 +// // +// this.label8.AutoSize = true; +// this.label8.ForeColor = System.Drawing.Color.Red; +// this.label8.Location = new System.Drawing.Point(16, 155); +// this.label8.Name = "label8"; +// this.label8.Size = new System.Drawing.Size(11, 12); +// this.label8.TabIndex = 9; +// this.label8.Text = "*"; +// // +// // label16 +// // +// this.label16.AutoSize = true; +// this.label16.ForeColor = System.Drawing.Color.Red; +// this.label16.Location = new System.Drawing.Point(246, 155); +// this.label16.Name = "label16"; +// this.label16.Size = new System.Drawing.Size(11, 12); +// this.label16.TabIndex = 9; +// this.label16.Text = "*"; +// // +// // label6 +// // +// this.label6.AutoSize = true; +// this.label6.ForeColor = System.Drawing.Color.Red; +// this.label6.Location = new System.Drawing.Point(502, 155); +// this.label6.Name = "label6"; +// this.label6.Size = new System.Drawing.Size(11, 12); +// this.label6.TabIndex = 9; +// this.label6.Text = "*"; +// // +// // label4 +// // +// this.label4.AutoSize = true; +// this.label4.ForeColor = System.Drawing.Color.Red; +// this.label4.Location = new System.Drawing.Point(13, 73); +// this.label4.Name = "label4"; +// this.label4.Size = new System.Drawing.Size(11, 12); +// this.label4.TabIndex = 9; +// this.label4.Text = "*"; +// // +// // txtMaterialBatch +// // +// this.txtMaterialBatch.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); +// this.txtMaterialBatch.Location = new System.Drawing.Point(112, 104); +// this.txtMaterialBatch.MaxLength = 20; +// this.txtMaterialBatch.Name = "txtMaterialBatch"; +// this.txtMaterialBatch.Size = new System.Drawing.Size(265, 31); +// this.txtMaterialBatch.TabIndex = 1; +// // +// // label13 +// // +// this.label13.AutoSize = true; +// this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label13.Location = new System.Drawing.Point(25, 111); +// this.label13.Name = "label13"; +// this.label13.Size = new System.Drawing.Size(85, 16); +// this.label13.TabIndex = 6; +// this.label13.Text = "投料批次:"; +// // +// // label15 +// // +// this.label15.AutoSize = true; +// this.label15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label15.Location = new System.Drawing.Point(258, 153); +// this.label15.Name = "label15"; +// this.label15.Size = new System.Drawing.Size(51, 16); +// this.label15.TabIndex = 6; +// this.label15.Text = "产品:"; +// // +// // label7 +// // +// this.label7.AutoSize = true; +// this.label7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label7.Location = new System.Drawing.Point(513, 153); +// this.label7.Name = "label7"; +// this.label7.Size = new System.Drawing.Size(85, 16); +// this.label7.TabIndex = 6; +// this.label7.Text = "零件类型:"; +// // +// // label5 +// // +// this.label5.AutoSize = true; +// this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label5.Location = new System.Drawing.Point(27, 153); +// this.label5.Name = "label5"; +// this.label5.Size = new System.Drawing.Size(85, 16); +// this.label5.TabIndex = 6; +// this.label5.Text = "注塑设备:"; +// // +// // label3 +// // +// this.label3.AutoSize = true; +// this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label3.Location = new System.Drawing.Point(22, 71); +// this.label3.Name = "label3"; +// this.label3.Size = new System.Drawing.Size(85, 16); +// this.label3.TabIndex = 6; +// this.label3.Text = "料筒编码:"; +// // +// // textBox1 +// // +// this.textBox1.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); +// this.textBox1.Location = new System.Drawing.Point(112, 64); +// this.textBox1.MaxLength = 20; +// this.textBox1.Name = "textBox1"; +// this.textBox1.Size = new System.Drawing.Size(265, 31); +// this.textBox1.TabIndex = 13; +// // +// // label1 +// // +// this.label1.AutoSize = true; +// this.label1.ForeColor = System.Drawing.Color.Red; +// this.label1.Location = new System.Drawing.Point(394, 77); +// this.label1.Name = "label1"; +// this.label1.Size = new System.Drawing.Size(11, 12); +// this.label1.TabIndex = 16; +// this.label1.Text = "*"; +// // +// // textBox2 +// // +// this.textBox2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); +// this.textBox2.Location = new System.Drawing.Point(493, 67); +// this.textBox2.MaxLength = 20; +// this.textBox2.Name = "textBox2"; +// this.textBox2.Size = new System.Drawing.Size(257, 31); +// this.textBox2.TabIndex = 14; +// // +// // label2 +// // +// this.label2.AutoSize = true; +// this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); +// this.label2.Location = new System.Drawing.Point(405, 75); +// this.label2.Name = "label2"; +// this.label2.Size = new System.Drawing.Size(68, 16); +// this.label2.TabIndex = 15; +// this.label2.Text = "零件号:"; +// // +// // InjectionMoldingNEWEditForm +// // +// this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); +// this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; +// this.ClientSize = new System.Drawing.Size(798, 544); +// this.Controls.Add(this.groupBox1); +// this.Controls.Add(this.toolStrip1); +// this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; +// this.MaximizeBox = false; +// this.MinimizeBox = false; +// this.Name = "InjectionMoldingNEWEditForm"; +// this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; +// this.Text = "注塑投料"; +// this.Load += new System.EventHandler(this.Form_Load); +// this.toolStrip1.ResumeLayout(false); +// this.toolStrip1.PerformLayout(); +// this.groupBox1.ResumeLayout(false); +// this.groupBox1.PerformLayout(); +// this.ResumeLayout(false); + +// } + +// #endregion + +// private System.Windows.Forms.ToolStrip toolStrip1; +// private System.Windows.Forms.ToolStripButton tsbSave; +// private System.Windows.Forms.ToolStripButton tsbClose; +// private System.Windows.Forms.GroupBox groupBox1; +// private System.Windows.Forms.Label label12; +// private System.Windows.Forms.Label label8; +// private System.Windows.Forms.Label label6; +// private System.Windows.Forms.Label label4; +// private System.Windows.Forms.TextBox txtMaterialBatch; +// private System.Windows.Forms.Label label13; +// private System.Windows.Forms.Label label7; +// private System.Windows.Forms.Label label5; +// private System.Windows.Forms.Label label3; +// private System.Windows.Forms.Label label10; +// private System.Windows.Forms.TextBox txtMeterialWeight; +// private System.Windows.Forms.Label label9; +// private System.Windows.Forms.Label label16; +// private System.Windows.Forms.Label label15; +// private System.Windows.Forms.CheckedListBox comMaterialType; +// private System.Windows.Forms.CheckedListBox cbProject; +// private System.Windows.Forms.CheckedListBox comMachineCode; +// private System.Windows.Forms.Label label1; +// private System.Windows.Forms.TextBox textBox2; +// private System.Windows.Forms.Label label2; +// private System.Windows.Forms.TextBox textBox1; +// } +//} \ No newline at end of file diff --git a/.svn/pristine/85/857ed4cc7affa4d29750f17453c7f8f302b47fa2.svn-base b/.svn/pristine/85/857ed4cc7affa4d29750f17453c7f8f302b47fa2.svn-base new file mode 100644 index 0000000..7cc77a2 --- /dev/null +++ b/.svn/pristine/85/857ed4cc7affa4d29750f17453c7f8f302b47fa2.svn-base @@ -0,0 +1,276 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectionMoldingNEWEditForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSave = new System.Windows.Forms.ToolStripButton(); + this.tsbClose = new System.Windows.Forms.ToolStripButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtBucketCode = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.txtSerialCode = new System.Windows.Forms.TextBox(); + this.label16 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.txtBatchCode = new System.Windows.Forms.TextBox(); + this.txtPartCode = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.toolStrip1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSave, + this.tsbClose}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(513, 60); + this.toolStrip1.TabIndex = 0; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSave + // + this.tsbSave.AutoSize = false; + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(100, 60); + this.tsbSave.Text = "保存"; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // tsbClose + // + this.tsbClose.AutoSize = false; + this.tsbClose.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbClose.Image = global::QMAPP.WinForm.Resource1.cancle; + this.tsbClose.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbClose.Name = "tsbClose"; + this.tsbClose.Size = new System.Drawing.Size(100, 60); + this.tsbClose.Text = "关闭"; + this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.txtBucketCode); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.txtSerialCode); + this.groupBox1.Controls.Add(this.label16); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.txtBatchCode); + this.groupBox1.Controls.Add(this.txtPartCode); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(3, 63); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(506, 476); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + // + // txtBucketCode + // + this.txtBucketCode.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtBucketCode.Location = new System.Drawing.Point(173, 72); + this.txtBucketCode.MaxLength = 20; + this.txtBucketCode.Name = "txtBucketCode"; + this.txtBucketCode.Size = new System.Drawing.Size(235, 30); + this.txtBucketCode.TabIndex = 2; + this.txtBucketCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BucketCode_TextChanged); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.ForeColor = System.Drawing.Color.Red; + this.label15.Location = new System.Drawing.Point(58, 352); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(20, 20); + this.label15.TabIndex = 12; + this.label15.Text = "*"; + // + // txtSerialCode + // + this.txtSerialCode.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtSerialCode.Location = new System.Drawing.Point(173, 349); + this.txtSerialCode.MaxLength = 20; + this.txtSerialCode.Name = "txtSerialCode"; + this.txtSerialCode.Size = new System.Drawing.Size(235, 30); + this.txtSerialCode.TabIndex = 5; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.Location = new System.Drawing.Point(74, 352); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(83, 20); + this.label16.TabIndex = 10; + this.label16.Text = "流水号:"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(52, 256); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(20, 20); + this.label12.TabIndex = 9; + this.label12.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(50, 169); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(20, 20); + this.label10.TabIndex = 9; + this.label10.Text = "*"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.Red; + this.label2.Location = new System.Drawing.Point(51, 78); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(20, 20); + this.label2.TabIndex = 9; + this.label2.Text = "*"; + // + // txtBatchCode + // + this.txtBatchCode.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtBatchCode.Location = new System.Drawing.Point(173, 252); + this.txtBatchCode.MaxLength = 20; + this.txtBatchCode.Name = "txtBatchCode"; + this.txtBatchCode.Size = new System.Drawing.Size(235, 30); + this.txtBatchCode.TabIndex = 4; + this.txtBatchCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BatchCode_TextChanged); + // + // txtPartCode + // + this.txtPartCode.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPartCode.Location = new System.Drawing.Point(173, 163); + this.txtPartCode.MaxLength = 20; + this.txtPartCode.Name = "txtPartCode"; + this.txtPartCode.Size = new System.Drawing.Size(235, 30); + this.txtPartCode.TabIndex = 3; + this.txtPartCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PartCode_TextChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label13.Location = new System.Drawing.Point(68, 256); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(104, 20); + this.label13.TabIndex = 6; + this.label13.Text = "投料批次:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(66, 168); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(83, 20); + this.label9.TabIndex = 6; + this.label9.Text = "零件号:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(68, 78); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(104, 20); + this.label1.TabIndex = 6; + this.label1.Text = "料筒编码:"; + // + // timer1 + // + this.timer1.Interval = 2000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // InjectionMoldingNEWEditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(513, 542); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.toolStrip1); + this.Name = "InjectionMoldingNEWEditForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "注塑投料"; + this.Load += new System.EventHandler(this.Form_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tsbSave; + private System.Windows.Forms.ToolStripButton tsbClose; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtBatchCode; + private System.Windows.Forms.TextBox txtPartCode; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtSerialCode; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.TextBox txtBucketCode; + private System.Windows.Forms.Timer timer1; + } +} \ No newline at end of file diff --git a/.svn/pristine/86/864598987a6fd2a8a9c8ff386fc4cc6128c3cd27.svn-base b/.svn/pristine/86/864598987a6fd2a8a9c8ff386fc4cc6128c3cd27.svn-base new file mode 100644 index 0000000..a6fa90f --- /dev/null +++ b/.svn/pristine/86/864598987a6fd2a8a9c8ff386fc4cc6128c3cd27.svn-base @@ -0,0 +1,289 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + Library + Properties + QMAPP.FJC.BLL + QMAPP.FJC.BLL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLL\BarcodeLib.dll + + + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\XGate\Ptl.Device.dll + + + ..\..\DLL\XGate\Ptl.Device.XmlSerializers.dll + + + ..\..\QMFrameWork\QMFrameWork.Cache.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {8A50A215-C033-42DC-A656-BC1F117DA6BA} + QM.Exchange.Adapters + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + Always + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/86/865416efe31cafb25684cf06e86ba768fd32b765.svn-base b/.svn/pristine/86/865416efe31cafb25684cf06e86ba768fd32b765.svn-base new file mode 100644 index 0000000..dcde558 --- /dev/null +++ b/.svn/pristine/86/865416efe31cafb25684cf06e86ba768fd32b765.svn-base @@ -0,0 +1,62 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + +
+ <%=Html.QV(p=>p.BucketCode) %> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QV(p => p.RawMaterial)%> + + <%=Html.QC(p => p.RawMaterial)%> +
+
+ <%=Html.HiddenFor(p=>p.PID) %> + <%=Html.HiddenFor(p => p.IsCheck)%> + <%=Html.HiddenFor(p=>p.CREATEDATE) %> + <%=Html.HiddenFor(p=>p.CREATEUSER) %> + <%=Html.HiddenFor(p=>p.UPDATEDATE)%> + <%=Html.HiddenFor(p=>p.UPDATEUSER) %> + <%=Html.QPEnd() %> +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "BucketMaterial", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/86/86a52587a5302429af1776f920e7d1973acc6d70.svn-base b/.svn/pristine/86/86a52587a5302429af1776f920e7d1973acc6d70.svn-base new file mode 100644 index 0000000..90cfe81 --- /dev/null +++ b/.svn/pristine/86/86a52587a5302429af1776f920e7d1973acc6d70.svn-base @@ -0,0 +1,293 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + Library + Properties + QMAPP.FJC.BLL + QMAPP.FJC.BLL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLL\BarcodeLib.dll + + + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\XGate\Ptl.Device.dll + + + ..\..\DLL\XGate\Ptl.Device.XmlSerializers.dll + + + ..\..\QMFrameWork\QMFrameWork.Cache.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {8A50A215-C033-42DC-A656-BC1F117DA6BA} + QM.Exchange.Adapters + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + Always + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/86/86de27b8311f9e1980aa6c5d3a422cf20d39cddd.svn-base b/.svn/pristine/86/86de27b8311f9e1980aa6c5d3a422cf20d39cddd.svn-base new file mode 100644 index 0000000..3762744 Binary files /dev/null and b/.svn/pristine/86/86de27b8311f9e1980aa6c5d3a422cf20d39cddd.svn-base differ diff --git a/.svn/pristine/87/873ea351a350af8e0906d480ec193ac2a820dac2.svn-base b/.svn/pristine/87/873ea351a350af8e0906d480ec193ac2a820dac2.svn-base new file mode 100644 index 0000000..ce33542 --- /dev/null +++ b/.svn/pristine/87/873ea351a350af8e0906d480ec193ac2a820dac2.svn-base @@ -0,0 +1,648 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMFrameWork.Common.Encrypt; +using QMFrameWork.Data; +using QMAPP.FJC.DAL.Operation; +using QMAPP.FJC.Entity.Operation; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.BLL.Basic; +using QMAPP.Entity; +using QMAPP.FJC.Entity; +using QMFrameWork.Log; +using QMAPP.FJC.Entity.Injection; +using QMAPP.FJC.DAL.FeedInManage; +namespace QMAPP.FJC.BLL.Operation +{ + /// + /// 模块编号:M13-1 + /// 作 用:加工本体 + /// 作 者:王庆男 + /// 编写日期:2015年06月04日 + /// + public class MainBLL : BaseBLL + { + + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public Main Get(Main model) + { + try + { + return new MainDAL().Get(model); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public Main GetByCondition(Main model) + { + try + { + List
list = new MainDAL().GetList(model); + if (list.Count > 0) + { + return list[0]; + } + return null; + } + catch (Exception ex) + { + throw ex; + } + } + + public MaterialCodeInit GetMaterialSetByCondition(MaterialCodeInit condition) + { + return new QMAPP.FJC.DAL.Basic.MaterialCodeInitDAL().GetByCondition(condition); + } + #endregion + + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(Main condition, DataPage page) + { + DataResult result = new DataResult(); + + try + { + result.IsSuccess = true; + + page = new MainDAL().GetList(condition, page); + List
list = page.Result as List
; + + //处理字典信息 + DictManageBLL dictPROCESSTYPE = new DictManageBLL(DictKind.PROCESSTYPE); + DictManageBLL dictColor = new DictManageBLL(DictKind.COLOR); + DictManageBLL dictSTATUS = new DictManageBLL(DictKind.LJSTATUS); + DictManageBLL dictOUTFLAG = new DictManageBLL(DictKind.OUTFLAG); + DictManageBLL dictHL = new DictManageBLL(DictKind.HAndL); + DictManageBLL dictYN = new DictManageBLL(DictKind.ValidFlg); + foreach (var info in list) + { + //替换工序类别显示值 + info.CURRENTPROCESS = dictPROCESSTYPE.GetDictValue(info.CURRENTPROCESS); + //替换零件类别显示值 + info.COLOR = dictColor.GetDictValue(info.COLOR); + //替换零件类别显示值 + info.STATUS = dictSTATUS.GetDictValue(info.STATUS); + //替换出库标记显示值 + info.OUTFLAG = dictOUTFLAG.GetDictValue(info.OUTFLAG); + //替换使用状态显示值 + info.HB = dictHL.GetDictValue(info.HB); + + info.COMPLETEFLAG = dictYN.GetDictValue(info.COMPLETEFLAG); + + //info.COMPLETETIMESTR = dictColor.GetDictValue(info.COLOR); + info.COMPLETEDATE = (info.COMPLETETIME == System.DateTime.MinValue) ? "" + : info.COMPLETETIME.ToString("yyyy-MM-dd HH:mm:ss"); + + } + + page.Result = list; + + result.Result = page; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "本体信息获取列表错误!" + }); + result.IsSuccess = false; + result.Msg = "本体信息获取列表错误!"; + } + return result; + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 全部数据 + public List
GetAllList(Main condition) + { + try + { + return new MainDAL().GetList(condition); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool ExistsMain(Main model) + { + try + { + return new MainDAL().ExistsMain(model); + } + catch (Exception ex) + { + throw ex; + } + } + + + #endregion + + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(Main model) + { + try + { + //基本信息 + model.PID = Guid.NewGuid().ToString(); + model.CREATEUSER = this.LoginUser.UserID; + model.CREATEDATE = DateTime.Now; + model.UPDATEUSER = model.CREATEUSER; + model.UPDATEDATE = model.CREATEDATE; + MainDAL cmdDAL = new MainDAL(); + if (ExistsMain(model) == true) + return -1; + return new MainDAL().Insert(model); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(Main model) + { + try + { + //if (ExistsT_AW_MAIN(Model) == true) + //return -1; + //基本信息 + model.UPDATEUSER = this.LoginUser.UserID; + return new MainDAL().Update(model); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult UpdateStatus(Main model, MendRecorder recorder) + { + DataResult result = new DataResult(); + try + { + model.UPDATEUSER = this.LoginUser.UserID; + recorder.PID = Guid.NewGuid().ToString(); + recorder.CREATEUSER = this.LoginUser.UserID; + recorder.CREATEDATE = DateTime.Now; + recorder.UPDATEUSER = model.CREATEUSER; + recorder.UPDATEDATE = model.CREATEDATE; + result.Result = new MainDAL().Update(model, recorder); + result.IsSuccess = true; + result.Msg = Resource.MsgSuccess; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "零件条码--更新零件状态返修或报废" + }); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + } + return result; + } + + #endregion + + + #region 删除 + /// + /// 删除信息 + /// + /// + /// 删除个数 + public int Delete(string strs) + { + int count = 0; + string[] list = strs.Split(":".ToCharArray()); + try + { + foreach (string str in list) + { + count += this.DeleteMain(new Main { PID = str }); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int DeleteMain(Main model) + { + int count = 0; + try + { + count = new MainDAL().Delete(model); + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataResult GetExportData(Main model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + result.Result = new MainDAL().GetExportData(model); + + //处理字典信息 + DictManageBLL dictPROCESSTYPE = new DictManageBLL(DictKind.PROCESSTYPE); + DictManageBLL dictColor = new DictManageBLL(DictKind.COLOR); + DictManageBLL dictSTATUS = new DictManageBLL(DictKind.LJSTATUS); + DictManageBLL dictOUTFLAG = new DictManageBLL(DictKind.OUTFLAG); + DictManageBLL dictHL = new DictManageBLL(DictKind.HAndL); + DictManageBLL dictYN = new DictManageBLL(DictKind.ValidFlg); + + foreach (DataRow dr in result.Result.Rows) + { + //替换工序类别显示值 + dr["CURRENTPROCESS"] = dictPROCESSTYPE.GetDictValue(dr["CURRENTPROCESS"].ToString()); + //替换零件类别显示值 + dr["COLOR"] = dictColor.GetDictValue(dr["COLOR"].ToString()); + //替换零件类别显示值 + dr["STATUS"] = dictSTATUS.GetDictValue(dr["STATUS"].ToString()); + //替换出库标记显示值 + dr["OUTFLAG"] = dictOUTFLAG.GetDictValue(dr["OUTFLAG"].ToString()); + //替换使用状态显示值 + dr["HB"] = dictHL.GetDictValue(dr["HB"].ToString()); + dr["COMPLETEFLAG"] = dictYN.GetDictValue(dr["COMPLETEFLAG"].ToString()); + + } + } + catch (Exception ex) + { + throw ex; + } + return result; + } + #endregion + + + #region 导入数据 + public DataResult GetImportData(List
list) + { + DataResult result = new DataResult(); + MainDAL cmDal = new MainDAL(); + List
List = new List
(); + int index = 0; + try + { + result.Result = new ImportMessage(); + result.Result.Errors = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //状态判断 + foreach (Main ma in list) + { + index++; + if (string.IsNullOrEmpty(ma.InfoError) == false) + { + ma.PID = null; + result.Result.failureNum += 1; + continue; + } + //修改改时根据主键等信息获取详细内容信息 + Main oldInfo = cmDal.Get(ma); + if (oldInfo != null) + { + //更新 + ma.PID = oldInfo.PID; + ma.CREATEUSER = oldInfo.CREATEUSER; + ma.CREATEDATE = oldInfo.CREATEDATE; + ma.UPDATEUSER = this.LoginUser.UserID; + ma.UPDATEDATE = oldInfo.UPDATEDATE; + ma.IsNewInfo = false; + result.Result.updateNum += 1; + } + else + { + //新增 + oldInfo = new Main(); + ma.PID = Guid.NewGuid().ToString(); + ma.CREATEUSER = this.LoginUser.UserID; + ma.CREATEDATE = DateTime.Now; + ma.UPDATEUSER = ma.CREATEUSER; + ma.UPDATEDATE = ma.CREATEDATE; + ma.IsNewInfo = true; + result.Result.insertNum += 1; + } + List.Add(ma); + } + } + //导入 + cmDal.GetImportData(List); + result.Msg = "导入成功"; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Ex = ex; + return result; + } + } + #endregion + + #region 获取投料信息列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult> GetProductInfectionList(string id) + { + DataResult> result = new DataResult>(); + try + { + List list = new List(); + result.IsSuccess = true; + list = new MainDAL().GetProductInfectionList(id); + + //处理字典信息 + DictManageBLL dictMATERIALTYPE = new DictManageBLL(DictKind.MATERIALTYPE); + + foreach (var info in list) + { + //替换物料类别显示值 + info.MATERIALTYPE = dictMATERIALTYPE.GetDictValue(info.MATERIALTYPE); + } + + result.Result = list; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取投料信息错误!" + }); + result.IsSuccess = false; + result.Msg = "获取投料信息错误!"; + } + return result; + } + #endregion + + #region 更新表皮相关物料信息 + /// + /// 更新表皮相关物料信息 + /// + /// + /// 更新行数 + public DataResult UpdateMaterial(InjectionRecorder model) + { + DataResult result = new DataResult(); + try + { + //基本信息 + model.UPDATEUSER = this.LoginUser.UserID; + int count = new EpidermisDAL().UpdateMaterial(model); + if (count > 0) + { + result.IsSuccess = true; + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "表皮信息更新批次号错误!" + }); + result.IsSuccess = false; + result.Msg = "表皮信息更新批次号错误!"; + throw ex; + } + return result; + } + #endregion + + /// + /// 创建仪表板本体信息 + /// + /// + /// + /// + public Main CreateMain(string productcode, string materialcode) + { + var materialdal = new QMAPP.FJC.DAL.MD.MaterialDAL(); + var material = materialdal.Get(new QMAPP.FJC.Entity.MD.Material { MATERIAL_CODE = materialcode }); + var matinitdal = new FJC.DAL.Basic.MaterialCodeInitDAL(); + var mcinit = matinitdal.GetByCondition(new MaterialCodeInit { MATERIAL_TYPE = material.MATERIAL_TYPE_CODE, MATERIAL_CODE=material.MATERIAL_CODE }); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + try + { + session.OpenTs(); + ProductDAL prodal = new ProductDAL(); + prodal.BaseSession = session; + prodal.Insert(new Product + { + CAPACITY = 1, + CREATEDATE = DateTime.Now, + CREATEUSER = base.LoginUser.UserID, + CURRENTPROCESS = "", + ENDOFLINE = "1", + MACHINECODDE = "", + MACHINENAME = "", + MATERIAL_CODE = materialcode, + MATERIAL_TYPE = material.MATERIAL_TYPE_CODE, + OUTFLAG = "0", + PID = Guid.NewGuid().ToString(), + PRODUCELINE = "", + PRODUCESHIFTNAME = "A", + PRODUCESHIFTTCODE = "A", + PRODUCTCODE = productcode, + PRODUCTSOURCE = "0", + PRODUCTTYPE = "", + STATUS = "0", + TEAM_CODE = "", + UPDATEDATE = DateTime.Now, + UPDATEUSER = base.LoginUser.UserID, + USINGCOUNT = 0, + USINGSTATE = "0", + WORKCELL_CODE = mcinit == null ? "" : mcinit.WORKCELL_CODE_INIT, + WORKCENTER_CODE = mcinit == null ? "" : mcinit.WORKCENTER_CODE_INIT, + WORKLOC_CODE = "" + }); + Main main = new Main() + { + COMPLETEFLAG = "1", + COMPLETETIME = DateTime.Now, + CREATEDATE = DateTime.Now, + CREATEUSER = base.LoginUser.UserID, + CURRENTPROCESS = "15", + MACHINECODDE = "", + OUTFLAG = "0", + PID = Guid.NewGuid().ToString(), + PROCESSSTATE = "1", + PRODUCELINE = mcinit == null ? "" : mcinit.WORKCENTER_CODE_INIT, + STATUS = "0", + UPDATEDATE = DateTime.Now, + UPDATEUSER = base.LoginUser.UserID, + IsNewInfo = true, + MATERIAL_CODE = materialcode, + MAINCODE = GenerateAssyCode(materialcode, DateTime.Now), //data.WorkLocState.CurrentState.PROCESS_CODE, + SKID = "", + SKELETONCODE = "", + EID = "", + EPIDERMISCODE = productcode, + WORKCELL_CODE = mcinit == null ? "" : mcinit.WORKCELL_CODE_INIT, + WORKCENTER_CODE = mcinit == null ? "" : mcinit.WORKCENTER_CODE_INIT, + WORKLOC_CODE = "" + }; + DAL.Operation.MainDAL maindal = new MainDAL(); + maindal.BaseSession = session; + maindal.Insert(main); + session.CommitTs(); + return main; + } + catch(Exception e) + { + session.RollbackTs(); + throw e; + } + } + + } + + public string GenerateAssyCode(string materialcode, DateTime time) + { + DAL.Operation.MainDAL maindal = new DAL.Operation.MainDAL(); + //0到100000的总成号作为手工打印的总成号段 + PrintCode printcode = maindal.GetMaxANDMinMainCode(materialcode); + //string maxcode = maindal.GetMaxMainCode(0, 1000000); + string maxcode = maindal.GetMaxMainCode(printcode.MINVALUE, printcode.MAXVALUE); + string newcode = "1"; + if (!string.IsNullOrEmpty(maxcode)) + { + newcode = (Convert.ToInt32(maxcode) + 1) + ""; + } + if (Convert.ToInt32(newcode) > printcode.MAXVALUE) + { + throw new Exception("该配置零件条码流水号溢出,请重新设置!"); + } + newcode = "052 4XR" + newcode.PadLeft(7, '0'); + string finalcode = newcode + CalculateChecksum(newcode); + printcode.MAINCODE = finalcode; + printcode.ISCOMPLETE = 0; + printcode.SERIAL_NUM = 0; + PrintCodeDAL dal = new PrintCodeDAL(); + dal.Update(printcode); + + return finalcode; + } + /// + /// 计算验证码 + /// + /// + public static string CalculateChecksum(string barcode) + { + string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"; + int sum = 0; + foreach (var c in barcode) + { + sum += chars.IndexOf(c); + } + int rem = sum % chars.Length; + return chars[rem].ToString(); + } + } +} + + + + + + diff --git a/.svn/pristine/87/87a82a28b3abdec4c51fc16ba2d5200f6e9a5b86.svn-base b/.svn/pristine/87/87a82a28b3abdec4c51fc16ba2d5200f6e9a5b86.svn-base new file mode 100644 index 0000000..cc42231 --- /dev/null +++ b/.svn/pristine/87/87a82a28b3abdec4c51fc16ba2d5200f6e9a5b86.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialClassModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 零件物料号 + /// + [Description("零件物料号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.combotree)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string MaterialCode { get; set; } + + /// + /// 零件号 + /// + [Description("零件号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string RawMaterial { get; set; } + + + /// + /// 是否可用 + /// + [Description("是否可用")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] + public string IsCheck { get; set; } + + /// + /// 创建人 + /// + [Description("创建用户")] + public string CREATEUSER { get; set; } + + /// + /// 创建日期 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime CREATEDATE { get; set; } + + /// + /// 更新人 + /// + [Description("更新用户")] + public string UPDATEUSER { get; set; } + + /// + /// 更新日期 + /// + [Description("更新时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime UPDATEDATE { get; set; } + } +} diff --git a/.svn/pristine/87/87ad3bc667e216595cfd51323ae501bed3212de0.svn-base b/.svn/pristine/87/87ad3bc667e216595cfd51323ae501bed3212de0.svn-base new file mode 100644 index 0000000..b82365f --- /dev/null +++ b/.svn/pristine/87/87ad3bc667e216595cfd51323ae501bed3212de0.svn-base @@ -0,0 +1,310 @@ +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Windows.Forms; +//using QM.Common; +//using QMAPP.FJC.Entity; +//using QMAPP.FJC.Entity.Basic; +//using QMAPP.FJC.Entity.Injection; +//using QMAPP.ServicesAgent; +//using QMAPP.WinForm.Common; +//using QMAPP.Entity; +//using QMAPP.MD.Entity; +//namespace QMAPP.WinForm.Forms.Injection +//{ +// /// +// /// 模块编号:M12-1 +// /// 作 用:投料记录 +// /// 作 者:王庆男 +// /// 编写日期:2015年06月08日 +// /// +// public partial class InjectionMoldingNEWEditForm : Form +// { +// InjectionRecorder recorder = new InjectionRecorder();//编辑保存实体 + +// /// +// /// 新建 +// /// +// public InjectionMoldingNEWEditForm() +// { +// InitializeComponent(); + +// } + +// /// +// /// 编辑 +// /// +// /// +// public InjectionMoldingNEWEditForm(string pid) +// { +// recorder.PID = pid; +// InitializeComponent(); +// } + +// /// +// /// 窗体加载 +// /// +// /// +// /// +// private void Form_Load(object sender, EventArgs e) +// { +// new KeyEvent().SetKeyToTxt(this); +// #region 绑定下拉列表 +// BasicData basicData = new BasicData(); +// //加载是否有条码列表 +// //this.comIsHadNo.Items.Add(new ListItem("1", "有")); +// //this.comIsHadNo.Items.Add(new ListItem("0", "无")); + +// //this.comIsHadNo.SelectedIndex = 0; +// //this.ActiveControl = this.txtMaterialCode; +// //this.txtMaterialCode.Focus(); +// //加载注塑设备列表 +// this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType_M.Injection.GetHashCode().ToString()}, false); +// this.comMachineCode.DisplayMember = "MACHINENAME"; +// this.comMachineCode.ValueMember = "MACHINECODDE"; +// if (ClientContext.MachineInfo != null) +// this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; +// //this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE;//默认当前设备 +// //加载物料列表 +// this.comMaterialCode.DataSource = basicData.GetMaterielInfoList("RAW_INJECT", true); +// this.comMaterialCode.DisplayMember = "MATERIAL_NAME"; +// this.comMaterialCode.ValueMember = "MATERIAL_CODE"; +// //加载操作人列表 +// this.comOpreator.DataSource = basicData.GetOperatorInfoList(EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(), true); ; +// this.comOpreator.DisplayMember = "OPERATOR"; +// this.comOpreator.ValueMember = "PID"; +// //加载物料类别列表 +// this.comMaterialType.DataSource = basicData.GetMaterialTypeList(new MD.Entity.MaterialClass { UpTypeCodes = "('IP_PLASTICPART','DP_PLASTICPART')" }, false); +// this.comMaterialType.DisplayMember = "MATERIAL_TYPE_NAME"; +// this.comMaterialType.ValueMember = "MATERIAL_TYPE_CODE"; + +// //加载产品列表 +// this.cbProject.DataSource = basicData.GetProjectList(false); +// this.cbProject.DisplayMember = "PROJECT_NAME"; +// this.cbProject.ValueMember = "PROJECT_CODE"; +// #endregion + +// #region 加载编辑 +// //判断是否为编辑加载编辑数据 +// if (string.IsNullOrEmpty(recorder.PID) == false) +// { +// QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); +// recorder = agent.InvokeServiceFunction(B9BasicService.InjectionRecorderBLL_Get.ToString(), recorder); +// //一定是存在的物料 +// //this.comIsHadNo.SelectedIndex = 1; +// //this.txtMaterialCode.Visible = false; +// this.comMaterialCode.Visible = true; +// //this.txtMaterialCode.Text = ""; + +// this.comMaterialCode.SelectedValue = recorder.MATERIALCODE; + +// //this.comMaterialType.SelectedValue = recorder.MATERIALTYPE; +// this.txtMeterialWeight.Text = recorder.METERIALWEIGHT.ToString("0"); +// this.comOpreator.SelectedValue = recorder.CREATEUSER.Trim(); +// this.txtMaterialBatch.Text = recorder.MATERIALBATCH; + +// foreach (var m in (recorder.MACHINECODDE + "").Split(',')) +// { +// var machinelist = comMachineCode.Items.Cast(); +// var machine = machinelist.FirstOrDefault(p => p.MACHINECODDE == m); +// var index = comMachineCode.Items.IndexOf(machine); +// if (index >= 0) +// { +// this.comMachineCode.SetItemChecked(index, true); +// } +// } +// var project_A_mtypes = (recorder.MATERIALTYPE + "").Split(';'); +// if (project_A_mtypes.Length == 2) +// { +// foreach (var p in project_A_mtypes[0].Split(',')) +// { +// var projectlist = cbProject.Items.Cast(); +// var project = projectlist.FirstOrDefault(o => o.PROJECT_CODE == p); +// var index = cbProject.Items.IndexOf(project); +// if (index >= 0) +// { +// this.cbProject.SetItemChecked(index, true); +// } +// } + +// foreach (var t in project_A_mtypes[1].Split(',')) +// { +// var typelist = comMaterialType.Items.Cast(); +// var mtype = typelist.FirstOrDefault(o => o.MATERIAL_TYPE_NAME == t); +// var index = comMaterialType.Items.IndexOf(mtype); +// if (index >= 0) +// { +// this.comMaterialType.SetItemChecked(index, true); +// } +// } +// } + +// } +// #endregion +// } + +// /// +// /// 窗体保存事件 +// /// +// /// +// /// +// private void tsbSave_Click(object sender, EventArgs e) +// { +// //窗体数据校验 +// string errorMessae = ErrorCheck(); +// if (errorMessae != "") +// { +// MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); +// return; +// } + +// #region 加载保存信息 +// //判断是否有物料号 + +// recorder.MATERIALCODE = this.comMaterialCode.SelectedValue.ToString(); + +// //原材料信息 +// var mateial = (this.comMaterialCode.DataSource as List).Where(m => m.MATERIAL_CODE == recorder.MATERIALCODE); +// if (mateial.Count() > 0) +// { +// MD.Entity.Material materielInfo = mateial.First(); +// recorder.MATERIALNAME = materielInfo.MATERIAL_NAME; + +// } + +// string projects = string.Join(",", cbProject.CheckedItems.Cast().Select(p => p.PROJECT_CODE).ToArray()); +// string materialtypes = string.Join(",", comMaterialType.CheckedItems.Cast().Select(p => p.MATERIAL_TYPE_NAME).ToArray()); +// recorder.MATERIALTYPE = projects + ";" + materialtypes; +// //获取设备信息 +// var selectmachines = this.comMachineCode.CheckedItems.Cast(); +// recorder.MACHINECODDE = string.Join(",", selectmachines.Select(p => p.MACHINECODDE)); +// recorder.MACHINENAME = string.Join(",", selectmachines.Select(p => p.MACHINENAME_SHORT)); +// recorder.MACHINETYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); +// //工序类别 +// recorder.PROCESSTYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); +// //投料信息 +// //recorder.MATERIALTYPE = this.comMaterialType.SelectedValue.ToString(); +// //重量 +// recorder.METERIALWEIGHT = Convert.ToInt32(this.txtMeterialWeight.Text); +// //批次 +// recorder.MATERIALBATCH = this.txtMaterialBatch.Text; +// recorder.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); +// //操作人 +// recorder.CREATEUSER = this.comOpreator.SelectedValue.ToString().Trim(); +// recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME;//班组 +// recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE;//班组 +// #endregion + +// #region 保存 +// QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); +// DataResult result;//判断是否成功 +// if (string.IsNullOrEmpty(recorder.PID) == true) +// { +// result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Insert.ToString(), recorder); +// } +// else +// { +// result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Update.ToString(), recorder); +// } +// //保存成功 +// MessageBox.Show(result.Msg); +// if (result.IsSuccess) +// { +// this.DialogResult = System.Windows.Forms.DialogResult.OK; +// this.Close(); +// } +// #endregion +// } + +// /// +// /// 窗体关闭 +// /// +// /// +// /// +// private void tsbClose_Click(object sender, EventArgs e) +// { +// this.Close(); +// } + + + +// /// +// ///错误检测 +// /// +// /// +// private string ErrorCheck() +// { +// #region 校验 +// string strMessage = ""; + + +// //物料号 +// if (this.comMaterialCode.SelectedValue == null || this.comMaterialCode.SelectedValue == string.Empty) +// { +// strMessage += Resource1.MaterialCodeNullValidate + "\r\n"; +// } + +// //设备 +// if (this.comMachineCode.CheckedItems.Count <= 0) +// { +// strMessage += Resource1.InjectionMachineNullValidate + "\r\n"; +// } +// //物料类别 +// if (this.comMaterialType.CheckedItems.Count <= 0) +// { +// strMessage += "零件类别不能为空!" + "\r\n"; +// } +// //产品 +// if (this.cbProject.CheckedItems.Count <= 0) +// { +// strMessage += "请选择产品!" + "\r\n"; +// } + +// //操作人 +// if (this.comOpreator.SelectedValue == null || this.comOpreator.SelectedValue == string.Empty) +// { +// strMessage += Resource1.OpreatorNullValidate + "\r\n"; +// } +// //批次 +// if (this.txtMaterialBatch.Text == string.Empty) +// { +// strMessage += Resource1.MaterialBatchNullValidate + "\r\n"; +// } + + + + +// return strMessage; +// #endregion +// } + +// private void comMaterialCode_SelectedIndexChanged(object sender, EventArgs e) +// { +// if (this.comMaterialCode.SelectedValue != null && this.comMaterialCode.SelectedValue != string.Empty) +// { +// this.txtMeterialWeight.Text = (this.comMaterialCode.SelectedItem as MD.Entity.Material).WEIGHT.ToString(); +// } +// } + +// private void comMaterialType_SelectedIndexChanged(object sender, EventArgs e) +// { +// if (this.comMaterialType.SelectedValue != null && this.comMaterialType.SelectedValue.Equals(EnumGeter.MATERIALTYPE.jinshuzhijia.GetHashCode().ToString())) +// { +// //this.comIsHadNo.SelectedIndex = 0; +// //this.comIsHadNo.Enabled = false; +// this.label13.Visible = false; +// this.txtMaterialBatch.Visible = false; +// this.label9.Text = "数量(个):"; +// this.label12.Visible = false; +// } +// else +// { +// //this.comIsHadNo.Enabled = true; +// this.label13.Visible = true; +// this.txtMaterialBatch.Visible = true; +// this.label9.Text = "重量(KG):"; +// this.label12.Visible = true; +// } +// } +// } +//} diff --git a/.svn/pristine/87/87cd855781d43ddc05c34b015aced90d40193f9a.svn-base b/.svn/pristine/87/87cd855781d43ddc05c34b015aced90d40193f9a.svn-base new file mode 100644 index 0000000..be3c242 --- /dev/null +++ b/.svn/pristine/87/87cd855781d43ddc05c34b015aced90d40193f9a.svn-base @@ -0,0 +1,288 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑料筒信息 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketInfoDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketInfo Get(BucketInfo info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BucketInfo Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_BUCKETINFO] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BucketInfo condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetALL() + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_MD_BUCKETINFO WHERE IsCheck<> '1'"; + //分页关键字段及排序 + var LIST = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + LIST = session.GetList(sql, parameters.ToArray()).ToList(); + } + return LIST; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(BucketInfo condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + + //构成查询语句 + sqlBuilder.Append("SELECT PID,BucketCode,BucketName,IsCheck,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_MD_BUCKETINFO "); + whereBuilder.Append(" AND IsCheck<> '1' "); + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(BucketInfo info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_BUCKETINFO"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BucketInfo info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(BucketInfo info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_BUCKETINFO "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/89/8999c5abd960e58cb9dfb8baa9e74ca68227b7bd.svn-base b/.svn/pristine/89/8999c5abd960e58cb9dfb8baa9e74ca68227b7bd.svn-base new file mode 100644 index 0000000..d02eaec --- /dev/null +++ b/.svn/pristine/89/8999c5abd960e58cb9dfb8baa9e74ca68227b7bd.svn-base @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity +{ + /// + /// 模块名称:缺陷表 + /// 作 者:张松男 + /// 编写日期:2021年5月26日 + /// + [DBTable(TableName = "T_AW_MENDRECORDERERP")] + public class DefectDict : BaseEntity + { + /// + /// 缺陷表主键 + /// + [Description("缺陷表主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 类型编号 DEFECTCODE 查询作废编码 + /// + [Description("类型编号")] + [DBColumn(ColumnName = "MFGCODETYPE", DataType = DbType.String)] + public string MFGCODETYPE { get; set; } + + /// + /// 类型名称 + /// + [Description("类型名称")] + [DBColumn(ColumnName = "MFGCODETYPENAME", DataType = DbType.String)] + public string MFGCODETYPENAME { get; set; } + + /// + /// 空 + /// + [Description("空")] + [DBColumn(ColumnName = "TYPE_CODE", DataType = DbType.String)] + public string TYPE_CODE { get; set; } + + /// + /// 缺陷编码 + /// + [Description("缺陷编码")] + [DBColumn(ColumnName = "MFGCODE", DataType = DbType.String)] + public string MFGCODE { get; set; } + + /// + /// 缺陷名称 + /// + [Description("缺陷名称")] + [DBColumn(ColumnName = "MFGNAME", DataType = DbType.String)] + public string MFGNAME { get; set; } + + } +} diff --git a/.svn/pristine/8b/8b977ef0d2561cad3d71602a23e11b429325e52c.svn-base b/.svn/pristine/8b/8b977ef0d2561cad3d71602a23e11b429325e52c.svn-base new file mode 100644 index 0000000..67522c0 --- /dev/null +++ b/.svn/pristine/8b/8b977ef0d2561cad3d71602a23e11b429325e52c.svn-base @@ -0,0 +1,948 @@ + + + + EpidermisBLL + 表皮查询 + QMAPP.FJC.BLL.FeedInManage.EpidermisBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialCodeBLL + 物料号查询 + QMAPP.FJC.BLL.Operation.MaterialCodeBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.DLL + + + + + + FISOrderBLL + FIS计划查询 + QMAPP.FJC.BLL.FIS.FISOrderBLL + QMAPP.FJC.BLL.DLL + + + + + + OrderPlanBLL + 注塑管理计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + DashBoardPlanBLL + 仪表板计划 + QMAPP.FJC.BLL.FIS.DashBoardPlanBLL + QMAPP.FJC.BLL.DLL + + + + + DoorPlankPlanBLL + 门板计划 + QMAPP.FJC.BLL.FIS.DoorPlankPlanBLL + QMAPP.FJC.BLL.DLL + + + + + FrmPlaceBLL + 发运模块 + QMAPP.FJC.BLL.FrmPlace.FrmPlaceBLL + QMAPP.FJC.BLL.DLL + + + + StocktakingBLL + 库存盘点 + QMAPP.FJC.BLL.Stocktaking.StocktakingBLL + QMAPP.FJC.BLL.DLL + + + + + FISOrderSendBLL + FIS订单发货信息 + QMAPP.FJC.BLL.FIS.FISOrderSendBLL + QMAPP.FJC.BLL.DLL + + + + + OrderPlanBLL + 订单生产计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + + + + + + + + + + UnQualityProductBLL + 不合格品数量 + QMAPP.FJC.BLL.Basic.UnQualityProductBLL + QMAPP.FJC.BLL.DLL + + + + WorkCenterBLL + 工作中心信息 + QMAPP.FJC.BLL.Basic.WorkCenterBLL + QMAPP.FJC.BLL.DLL + + + + CapacityBLL + 班次产能 + QMAPP.FJC.BLL.Basic.CapacityBLL + QMAPP.FJC.BLL.DLL + + + + + ProcessRouteBLL + 工艺路线 + QMAPP.FJC.BLL.Basic.ProcessRouteBLL + QMAPP.FJC.BLL.DLL + + + + BomHdrBLL + Bom信息维护 + QMAPP.FJC.BLL.Basic.BomHdrBLL + QMAPP.FJC.BLL.DLL + + + + MaterielBLL + 物料号信息 + QMAPP.FJC.BLL.Basic.MaterielBLL + QMAPP.FJC.BLL.DLL + + + + + MaterielVersionBLL + 物料类型信息 + QMAPP.FJC.BLL.Basic.MaterielVersionBLL + QMAPP.FJC.BLL.DLL + + + + + MachineInfoBLL + 设备信息 + QMAPP.FJC.BLL.Basic.MachineInfoBLL + QMAPP.FJC.BLL.DLL + + + + MachineInfoModelBLL + 设备模具信息 + QMAPP.FJC.BLL.Basic.MachineInfoModelBLL + QMAPP.FJC.BLL.DLL + + + + MouldBLL + 模具信息 + QMAPP.FJC.BLL.Equipment.MouldBLL + QMAPP.FJC.BLL.DLL + + + + ProduceShiftBLL + 班次信息 + QMAPP.FJC.BLL.Basic.ProduceShiftBLL + QMAPP.FJC.BLL.DLL + + + + ProductCodeIdentityBLL + 零件条码标识 + QMAPP.FJC.BLL.Basic.ProductCodeIdentityBLL + QMAPP.FJC.BLL.DLL + + + + OperatorInfoBLL + 操作员 + QMAPP.FJC.BLL.Basic.OperatorInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessInfoBLL + 工序名称 + QMAPP.FJC.BLL.Basic.ProcessInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessSetBLL + 工序设置 + QMAPP.FJC.BLL.Basic.ProcessSetBLL + QMAPP.FJC.BLL.DLL + + + + ProcessRuleBLL + 工序先决条件 + QMAPP.FJC.BLL.Basic.ProcessRuleBLL + QMAPP.FJC.BLL.DLL + + + + ProcessParameterBLL + 加工参数标准值设定 + QMAPP.FJC.BLL.Basic.ProcessParameterBLL + QMAPP.FJC.BLL.DLL + + + + ProductMderuleBLL + 投料配置规则 + QMAPP.FJC.BLL.Basic.ProductMderuleBLL + QMAPP.FJC.BLL.DLL + + + + MaterialShelfTypeBLL + 物料架类型维护 + QMAPP.FJC.BLL.Basic.MaterialShelfTypeBLL + QMAPP.FJC.BLL.DLL + + + + + InjectionRecorderBLL + 注塑投料记录 + QMAPP.FJC.BLL.Injection.InjectionRecorderBLL + QMAPP.FJC.BLL.DLL + + + + SlushRecorderBLL + 搪塑投料记录 + QMAPP.FJC.BLL.Injection.SlushRecorderBLL + QMAPP.FJC.BLL.DLL + + + + PouringRecorderBLL + 浇注投料记录 + QMAPP.FJC.BLL.Injection.PouringRecorderBLL + QMAPP.FJC.BLL.DLL + + + + ProductBLL + 零件条码 + QMAPP.FJC.BLL.Operation.ProductBLL + QMAPP.FJC.BLL.DLL + + + + ProductBasicBLL + 零件类别 + QMAPP.FJC.BLL.Basic.ProductBasicBLL + QMAPP.FJC.BLL.DLL + + + + ProductInfoBLL + 零件号 + QMAPP.FJC.BLL.Basic.ProductInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProductAttributeBLL + 零件条码属性 + QMAPP.FJC.BLL.Operation.ProductAttributeBLL + QMAPP.FJC.BLL.DLL + + + + EquipmentMaintainBLL + 设备停机维护 + QMAPP.FJC.BLL.Equipment.EquipmentMaintainBLL + QMAPP.FJC.BLL.DLL + + + + + ProductInjectionBLL + 投料与零件关联 + QMAPP.FJC.BLL.Operation.ProductInjectionBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanInfoBLL + 贴车单记录 + QMAPP.FJC.BLL.SendPlan.SendPlanInfoBLL + QMAPP.FJC.BLL.DLL + + + + MainBLL + 加工本体 + QMAPP.FJC.BLL.Operation.MainBLL + QMAPP.FJC.BLL.DLL + + + + ProductEndBLL + 成品查询 + QMAPP.FJC.BLL.Operation.ProductEndBLL + QMAPP.FJC.BLL.DLL + + + + MainProductBLL + 主体与零件关联关系 + QMAPP.FJC.BLL.Operation.MainProductBLL + QMAPP.FJC.BLL.DLL + + + + SPCControlBLL + SPC监控 + QMAPP.FJC.BLL.IPC.SPCControlBLL + QMAPP.FJC.BLL.DLL + + + + ProducePlanBLL + 生产记录维护 + QMAPP.FJC.BLL.ProduceManage.ProducePlanBLL + QMAPP.FJC.BLL.DLL + + + + UnQualityBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.UnQualityBLL + QMAPP.FJC.BLL.DLL + + + + MainOperationBLL + 加工查询 + QMAPP.FJC.BLL.Operation.MainOperationBLL + QMAPP.FJC.BLL.DLL + + + + ProductArchivesBLL + 产品档案 + QMAPP.FJC.BLL.ProductPetrospect.ProductArchivesBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentAlarmBLL + 设备报警维护 + QMAPP.FJC.BLL.WarnManage.EquipMentAlarmBLL + QMAPP.FJC.BLL.DLL + + + + WarnManageBLL + 自动报警维护 + QMAPP.FJC.BLL.WarnManage.WarnManageBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentMaintainSearchBLL + 设备停机记录 + QMAPP.FJC.BLL.WarnManage.EquipMentMaintainSearchBLL + QMAPP.FJC.BLL.DLL + + + + StorageAlarmBLL + 低储报警信息 + QMAPP.FJC.BLL.WIPManage.StorageAlarmBLL + QMAPP.FJC.BLL.DLL + + + + DetentionBLL + 滞留品查询 + QMAPP.FJC.BLL.WIPManage.DetentionBLL + QMAPP.FJC.BLL.DLL + + + + + + MendRecorderBLL + 返修记录 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + + MainProductCountBLL + 成品数量查询 + QMAPP.FJC.BLL.Operation.MainProductCountBLL + QMAPP.FJC.BLL.dll + + + + WIPInventoryBLL + 在制品库存 + QMAPP.FJC.BLL.WIPManage.WIPInventoryBLL + QMAPP.FJC.BLL.DLL + + + WIPInRecorderBLL + 在制品入库信息 + QMAPP.FJC.BLL.WIPManage.WIPInRecorderBLL + QMAPP.FJC.BLL.DLL + + + WIPOutRecorderBLL + 在制品出库信息 + QMAPP.FJC.BLL.WIPManage.WIPOutRecorderBLL + QMAPP.FJC.BLL.DLL + + + + WIPProductCountBLL + 在制品数量查询 + QMAPP.FJC.BLL.WIPManage.WIPProductCountBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanRecordBLL + 贴车单查询 + QMAPP.FJC.BLL.SendManage.SendPlanRecordBLL + QMAPP.FJC.BLL.DLL + + + FISInfoBLL + FIS M100生产信息查询 + QMAPP.FJC.BLL.FIS.FISInfoBLL + QMAPP.FJC.BLL.DLL + + + CheckWipBLL + 定时查询在制品库存 + QMAPP.FJC.BLL.WipService.CheckWipBLL + QMAPP.FJC.BLL.DLL + + + + FisBLL + 返修记录 + QMAPP.FJC.BLL.FIS.FisBLL + QMAPP.FJC.BLL.DLL + + + + + ScrapRecordBLL + 报废记录 + QMAPP.FJC.BLL.ProduceManage.ScrapRecordBLL + QMAPP.FJC.BLL.DLL + + + + OutWarehouseBLL + FISM100接口 + QMAPP.FJC.BLL.WarehouseManage.OutWarehouseBLL + QMAPP.FJC.BLL.DLL + + + InWarehouseBLL + 入库操作 + QMAPP.FJC.BLL.WarehouseManage.InWarehouseBLL + QMAPP.FJC.BLL.DLL + + + + FileCopyRecordBLL + 文件复制 + QMAPP.FJC.BLL.FileCopy.FileCopyRecordBLL + QMAPP.FJC.BLL.DLL + + + + MoldConfigBLL + 模具配置信息 + QMAPP.FJC.BLL.Basic.MoldConfigBLL + QMAPP.FJC.BLL.DLL + + + + MoldSetBLL + 模腔配置信息 + QMAPP.FJC.BLL.Basic.MoldSetBLL + QMAPP.FJC.BLL.DLL + + + + CastCounterBLL + 模腔配置信息 + QMAPP.FJC.BLL.Operation.CastCounterBLL + QMAPP.FJC.BLL.DLL + + + + InjectionCheckBLL + 注塑查验信息 + QMAPP.FJC.BLL.Operation.InjectionCheckBLL + QMAPP.FJC.BLL.DLL + + + + DefectTypeBLL + 缺陷类型 + QMAPP.FJC.BLL.ProduceManage.DefectTypeBLL + QMAPP.FJC.BLL.DLL + + + + PrintModelCopyBLL + 获取打印模板 + QMAPP.FJC.BLL.Basic.PrintModelCopyBLL + QMAPP.FJC.BLL.DLL + + + + CompleteStatisticsBLL + 完工统计Business + QMAPP.FJC.BLL.CompleteStatistics.CompleteStatisticsBLL + QMAPP.FJC.BLL.DLL + + + + ShipmentMonitorBLL + 发运看板 + QMAPP.FJC.BLL.Monitor.ShipmentMonitorBLL + QMAPP.FJC.BLL.DLL + + + + LineDWQTYCountBLL + 生产日报 + QMAPP.MESReport.BLL.LineQTY.LineDWQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + LineShiftQTYCountBLL + 班次对比分析 + QMAPP.MESReport.BLL.LineQTY.LineShiftQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + ShipmentCountBLL + 生产发运统计 + QMAPP.MESReport.BLL.LineQTY.ShipmentCountBLL + QMAPP.MESReport.BLL.DLL + + + + StandardRateCountBLL + 合格率分析 + QMAPP.MESReport.BLL.LineQTY.StandardRateCountBLL + QMAPP.MESReport.BLL.DLL + + + DAIBLL + 完工统计Business + QMAPP.FJC.BLL.QT.DAIBLL + QMAPP.FJC.BLL.DLL + + + BarcodeRulesBLL + 条码规则数据服务 + QMAPP.FJC.BLL.Basic.BarcodeRulesBLL + QMAPP.FJC.BLL.dll + + + DAI + 条码规则数据服务 + QMAPP.FJC.TRACING.DAHandler.DataAcquirer + QMAPP.FJC.TRACING.dll + + + DAICacheBLL + 采集缓存数据服务 + QMAPP.FJC.BLL.QT.DAICacheBLL + QMAPP.FJC.BLL.dll + + + DAIValidationBLL + 采集校验服务 + QMAPP.FJC.BLL.QT.DAIValidationBLL + QMAPP.FJC.BLL.dll + + + MeterReadingsBLL + 设备能耗统计 + QMAPP.FJC.BLL.EnergyManage.MeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + QTYInfoCountBLL + 生产统计 + QMAPP.MESReport.BLL.LineQTY.QTYInfoCountBLL + QMAPP.MESReport.BLL.DLL + + + + EmMeterReadingsBLL + 能源统计 + QMAPP.FJC.BLL.EM.EmMeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + MeterBLL + 能源表维护 + QMAPP.FJC.BLL.EnergyManage.MeterBLL + QMAPP.FJC.BLL.DLL + + + + mbM100BLL + 门板FIS数据获取 + QMAPP.FJC.BLL.QdFis.mbM100BLL + QMAPP.FJC.BLL.DLL + + + + ybbM100BLL + 仪表板FIS数据获取 + QMAPP.FJC.BLL.QdFis.ybbM100BLL + QMAPP.FJC.BLL.DLL + + + + QTYCompletionRateBLL + 生产完成率分析 + QMAPP.MESReport.BLL.LineQTY.QTYCompletionRateBLL + QMAPP.MESReport.BLL.DLL + + + + WorkOrderBLL + 派工单 + QMAPP.FJC.BLL.ProductionPlan.WorkOrderBLL + QMAPP.FJC.BLL.dll + + + + + WasteRateCountBLL + 废品率统计 + QMAPP.MESReport.BLL.LineQTY.WasteRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + ProduceCycleTimeBLL + 节拍统计 + QMAPP.MESReport.BLL.LineQTY.ProduceCycleTimeBLL + QMAPP.MESReport.BLL.DLL + + + + RepairRateCountBLL + 返修率统计 + QMAPP.MESReport.BLL.LineQTY.RepairRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + EquConsumeCountBLL + 设备用电分析 + QMAPP.MESReport.BLL.LineQTY.EquConsumeCountBLL + QMAPP.MESReport.BLL.DLL + + + + EqueUseCountBLL + 设备利用率分析 + QMAPP.MESReport.BLL.LineQTY.EqueUseCountBLL + QMAPP.MESReport.BLL.DLL + + + + AnDongCallBLL + 安东呼叫统计 + QMAPP.MESReport.BLL.LineQTY.AnDongCallBLL + QMAPP.MESReport.BLL.DLL + + + + + ProcessRecordBLL + 加工记录 + QMAPP.FJC.BLL.QT.ProcessRecordBLL + QMAPP.FJC.BLL.dll + + + + VideoInfoBLL + 视频播放 + QMAPP.FJC.BLL.ODS.VideoInfoBLL + QMAPP.FJC.BLL.DLL + + + + VideoTypeBLL + 视频类型 + QMAPP.FJC.BLL.ODS.VideoTypeBLL + QMAPP.FJC.BLL.DLL + + + + AndonCallBLL + 安东呼叫 + QMAPP.FJC.BLL.Andon.AndonCallBLL + QMAPP.FJC.BLL.DLL + + + + MachineCheckBLL + 设备点检 + QMAPP.FJC.BLL.MachineCheck.MachineCheckBLL + QMAPP.FJC.BLL.DLL + + + + UsageLogBLL + 模具统计 + QMAPP.FJC.BLL.Equipment.UsageLogBLL + QMAPP.FJC.BLL.DLL + + + + TempProductBLL + 模具资料获取 + QMAPP.FJC.BLL.Equipment.TempProductBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentRecordBLL + 设备维修记录 + QMAPP.FJC.BLL.Equipment.EquipMentRecordBLL + QMAPP.FJC.BLL.DLL + + + + ProductOutBLL + 出库 + QMAPP.FJC.BLL.Operation.ProductOutBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库查询 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.dll + + + + MaterialBindingBLL + 物料信息绑定关系 + QMAPP.FJC.BLL.QT.MaterialBindingBLL + QMAPP.FJC.BLL.dll + + + + AnalyzerBLL + 解析类别 + QMAPP.FJC.BLL.QT.AnalyzerBLL + QMAPP.FJC.BLL.dll + + + + + ProductCheckBLL + 抽检 + QMAPP.FJC.BLL.Operation.ProductCheckBLL + QMAPP.FJC.BLL.dll + + + + PackageBLL + 线边库存大屏显示 + QMAPP.FJC.BLL.Package.PackageBLL + QMAPP.FJC.BLL.dll + + + + MainCodeChangeBLL + 总成条码替换 + QMAPP.FJC.BLL.Operation.MainCodeChangeBLL + QMAPP.FJC.BLL.DLL + + + + MendRecorderBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + FISPhraseBLL + FIS短语字典 + QMAPP.FJC.BLL.FIS.FISPhraseBLL + QMAPP.FJC.BLL.DLL + + + LeakInspectRecordBLL + 漏装检测记录 + QMAPP.FJC.BLL.InterfaceData.LeakInspectRecordBLL + QMAPP.FJC.BLL.DLL + + + AppConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.AppConfigBLL + QMAPP.FJC.BLL.DLL + + + PbomItemBLL + BOM明细 + QMAPP.FJC.BLL.Operation.PbomItemBLL + QMAPP.FJC.BLL.DLL + + + ScanIPConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.ScanIPConfigBLL + QMAPP.FJC.BLL.DLL + + + aterialBomConfigBLLBLL + 配置表 + QMAPP.FJC.BLL.Basic.aterialBomConfigBLLBLL + QMAPP.FJC.BLL.DLL + + + + + BZDConfigBLL + BZD配置 + QMAPP.FJC.BLL.BZD.BZDConfigBLL + QMAPP.FJC.BLL.DLL + + + + BZDRecorderBLL + BZD记录 + QMAPP.FJC.BLL.BZD.BZDRecorderBLL + QMAPP.FJC.BLL.DLL + + + + BarCodeReplacementBLL + 补打记录 + QMAPP.FJC.BLL.BZD.BarCodeReplacementBLL + QMAPP.FJC.BLL.DLL + + + + CHECKTIMEBLL + 时间验证 + QMAPP.FJC.BLL.CheckTime.CHECKTIMEBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialBomConfigBLL + 配置查找 + QMAPP.FJC.BLL.Basic.MaterialBomConfigBLL + QMAPP.FJC.BLL.DLL + + + + BucketInfoBLL + 料筒信息 + QMAPP.FJC.BLL.Bucket.BucketInfoBLL + QMAPP.FJC.BLL.DLL + + + + BucketMaterialBLL + 料筒绑定信息 + QMAPP.FJC.BLL.Bucket.BucketMaterialBLL + QMAPP.FJC.BLL.DLL + + + + BucketMaterialClassBLL + 零件号绑定信息 + QMAPP.FJC.BLL.Bucket.BucketMaterialClassBLL + QMAPP.FJC.BLL.DLL + + + + RawMaterialBLL + 注塑投料信息 + QMAPP.FJC.BLL.Bucket.RawMaterialBLL + QMAPP.FJC.BLL.DLL + + + + RawMaterialRecordBLL + 注塑打印记录 + QMAPP.FJC.BLL.Bucket.RawMaterialRecordBLL + QMAPP.FJC.BLL.DLL + + + + TSWeighRecoreBLL + 注塑打印记录 + QMAPP.FJC.BLL.Bucket.TSWeighRecoreBLL + QMAPP.FJC.BLL.DLL + + + \ No newline at end of file diff --git a/.svn/pristine/8c/8c61bd25fe9635ae868a936aab05bfbf346c5151.svn-base b/.svn/pristine/8c/8c61bd25fe9635ae868a936aab05bfbf346c5151.svn-base new file mode 100644 index 0000000..064f9c3 Binary files /dev/null and b/.svn/pristine/8c/8c61bd25fe9635ae868a936aab05bfbf346c5151.svn-base differ diff --git a/.svn/pristine/8d/8de9833840068efb2a77f66c9862f6cf2a8bbc14.svn-base b/.svn/pristine/8d/8de9833840068efb2a77f66c9862f6cf2a8bbc14.svn-base new file mode 100644 index 0000000..17c9c48 --- /dev/null +++ b/.svn/pristine/8d/8de9833840068efb2a77f66c9862f6cf2a8bbc14.svn-base @@ -0,0 +1,4503 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace QMAPP.ServicesAgent +{ + /// + /// 示例服务方法枚举 + /// + [Description("示例服务方法枚举")] + public enum ExampleService + { + /// + /// 获取用户列表 + /// + [Description("获取用户列表")] + UserManageBLL_GetList + } + + /// + /// 系统服务方法枚举 + /// + [Description("系统服务方法枚举")] + public enum SystemService + { + /// + /// 服务初始化 + /// + [Description("服务初始化")] + ServiceInit, + + #region 通知管理 + + /// + /// 获取通知信息 + /// + [Description("获取通知信息")] + NoticeManageBll_Get, + /// + /// 根据通知ID,从通知浏览记录表中,获取发送目标 + /// + [Description("根据通知ID,从通知浏览记录表中,获取发送目标 ")] + NoticeManageBll_GetSendaimIdList, + /// + /// 获取用户 + /// + [Description("获取用户")] + NoticeManageBll_GetUser, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_DeleteNotice, + + /// + /// 删除原附件 + /// + [Description("删除原附件")] + NoticeManageBll_DeleteFile, + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + NoticeManageBll_ExistsFile, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_Save, + + /// + /// 获取未读通知 + /// + [Description("获取未读通知")] + NoticeManageBll_GetNotReadNotice, + /// + /// 获取未读即时通知 + /// + [Description("获取未读即时通知")] + NoticeManageBll_GetNotReadInstantNotice, + /// + /// 获取通知列表 + /// + [Description("获取通知列表")] + NoticeManageBll_GetList, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowse, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowseModel, + /// + /// 更新通知浏览记录为已浏览 + /// + [Description("更新通知浏览记录为已浏览")] + NoticeManageBll_UpdateNoticeBrowse, + /// + /// 获取通知浏览记录列表 + /// + [Description("获取通知浏览记录列表")] + NoticeManageBll_GetBrowseList, + /// + /// 获取导出通知信息 + /// + [Description("获取导出通知信息")] + NoticeManageBll_GetExportData, + /// + /// 定时删除超过六个月的通知浏览记录 + /// + [Description("定时删除超过六个月的通知浏览记录")] + NoticeManageBll_DeleteNoticeBrowse, + /// + /// 获取联系人列表 + /// + [Description("获取联系人列表")] + NoticeManageBll_GetNoticeUserList, + /// + /// 获取组织结构树形集合 + /// + [Description("获取组织结构树形集合")] + NoticeManageBll_GetAllList, + #endregion + + #region 文件管理 + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileInfoBLL_Get, + + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + FileInfoBLL_ExistsFile, + + /// + /// 获取文件信息列表 + /// + [Description("获取文件信息列表")] + FileInfoBLL_GetList, + /// + /// 删除附件 + /// + [Description("删除附件")] + FileInfoBLL_DeleteFile, + /// + /// 删除文件信息 + /// + [Description("删除文件信息")] + FileInfoBLL_Delete, + /// + /// 获取导出文件信息 + /// + [Description("获取导出文件信息")] + FileInfoBLL_GetExportData, + + + /// + /// 插入文件信息 + /// + [Description("插入文件信息")] + FileInfoBLL_Insert, + /// + /// 更新文件信息 + /// + [Description("更新文件信息")] + FileInfoBLL_Update, + + #endregion + + #region 文件类型管理 + /// + /// 获取文件类型 + /// + [Description("获取文件类型")] + FileTypeBLL_Get, + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileTypeBLL_Delete, + /// + /// 获取文件类型树状列表 + /// + [Description("获取文件类型树状列表")] + FileTypeBLL_GetAllList, + + /// + /// 获取文件类型列表 + /// + [Description("获取文件类型列表")] + FileTypeBLL_GetList, + + /// + /// 插入文件类型 + /// + [Description("插入文件类型")] + FileTypeBLL_Insert, + + /// + /// 修改文件类型 + /// + [Description("修改文件类型")] + FileTypeBLL_Update, + + /// + /// 获取文件分类下拉列表 + /// + [Description("获取文件分类下拉列表")] + FileTypeBLL_GetCombox + #endregion + + } + + + #region 基础数据方法枚举 + + /// + /// 基础数据方法枚举 + /// + [Description("基础数据方法枚举")] + public enum DictService + { + #region 工厂信息 + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList, + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList1, + + /// + /// 获取工厂信息(字典) + /// + [Description("获取工厂字典")] + FactoryBLL_GetFactorys, + + /// + /// 获取工厂信息 + /// + [Description("获取工厂信息")] + FactoryBLL_Get, + + /// + /// 根据主键获取工厂信息 + /// + [Description("根据主键获取工厂信息")] + FactoryBLL_GetFactoryByPk, + + /// + /// 插入工厂信息 + /// + [Description("插入工厂信息")] + FactoryBLL_Insert, + + /// + /// 删除工厂信息 + /// + [Description("删除工厂信息")] + FactoryBLL_Delete, + /// + /// 更新工厂信息 + /// + [Description("工厂更新信息")] + FactoryBLL_Update, + + /// + /// 工厂信息导出 + /// + [Description("工厂信息导出")] + FactoryBLL_GetExportData, + + /// + /// 工厂信息导入 + /// + [Description("工厂信息导入")] + FactoryBLL_GetImportData, + + /// + /// 检验工厂编号是否重复 + /// + [Description("检验工厂编号")] + FactoryBLL_ExistsFactory, + /// + /// 根据工位查找工厂 + /// + [Description("根据工位查找工厂")] + DictManagerBLL_GetWerksList, + /// + /// 根据工厂查找工位 + /// + [Description("根据工厂查找工位")] + DictManagerBLL_GetWorkSationListFor, + #endregion + + #region 母车信息 + + + /// + /// 获取母车信息列表 + /// + [Description("获取母车信息列表")] + MotherCarTypeBLL_GetList, + + /// + /// 获取母车信息列表 + /// + [Description("获取母车字典")] + MotherCarTypeBLL_GetMotherCarTypes, + + /// + /// 获取母车信息 + /// + [Description("获取母车信息")] + MotherCarTypeBLL_Get, + + /// + /// 插入母车信息 + /// + [Description("插入母车信息")] + MotherCarTypeBLL_Insert, + + /// + /// 删除母车信息 + /// + [Description("删除母车信息")] + MotherCarTypeBLL_Delete, + /// + /// 更新母车信息 + /// + [Description("更新母车信息")] + MotherCarTypeBLL_Update, + + /// + /// 母车信息导出 + /// + [Description("母车信息导出")] + MotherCarTypeBLL_GetExportData, + + /// + /// 母车信息数据导入 + /// + [Description("母车信息数据导入")] + MotherCarTypeBLL_GetImportData, + + /// + /// 检验母车编号是否重复 + /// + [Description("检验母车编号")] + MotherCarTypeBLL_ExistsMotherCarType, + + #endregion + + #region 子车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子车信息列表")] + SonCarTypeBLL_GetList, + + /// + /// 获取子车信息 + /// + [Description("获取子车信息")] + SonCarTypeBLL_Get, + + /// + /// 获取子车信息 + /// + [Description("获取子车字典")] + SonCarTypeBLL_GetSonCarTypes, + + /// + /// 插入子车信息 + /// + [Description("插入子车信息")] + SonCarTypeBLL_Insert, + + /// + /// 删除子车信息 + /// + [Description("删除子车信息")] + SonCarTypeBLL_Delete, + /// + /// 更新子车信息 + /// + [Description("更新子车信息")] + SonCarTypeBLL_Update, + + /// + /// 子车信息导出 + /// + [Description("子车信息导出")] + SonCarTypeBLL_GetExportData, + + /// + /// 子车信息数据导入 + /// + [Description("子车信息数据导入")] + SonCarTypeBLL_GetImportData, + + /// + /// 检验子车编号是否重复 + /// + [Description("检验子车编号")] + SonCarTypeBLL_ExistsSonCarType, + #endregion + + #region 子母车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子母车信息列表")] + MotherSonRelationManageBLL_GetList, + + /// + /// 获取子母车信息 + /// + [Description("获取子母车信息")] + MotherSonRelationManageBLL_Get, + + // + /// 子母车信息重复检验 + /// + [Description("子母车信息重复检验")] + MotherSonRelationManageBLL_ExistsMotherSonRelation, + + /// + /// 插入子母车信息 + /// + [Description("插入子母车信息")] + MotherSonRelationManageBLL_Insert, + + /// + /// 删除子母车信息 + /// + [Description("删除子母车信息")] + MotherSonRelationManageBLL_Delete, + /// + /// 更新子母车信息 + /// + [Description("更新子母车信息")] + MotherSonRelationManageBLL_Update, + + /// + /// 子母车信息导出 + /// + [Description("子母车信息导出")] + MotherSonRelationManageBLL_GetExportData, + + /// + /// 子母车信息数据导入 + /// + [Description("子母车信息数据导入")] + MotherSonRelationManageBLL_GetImportData, + + #endregion + + #region 退货原因信息 + + /// + /// 退货原因信息列表 + /// + [Description("获取退货原因信息列表")] + ReturnReasonManageBLL_GetList, + + /// + ///退货原因信息 + /// + [Description("获取退货原因信息")] + ReturnReasonManageBLL_Get, + + /// + /// 插入退货原因信息 + /// + [Description("插入退货原因信息")] + ReturnReasonManageBLL_Insert, + + /// + /// 退货编号重复校验 + /// + [Description("退货编号重复校验")] + ReturnReasonManageBLL_ExistsReturnReason, + + /// + /// 删除退货原因信息 + /// + [Description("删除退货原因信息")] + ReturnReasonManageBLL_Delete, + /// + /// 更新退货原因信息 + /// + [Description("更新退货原因信息")] + ReturnReasonManageBLL_Update, + + /// + /// 子退货原因信息导出 + /// + [Description("退货原因信息导出")] + ReturnReasonManageBLL_GetExportData, + + /// + /// 子退货原因信息数据导入 + /// + [Description("子退货原因信息数据导入")] + ReturnReasonManageBLL_GetImportData, + #endregion + + #region 要货地信息 + + /// + /// 要货地信息列表 + /// + [Description("获取要货地信息列表")] + PlacedisManageBLL_GetList, + + /// + ///要货地信息 + /// + [Description("获取要货地信息")] + PlacedisManageBLL_Get, + + /// + /// 插入要货地信息 + /// + [Description("插入要货地信息")] + PlacedisManageBLL_Insert, + + /// + /// 删除要货地信息 + /// + [Description("删除要货地信息")] + PlacedisManageBLL_Delete, + + /// + /// Sap同步要货地信息 + /// + [Description("Sap同步要货地信息")] + PlacedisManageBLL_SapSyn, + + /// + /// 更新要货地信息 + /// + [Description("更新要货地信息")] + PlacedisManageBLL_Update, + + /// + /// 要货地信息导出 + /// + [Description("要货地信息导出")] + PlacedisManageBLL_GetImportData, + + /// + /// 要货地信息导入 + /// + [Description("要货地信息导入")] + PlacedisManageBLL_GetExportData, + + /// + /// 获要货信息列表 + /// + [Description("获要货信息列表")] + DictManagerBLL_GetPlaceDisList, + + [Description("获要货信息列表根据权限")] + DictManagerBLL_GetReqPlaceList, + + /// + /// 转换包装台和仓库对应 + /// + [Description("转换包装台和仓库对应")] + DictManagerBLL_GetCpackPlaceList2, + #endregion + + #region 仓库信息 + + /// + /// 获取仓库信息列表 + /// + [Description("获取仓库信息列表")] + CorpManageBLL_GetList, + + [Description("获取仓库信息列表")] + DictManagerBLL_GetAllCorpList, + + [Description("根据用户获取仓库信息列表")] + DictManagerBLL_GetCorpList, + /// + /// 获取仓库信息 + /// + [Description("获取仓库信息")] + CorpManageBLL_Get, + /// + /// 获取仓库信息 + /// + [Description("获取仓库相关工厂信息")] + CorpManageBLL_GetCorpRelation, + /// + /// 插入仓库信息 + /// + [Description("插入仓库信息")] + CorpManageBLL_Insert, + + /// + /// 删除仓库信息 + /// + [Description("删除仓库信息")] + CorpManageBLL_Delete, + /// + /// 更新仓库信息 + /// + [Description("仓库更新信息")] + CorpManageBLL_Update, + + /// + /// 仓库信息导出 + /// + [Description("仓库信息导出")] + CorpManageBLL_GetExportData, + + /// + /// 仓库信息入 + /// + [Description("仓库信息导入")] + CorpManageBLL_GetImportData, + + [Description("仓库权限")] + CorpManageBLL_UserCorp, + #endregion + + #region 区域信息 + + /// + /// 获取区域信息列表 + /// + [Description("获取区域信息列表")] + StorageAreaManageBLL_GetList, + + /// + /// 获取区域信息 + /// + [Description("获取区域信息")] + StorageAreaManageBLL_Get, + + /// + /// 插入区域信息 + /// + [Description("插入区域信息")] + StorageAreaManageBLL_Insert, + + /// + /// 删除区域信息 + /// + [Description("删除区域信息")] + StorageAreaManageBLL_Delete, + /// + /// 更新区域信息 + /// + [Description("区域更新信息")] + StorageAreaManageBLL_Update, + + /// + /// 区域信息导出 + /// + [Description("区域信息导出")] + StorageAreaManageBLL_GetExportData, + + /// + /// 区域信息入 + /// + [Description("区域信息导入")] + StorageAreaManageBLL_GetImportData, + #endregion + + #region 框架协议 + + /// + /// 获取框架协议列表 + /// + [Description("获取框架协议列表")] + SourceListBLL_GetList, + + /// + /// 删除框架协议列表 + /// + [Description("删除框架协议列表")] + SourceListBLL_Delete, + + /// + /// 获取框架协议 + /// + [Description("获取框架协议")] + SourceListBLL_Get, + + /// + /// 更新框架协议 + /// + [Description("更新框架协议")] + SourceListBLL_Update, + + /// + /// 添加框架协议 + /// + [Description("添加框架协议")] + SourceListBLL_Insert, + + /// + /// 单条同步 + /// + [Description("单条同步")] + SourceListBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + SourceListBLL_AllSynData, + + #endregion + + #region BESI数据 + /// + /// 获取BESI数据列表 + /// + [Description("获取框架协议列表")] + BESIBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + BESIBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + BESIBLL_AllSynData, + #endregion + + #region 零件信息 + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageBLL_StopRecover, + #endregion + + #region 零件信息ForPAD + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageForPADBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageForPADBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageForPADBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageForPADBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageForPADBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageForPADBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageForPADBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageForPADBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageForPADBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageForPADBLL_StopRecover, + #endregion + + #region 零件类别 + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表字典")] + MaterialSortManageBLL_GetMatSorts, + + /// + /// 获取零件类别(根据用户过滤) + /// + [Description("获取零件类别(根据用户过滤)")] + DictManagerBLL_GetMaterialSort, + + [Description("获取零件类别(根据工厂、仓库、工位、路线、零件号)")] + DictManagerBLL_GetMaterialSortFor, + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表")] + MaterialSortManageBLL_GetList, + + /// + /// 获取零件类别信息 + /// + [Description("获取零件类别信息")] + MaterialSortManageBLL_Get, + + /// + /// 获取零件类别s + /// + [Description("获取零件类别")] + DictManagerBLL_GetAllMaterialSort, + + /// + /// 插入零件类别信息 + /// + [Description("插入零件类别信息")] + MaterialSortManageBLL_Insert, + + /// + /// 删除零件类别信息 + /// + [Description("删除零件类别信息")] + MaterialSortManageBLL_Delete, + /// + /// 零件类别更新信息 + /// + [Description("零件类别更新信息")] + MaterialSortManageBLL_Update, + + /// + /// 零件类别信息导出 + /// + [Description("零件类别导出")] + MaterialSortManageBLL_GetExportData, + + /// + /// 零件类别信息导入 + /// + [Description("零件类别导入")] + MaterialSortManageBLL_GetImportData, + + #endregion + + #region 工位信息 + /// + /// 获取工位信息列表(数据源) + /// + [Description("获取工位信息列表(数据源)")] + WorkStationManageBLL_GetCombox, + /// + /// 获取工位信息列表 + /// + [Description("获取工位信息列表")] + WorkStationManageBLL_GetList, + + /// + /// 获取工位信息列表 + /// + [Description("工位同步")] + WorkStationManageBLL_SapSyn, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationBLL_Get, + + /// + /// 插入工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_Insert, + + /// + /// 插入PAD工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_PADInsert, + + /// + /// 删除零件信息 + /// + [Description("删除工位信息")] + WorkStationManageBLL_Delete, + /// + /// 工位更新信息 + /// + [Description("工位更新信息")] + WorkStationManageBLL_Update, + + /// + /// 工位信息导出 + /// + [Description("工位信息导出")] + WorkStationManageBLL_GetExportData, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationManageBLL_Get, + + [Description("工位获取导入数据")] + WorkStationManageBLL_GetImportData, + + #endregion + + #region 路线信息 + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + LineManageBLL_GetList, + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + DictManagerBLL_GetAllLineList, + + [Description("根据用户及仓库获取路线信息列表")] + DictManagerBLL_GetLineList, + /// + /// 获取路线信息 + /// + [Description("获取路线信息")] + LineManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + LineManageBLL_GetLineByPk, + + /// + /// 插入路线信息 + /// + [Description("插入路线信息")] + LineManageBLL_Insert, + + /// + /// 删除路线信息 + /// + [Description("删除路线信息")] + LineManageBLL_Delete, + /// + /// 路线更新信息 + /// + [Description("路线更新信息")] + LineManageBLL_Update, + + /// + /// 路线信息导出 + /// + [Description("路线信息导出")] + LineManageBLL_GetExportData, + /// + /// 路线信息导入 + /// + [Description("路线信息导入")] + LineManageBLL_GetImportData, + #endregion + + #region 库位信息 + + /// + /// 获取库位信息列表 + /// + [Description("获取库位信息列表")] + StorageBinManageBLL_GetList, + + /// + /// 获取库位信息 + /// + [Description("获取库位信息")] + StorageBinBLL_Get, + + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + StorageBinManageBLL_GetStorageBinByPk, + + + /// + /// 插入库位信息 + /// + [Description("插入库位信息")] + StorageBinManageBLL_Insert, + + /// + /// 删除库位信息 + /// + [Description("删除库位信息")] + StorageBinManageBLL_Delete, + /// + /// 库位更新信息 + /// + [Description("库位更新信息")] + StorageBinManageBLL_Update, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn1, + /// + /// 库位信息导出 + /// + [Description("库位信息导出")] + StorageBinManageBLL_GetExportData, + + [Description("库位检查重复项")] + StorageBinManageBLL_CheckMaterialnoSingle, + + [Description("库位获取导入数据")] + StorageBinManageBLL_GetImportData, + + [Description("库位检查删除零件")] + StorageBinManageBLL_CheckdDeleteMaterial, + #endregion + + #region 零件高低储信息 + + /// + /// 获取零件高低储信息列表 + /// + [Description("获取零件高低储信息列表")] + MatLowerUpperManageBLL_GetList, + + /// + /// 获取零件高低储信息 + /// + [Description("获取零件高低储信息")] + MatLowerUpperBLL_Get, + + /// + /// 插入零件高低储信息 + /// + [Description("插入零件高低储信息")] + MatLowerUpperManageBLL_Insert, + + /// + /// 删除零件高低储信息 + /// + [Description("删除零件高低储信息")] + MatLowerUpperManageBLL_Delete, + /// + /// 零件高低储更新信息 + /// + [Description("零件高低储更新信息")] + MatLowerUpperManageBLL_Update, + + /// + /// 零件高低储信息导出 + /// + [Description("零件高低储信息导出")] + MatLowerUpperManageBLL_GetExportData, + + /// + /// 零件高低储信息导入 + /// + [Description("零件高低储信息导入")] + MatLowerUpperManageBLL_ImportData, + + #endregion + + #region 自制件器具信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + UtenSilManageBLL_GetCombox, + + /// + /// 获取自制件器具信息列表 + /// + [Description("获取自制件器具信息列表")] + UtenSilManageBLL_GetList, + + /// + /// 获取自制件器具信息 + /// + [Description("获取自制件器具信息")] + UtenSilManageBLL_Get, + + /// + /// 插入自制件器具信息 + /// + [Description("插入自制件器具信息")] + UtenSilManageBLL_Insert, + + /// + /// 删除自制件器具信息 + /// + [Description("删除自制件器具信息")] + UtenSilManageBLL_Delete, + /// + /// 自制件器具更新信息 + /// + [Description("自制件器具更新信息")] + UtenSilManageBLL_Update, + + /// + /// 自制件器具信息导出 + /// + [Description("自制件器具信息导出")] + UtenSilManageBLL_GetExportData, + + [Description("自制件器具信息导入")] + UtenSilManageBLL_GetImportData, + + #endregion + + #region 自制件零件相关信息 + + /// + /// 获取自制件零件相关信息列表 + /// + [Description("获取自制件零件相关信息列表")] + HMaterialManageBLL_GetList, + + /// + /// 获取自制件零件相关信息 + /// + [Description("获取自制件零件相关信息")] + HMaterialManageBLL_Get, + + /// + /// 插入自制件零件相关信息 + /// + [Description("插入自制件零件相关信息")] + HMaterialManageBLL_Insert, + + /// + /// 删除自制件零件相关信息 + /// + [Description("删除自制件零件相关信息")] + HMaterialManageBLL_Delete, + /// + /// 自制件零件相关更新信息 + /// + [Description("自制件零件相关更新信息")] + HMaterialManageBLL_Update, + + /// + /// 自制件零件相关信息导出 + /// + [Description("自制件零件相关信息导出")] + HMaterialManageBLL_GetExportData, + + /// + /// 自制件零件相关信息导入 + /// + [Description("自制件零件相关信息导入")] + HMaterialManageBLL_GetImportData, + #endregion + + #region 自制件发货地信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + HMatSendPlaceManageBLL_GetCombox, + + /// + /// 获取自制件发货地信息列表 + /// + [Description("获取自制件发货地信息列表")] + HMatSendPlaceManageBLL_GetList, + + /// + /// 获取自制件发货地信息 + /// + [Description("获取自制件发货地信息")] + HMatSendPlaceManageBLL_Get, + + /// + /// 插入自制件发货地信息 + /// + [Description("插入自制件发货地信息")] + HMatSendPlaceManageBLL_Insert, + + /// + /// 删除自制件发货地信息 + /// + [Description("删除自制件发货地信息")] + HMatSendPlaceManageBLL_Delete, + /// + /// 自制件发货地更新信息 + /// + [Description("自制件发货地更新信息")] + HMatSendPlaceManageBLL_Update, + + /// + /// 自制件发货地信息导出 + /// + [Description("自制件发货地信息导出")] + HMatSendPlaceManageBLL_GetExportData, + + /// + /// 自制件发货地信息导入 + /// + [Description("自制件发货地信息导入")] + HMatSendPlaceManageBLL_GetImportData, + + #endregion + + #region 转换包装台信息 + + /// + /// 获取转换包装台信息列表 + /// + [Description("获取转换包装台信息列表")] + CpackPlaceManageBLL_GetList, + + /// + /// 获取转换包装台信息 + /// + [Description("获取转换包装台信息")] + CpackPlaceManageBLL_Get, + + /// + /// 插入转换包装台信息 + /// + [Description("插入转换包装台信息")] + CpackPlaceManageBLL_Insert, + + /// + /// 删除转换包装台信息 + /// + [Description("删除转换包装台信息")] + CpackPlaceManageBLL_Delete, + /// + /// 转换包装台更新信息 + /// + [Description("转换包装台更新信息")] + CpackPlaceManageBLL_Update, + + /// + /// 转换包装台信息导出 + /// + [Description("转换包装台信息导出")] + CpackPlaceManageBLL_GetExportData, + + /// + /// 转换包装台信息导入 + /// + [Description("转换包装台信息导入")] + CpackPlaceManageBLL_ImportData, + + #endregion + + #region 转换包装关联关系信息 + + /// + /// 获取转换包装关联关系信息列表 + /// + [Description("获取转换包装关联关系信息列表")] + CpackageManageBLL_GetList, + + /// + /// 获取转换包装关联关系信息 + /// + [Description("获取转换包装关联关系信息")] + CpackBLL_Get, + + /// + /// 插入转换包装关联关系信息 + /// + [Description("插入转换包装关联关系信息")] + CpackageManageBLL_Insert, + + /// + /// 删除转换包装关联关系信息 + /// + [Description("删除转换包装关联关系信息")] + CpackageManageBLL_Delete, + /// + /// 转换包装关联关系更新信息 + /// + [Description("转换包装关联关系更新信息")] + CpackageManageBLL_Update, + + /// + /// 转换包装关联关系信息导出 + /// + [Description("转换包装关联关系信息导出")] + CpackageManageBLL_GetExportData, + + #endregion + + #region 转换包装台与零件关系信息 + + /// + /// 获取转换包装台与零件关系信息列表 + /// + [Description("获取转换包装台与零件关系信息列表")] + CpackPlaceMatManageBLL_GetList, + + /// + /// 获取转换包装台与零件关系信息 + /// + [Description("获取转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Get, + + /// + /// 插入转换包装台与零件关系信息 + /// + [Description("插入转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Insert, + + /// + /// 删除转换包装台与零件关系信息 + /// + [Description("删除转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Delete, + /// + /// 转换包装台与零件关系更新信息 + /// + [Description("转换包装台与零件关系更新信息")] + CpackPlaceMatManageBLL_Update, + + [Description("转换包装台获取仓库信息")] + CpackPlaceMatManageBLL_GetCpackPlace, + + /// + /// 转换包装台与零件关系信息导出 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_GetExportData, + /// + /// 转换包装台与零件关系信息导入 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_ImportData, + + [Description("转换包装台与零件关系信息同步SAP")] + CpackPlaceMatManageBLL_SapSyn, + MatLowerUpperManageBLL_Get, + WorkStationManageBLL_CheckSame, + StorageBinManageBLL_CheckSame, + StorageBinManageBLL_Get, + + + #endregion + + #region 货位类型信息 + + /// + /// 获取货位类型信息列表 + /// + [Description("获取货位类型信息列表")] + CargoTypeManageBLL_GetList, + + /// + /// 获取货位类型信息 + /// + [Description("获取货位类型信息")] + CargoTypeManageBLL_Get, + + /// + /// 插入货位类型信息 + /// + [Description("插入货位类型信息")] + CargoTypeManageBLL_Insert, + + /// + /// 删除货位类型信息 + /// + [Description("删除货位类型信息")] + CargoTypeManageBLL_Delete, + /// + /// 货位类型更新信息 + /// + [Description("货位类型更新信息")] + CargoTypeManageBLL_Update, + + [Description("货位类型导出")] + CargoTypeManageBLL_GetExportData, + + [Description("货位类型导入")] + CargoTypeManageBLL_ImportData, + #endregion + + #region 特殊配额 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + ZspqaBLL_GetList, + /// + /// 获取特殊配额信息 + /// + [Description("获取特殊配额信息")] + ZspqaBLL_Get, + /// + /// 插入 + /// + [Description("插入")] + ZspqaBLL_Insert, + /// + /// 更新 + /// + [Description("更新")] + ZspqaBLL_Update, + /// + /// 删除 + /// + [Description("删除")] + ZspqaBLL_Delete, + /// + /// 导入 + /// + [Description("导入")] + ZspqaBLL_ImportData, + /// + /// 导出 + /// + [Description("导出")] + ZspqaBLL_GetExportData, + /// + /// 获取配额表中零件号及信息 + /// + [Description("获取配额表中零件号及信息")] + ZspqaBLL_GetMaterListByQuota, + #endregion + + #region 配额管理 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + QuoTaBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + QuoTaBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + QuoTaBLL_AllSynData, + + #endregion + + #region 工位零件货位类型 + [Description("工位零件货位类型删除")] + MatstorageBinstationBLL_Delete, + + [Description("工位零件货位类型获取数据列表")] + MatstorageBinstationBLL_GetList, + + [Description("工位零件货位类型更新")] + MatstorageBinstationBLL_Update, + + [Description("工位零件货位类型添加")] + MatstorageBinstationBLL_Insert, + + [Description("工位零件货位类型导入")] + MatstorageBinstationBLL_GetImportData, + + [Description("工位零件货位类型导出")] + MatstorageBinstationBLL_GetExportData, + + [Description("删除货位类型校验")] + MatstorageBinstationBLL_CheckDeleteCargo, + + [Description("工位零件货位类型获取单条数据")] + MatstorageBinstationBLL_Get, + MatstorageBinstationBLL_GetDetail, + StorageBinManageBLL_CheckdArea, + WorkStationManageBLL_CheckMWID, + StorageBinManageBLL_Lock, + [Description("库位SAP同步")] + StorageBinManageBLL_SapSyn, + #endregion + + #region R3器具 + [Description("获取R3器具信息列表")] + R3UtenSilManageBLL_GetList, + R3UtenSilManageBLL_Insert, + R3UtenSilManageBLL_Delete, + R3UtenSilManageBLL_GetExportData, + R3UtenSilManageBLL_ImportData, + R3UtenSilManageBLL_SapSyn, + #endregion + + #region 要货类型 + [Description("获取列表")] + RequestTypeBLL_GetList, + RequestTypeBLL_Get, + RequestTypeBLL_Insert, + RequestTypeBLL_Update, + RequestTypeBLL_Delete, + RequestTypeBLL_ImportData, + RequestTypeBLL_GetExportData, + + #endregion + + #region 承运商车辆信息 + + [Description("获取列表")] + SendSplrBLL_Get, + SendSplrBLL_Search, + SendSplrBLL_Insert, + SendSplrBLL_Delete, + SendSplrBLL_Update, + SendSplrBLL_Import, + SendSplrBLL_GetExportData, + + #endregion + + #region DictManageBLL + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplrList, + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplr, + + DictManagerBLL_GetTruckNo, + + + #endregion + + #region 工位器具 + + /// + /// 获取工位器具信息列表 + /// + [Description("获取工位器具信息列表")] + WorkStationMaterialBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + WorkStationMaterialBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + WorkStationMaterialBLL_AllSynData, + + #endregion + + #region 零件同步 + + /// + /// 获取零件同步信息列表 + /// + [Description("获取零件同步信息列表")] + MatnrBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + MatnrBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + MatnrBLL_AllSynData, + #endregion + + #region CDK库存 + /// + /// 获取CDK库存信息列表 + /// + [Description("获取CDK库存信息列表")] + CKDStockBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + CKDStockBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + CKDStockBLL_AllSynData, + #endregion + + CKDBatchPriorityBLL_Get, + + CKDBatchPriorityBLL_Insert, + + CKDBatchPriorityBLL_Update, + + CKDBatchPriorityBLL_Delete, + + CKDBatchPriorityBLL_GetList, + + CKDBatchPriorityBLL_GetExportData, + + CKDBatchPriorityBLL_GetImportData, + + CKDBatchPriorityBLL_Forward, + + CKDBatchPriorityBLL_Backone, + + DictManageBLL_GetMachineListByProcessType, + + + } + + #endregion + + /// + /// 支持交互方法枚举 + /// + [Description("支持交互方法枚举")] + public enum SupportMutualService + { + [Description("获取问题类型信息")] + SIProblemTypeBLL_Get, + + [Description("获取问题类型列表")] + SIProblemTypeBLL_GetList, + + [Description("判断类型名称是否已经存在")] + SIProblemTypeBLL_CheckProblemTypeNameExist, + + + [Description("插入问题类型信息")] + SIProblemTypeBLL_Insert, + + [Description("更新问题类型信息")] + SIProblemTypeBLL_Update, + + [Description("删除问题类型信息")] + SIProblemTypeBLL_Delete, + + [Description("获取问题类型导出信息")] + SIProblemTypeBLL_GetExportData, + + [Description("搜索问题解决方案")] + SupportInteractionBLL_GetList, + + [Description("获取问题类型下拉列表")] + SupportInteractionBLL_GetTypeList, + + [Description("问题解决方案导出")] + SupportInteractionBLL_GetExportData, + + [Description("获取问题列表")] + SupportInteractionBLL_GetProblemList, + + [Description("插入问题")] + SupportInteractionBLL_Insert, + + [Description("更新问题")] + SupportInteractionBLL_Update, + + [Description("获取编辑信息")] + SupportInteractionBLL_GetInfo, + + [Description("判断选中的问题是否已经关闭")] + SupportInteractionBLL_CheckProblemClosed, + + [Description("校验选中问题的处理部门是否为当前用户部门")] + SupportInteractionBLL_CheckProblemDept, + + [Description("校验选中问题的处理人是否为当前用户")] + SupportInteractionBLL_CheckProblemUser, + + [Description("获取处理记录列表")] + SupportInteractionBLL_GetSIDealList, + + [Description("获取流程设置")] + WorkFlowBLL_GetWorkFlow, + + [Description("保存流程用户")] + WorkFlowBLL_WorkFlowBLL_SaveSelectOrganization, + + [Description("获取用户的处理机构")] + SupportInteractionBLL_GetCurrentHandleOrga, + + [Description("保存处理方法")] + SupportInteractionBLL_UpdateSupportInteraction, + + [Description("解决问题")] + SupportInteractionBLL_SloveSupportInteraction, + + [Description("获取流程设置信息")] + SIParamSetBLL_Get, + + [Description("保存支持交互参数设置")] + SIParamSetBLL_SaveSIParamSet, + + [Description(" 更新支持交互参数设置")] + SIParamSetBLL_UpdateSIParamSet, + + [Description("判断是否存在未解决的问题")] + OverTimeRemindBLL_CheckCurrenUserOverTime1Remind, + + [Description("判断是否存在未解决的问题2")] + OverTimeRemindBLL_CheckCurrenUserOverTime2Remind, + + } + + + #region 发运模块 + /// + /// 发运模块 + /// + [Description("发运模块")] + public enum FrmPlaceManage + { + /// + /// 发运模块列表查询 + /// + [Description("发运模块列表查询")] + FrmPlaceBLL_GetList, + + /// + /// 贴车单记录查询 + /// + [Description("贴车单记录查询")] + FrmPlaceBLL_GetPastecardInfoWithVin, + + /// + /// 贴车单记录明细查询 + /// + [Description("贴车单记录明细查询")] + FrmPlaceBLL_GetPasteDetails, + + /// + /// 实现校准功能 + /// + [Description(" 实现校准功能")] + FrmPlaceBLL_UpdateFisOrder, + + /// + /// 获取贴车单当天的总条数 + /// + [Description(" 获取贴车单当天的总条数")] + FrmPlaceBLL_GetPastecardNo, + + + /// + /// 获取发车信息 + /// + [Description(" 获取发车信息")] + FrmPlaceBLL_GetPastecardIndex, + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddPasteCard, + + + /// + /// 更新贴车单信息 + /// + [Description(" 更新贴车单信息")] + FrmPlaceBLL_UpdatePastecardIndex, + + + + /// + /// 获取下护板扫描表其他条码号 + /// + [Description(" 获取下护板扫描表其他条码号")] + FrmPlaceBLL_GetOhterCode, + + /// + /// 获取配置表中的规则类型值 + /// + [Description(" 获取配置表中的规则类型值")] + FrmPlaceBLL_GetRule, + + /// + /// 根据条码标识查询零件信息 + /// + [Description(" 根据条码标识查询零件信息")] + FrmPlaceBLL_GetSparepartsinfo, + + + /// + /// 判断条码是否重复 + /// + [Description(" 判断条码是否重复")] + FrmPlaceBLL_ExistBarcode, + + + /// + /// 打印条码 + /// + [Description(" 打印条码")] + FrmPlaceBLL_WriteFile, + + + + /// + /// 更新贴车单补打印时间 + /// + [Description(" 更新贴车单补打印时间")] + FrmPlaceBLL_UpdataBarcodeDate, + + + /// + /// 插入LOG + /// + [Description(" 插入LOG")] + FrmPlaceBLL_InsertLog, + + + /// + /// 获取扫取条形码是否存在 + /// + [Description(" 获取扫取条形码是否存在")] + FrmPlaceBLL_GetExitsCode, + + + /// + /// 查询是否为成品 + /// + [Description(" 查询是否为成品")] + FrmPlaceBLL_GetExitsStatus, + + + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddNewPasteCard, + + + /// + /// 获取工作中心 + /// + [Description(" 获取工作中心")] + FrmPlaceBLL_GetWORKCENTERCODE, + + + /// + /// 获取 DASPASTECARDINDEX表数据 + /// + [Description(" 获取 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_GetDaspssteCarIndexByPlanName, + + + /// + /// 插入 DASPASTECARDINDEX表数据 + /// + [Description(" 插入 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_InsertDaspssteCarIndexByPlanName, + + + /// + /// GetPastecardDeatis + /// + [Description(" GetPastecardDeatis")] + FrmPlaceBLL_GetPastecardDeatis, + + + + /// + /// 根据贴车单ID获取详细 + /// + [Description(" 根据贴车单ID获取详细")] + FrmPlaceBLL_GetPascardDetailsByPid, + + + /// + /// 修改补打时间 + /// + [Description(" 修改补打时间")] + FrmPlaceBLL_UpdatePasteCardPasteCardDate2Value, + + [Description("通过产品条码获取产品")] + FrmPlaceBLL_GetProductForSend, + + + [Description("通过总成条码获取产品")] + FrmPlaceBLL_GetProductByAssembleCode, + FrmPlaceBLL_GetTimeOutSet, + + } + #endregion 发运模块 + + #region 库存盘点 + /// + /// 库存盘点 + /// + [Description("库存盘点")] + public enum StocktakingManage + { + /// + /// 库存盘点查询汇总页面 + /// + [Description("库存盘点查询汇总页面")] + StocktakingBLL_GetList, + + /// + /// 添加盘点信息 + /// + [Description("添加盘点信息")] + StocktakingBLL_Insert, + + /// + /// 获取每日最新的计划单号 + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_GetPlanNoByDate, + + + + + + /// + /// 删除子表的数据根据PLANID + /// + [Description("添加盘点信息")] + StocktakingBLL_SubDelete, + + /// + /// 删除父表数据根据ID + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_Delete, + + /// + /// 添加盘点信息 + /// + [Description("插入详细信息(单表)")] + StocktakingBLL_SubInsert, + + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PID")] + StocktakingBLL_GetModel, + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PLANID")] + StocktakingBLL_GetSubModel, + + + + /// + /// 获取子页面详细列表 + /// + [Description("获取子页面详细列表")] + StocktakingBLL_GetSubList, + + + /// + /// 修改盘点信息页面 + /// + [Description("修改盘点信息页面")] + StocktakingBLL_Update, + + + /// + /// 获取盘点详细信息页面 + /// + [Description("获取盘点详细信息页面")] + StocktakingBLL_GetPanDetail, + + /// + /// 导出 + /// + [Description("导出")] + StocktakingBLL_GetExportData, + + + /// + /// 盘点信息对比结果 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_GetPanResultDetail, + + + /// + /// 盘点对比处理 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_detailCompareResult, + + + /// + /// 获取物料号 + /// + [Description("获取物料号")] + StocktakingBLL_GetMaterialList, + + /// + /// 删除 + /// + [Description("删除")] + StocktakingBLL_EditDelete, + + + + } + + #endregion 库存盘点 + + + #region 投料管理枚举 + /// + /// 投料管理枚举 + /// + [Description("投料管理枚举")] + public enum FeedInManage + { + #region 表皮查询 + /// + /// 表皮查询 + /// + [Description("表皮查询")] + EpidermisBLL_GetList, + + [Description("中控已完成")] + EpidermisBLL_UseComplete, + + /// + /// 表皮批次号修改 + /// + [Description("表皮批次号修改")] + EpidermisBLL_UpdateMaterial, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + EpidermisBLL_Get, + + /// + /// 表皮数据导出 + /// + [Description("表皮数据导出")] + EpidermisBLL_GetExportData, + + /// + /// 表皮投料信息获取 + /// + [Description("表皮投料信息获取")] + EpidermisBLL_GetProductInfectionList, + + #endregion + + #region 注塑投料记录 + + /// + /// 注塑投料记录查询 + /// + [Description("注塑投料记录查询")] + InjectionRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + InjectionRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + InjectionRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + InjectionRecorderBLL_Get, + /// + /// 注塑投料记录删除 + /// + [Description("注塑投料记录删除")] + InjectionRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + InjectionRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + InjectionRecorderBLL_GetProduceShiftList, + #endregion + + #region 搪塑投料记录 + + /// + /// 搪塑投料记录查询 + /// + [Description("搪塑投料记录查询")] + SlushRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + SlushRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + SlushRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + SlushRecorderBLL_Get, + /// + /// 搪塑投料记录删除 + /// + [Description("搪塑投料记录删除")] + SlushRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + SlushRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + SlushRecorderBLL_GetProduceShiftList, + #endregion + + #region 浇注投料记录 + + /// + /// 浇注投料记录查询 + /// + [Description("浇注投料记录查询")] + PouringRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + PouringRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + PouringRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + PouringRecorderBLL_Get, + /// + /// 浇注投料记录删除 + /// + [Description("浇注投料记录删除")] + PouringRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + PouringRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + PouringRecorderBLL_GetProduceShiftList, + + [Description("获取浇注投料记录")] + MainBLL_GetProductInfectionList, + + [Description("修改零件投料关联表批次号")] + MainBLL_UpdateMaterial, + #endregion + } + #endregion + + #region 生产管理枚举 + /// + /// 生产管理枚举 + /// + [Description("生产管理枚举")] + public enum ProduceManage + { + #region 生产记录维护 + /// + /// 生产记录维护查询列表 + /// + [Description("生产记录维护查询列表")] + ProducePlanBLL_GetList, + + /// + /// 统计 + /// + [Description("统计")] + ProducePlanBLL_GetTotal, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + ProducePlanBLL_Get, + + /// + /// 生产记录新建 + /// + [Description("生产记录新建")] + ProducePlanBLL_Insert, + + /// + /// 生产记录修改 + /// + [Description("生产记录修改")] + ProducePlanBLL_Update, + + /// + /// 生产记录完成 + /// + [Description("生产记录完成")] + ProducePlanBLL_ProductOver, + + /// + /// 生产记录删除 + /// + [Description("生产记录删除")] + ProducePlanBLL_Delete, + #endregion + + #region 不合格品记录查询 + /// + /// 不合格品记录查询列表 + /// + [Description("不合格品记录查询列表")] + UnQualityBLL_GetList, + + /// + /// 不合格品记录数据导出 + /// + [Description("不合格品记录数据导出")] + UnQualityBLL_GetExportData, + #endregion + } + #endregion + + #region 产品追溯 + /// + /// 产品追溯 + /// + [Description("产品追溯")] + public enum ProductPetrospect + { + #region 产品档案 + /// + /// 产品档案查询 + /// + [Description("产品档案查询")] + ProductArchivesBLL_GetProductParameter, + /// + /// 产品档案导出 + /// + [Description("产品档案导出")] + ProductArchivesBLL_GetExportData, + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + ProductArchivesBLL_GetMainInfo, + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + ProductArchivesBLL_GetMainOperationInfo, + #endregion + } + #endregion + + #region 报警管理枚举 + /// + /// 报警管理枚举 + /// + [Description("报警管理枚举")] + public enum WarnManage + { + #region 设备报警记录查询 + /// + /// 设备报警记录查询列表 + /// + [Description("不合格品记录查询列表")] + EquipMentAlarmBLL_GetList, + + /// + /// 设备报警记录数据导出 + /// + [Description("不合格品记录数据导出")] + EquipMentAlarmBLL_GetExportData, + #endregion + + #region 自动报警维护 + + #region 报警信息维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInfoList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInfoGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInfoInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInfoUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInfoDelete, + #endregion + + #region 报警类别维护 + + /// + /// 报警信息Page列表 + /// + [Description("报警信息Page列表")] + WarnManageBLL_GetAllWarnTypeList, + + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnTypeList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnTypeGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnTypeInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnTypeUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnTypeDelete, + #endregion + + #region 报警统治人员维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInformerList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInformerGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInformerInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInformerUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInformerDelete, + #endregion + + /// + /// 报警信息关闭 + /// + [Description("报警信息关闭")] + WarnManageBLL_WarnIsDone, + + /// + /// 报警信息发送 + /// + [Description("报警信息发送")] + WarnManageBLL_WarnIsSend, + + /// + /// 报警信息发送页面加载 + /// + [Description("报警信息发送页面加载")] + WarnManageBLL_GetWarnInformerListForSend, + + /// + /// 报警信息详情列表加载 + /// + [Description("报警信息详情列表加载")] + WarnManageBLL_GetWarnDetailList, + #endregion + + #region 设备停机记录 + /// + /// 设备停机记录查询 + /// + [Description("设备停机记录查询")] + EquipMentMaintainSearchBLL_GetList, + /// + /// 设备停机记录导出 + /// + [Description("设备停机记录导出")] + EquipMentMaintainSearchBLL_GetExportData, + #endregion + } + #endregion + + #region 视频播放枚举 + /// + /// 视频播放枚举 + /// + [Description("视频播放枚举")] + public enum VideoInfoEnum + { + #region 视频播放记录查询 + /// + /// 视频播放记录查询列表 + /// + [Description("视频播放记录查询列表")] + VideoInfoBLL_GetDataPageList, + + #endregion + + } + #endregion + + #region 在制品监控枚举 + /// + /// 在制品监控枚举 + /// + [Description("在制品监控枚举")] + public enum WIPManage + { + #region 低储报警信息 + /// + /// 低储报警信息查询 + /// + [Description("低储报警信息查询")] + StorageAlarmBLL_GetList, + /// + /// 低储报警信息导出 + /// + [Description("低储报警信息导出")] + StorageAlarmBLL_GetExportData, + #endregion + + #region 滞留品查询 + /// + /// 滞留品信息查询 + /// + [Description("滞留品信息查询")] + DetentionBLL_GetList, + /// + /// 滞留品信息导出 + /// + [Description("滞留品信息导出")] + DetentionBLL_GetExportData, + #endregion + + #region 在制品库存 + /// + /// 在制品库存 + /// + [Description("在制品库存")] + WIPInventoryBLL_GetList, + /// + /// 在制品入库信息工序列表 + /// + [Description("在制品入库信息工序列表")] + WIPInventoryBLL_GetProcessSetList, + /// + /// 在制品入库信息零件列表 + /// + [Description("在制品入库信息零件列表")] + WIPInventoryBLL_GetProductSetList, + /// + /// 在制品入库信息 + /// + [Description("在制品入库信息")] + WIPInRecorderBLL_GetList, + /// + /// 在制品出库信息 + /// + [Description("在制品出库信息")] + WIPOutRecorderBLL_GetList, + /// + /// 在制品库存导出列表 + /// + [Description("在制品库存导出列表")] + WIPInventoryBLL_GetExportData, + /// + /// 在制品入库信息导出列表 + /// + [Description("在制品入库信息导出列表")] + WIPInRecorderBLL_GetExportData, + /// + /// 在制品出库信息导出列表 + /// + [Description("在制品出库信息导出列表")] + WIPOutRecorderBLL_GetExportData, + #endregion + } + #endregion + + #region 基础信息方法枚举 + + /// + /// 基础信息方法枚举 + /// + [Description("基础信息方法枚举")] + public enum B9BasicService + { + #region 缺陷信息 + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetList, + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetAllList, + /// + /// 获取缺陷信息 + /// + [Description("获取缺陷信息")] + DefectDictBLL_Get, + /// + /// 缺陷信息插入 + /// + [Description("缺陷信息插入")] + DefectDictBLL_Insert, + /// + /// 缺陷信息更新 + /// + [Description("缺陷信息更新")] + DefectDictBLL_Update, + /// + /// 缺陷信息删除 + /// + [Description("缺陷信息删除")] + DefectDictBLL_Delete, + #endregion + + #region 物料号信息 + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetList, + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetAllList, + /// + /// 获取物料号信息 + /// + [Description("获取物料号信息")] + MaterielBLL_Get, + /// + /// 物料号信息插入 + /// + [Description("物料号信息插入")] + MaterielBLL_Insert, + /// + /// 物料号信息更新 + /// + [Description("物料号信息更新")] + MaterielBLL_Update, + /// + /// 物料号信息删除 + /// + [Description("物料号信息删除")] + MaterielBLL_Delete, + #endregion + + #region 设备信息 + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetMachineInfoList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllList, + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllListAndModels, + + /// + /// 获取设备信息 + /// + [Description("获取设备信息")] + MachineInfoBLL_Get, + /// + /// 设备信息插入 + /// + [Description("设备信息插入")] + MachineInfoBLL_Insert, + /// + /// 设备信息更新 + /// + [Description("设备信息更新")] + MachineInfoBLL_Update, + /// + /// 设备信息删除 + /// + [Description("设备信息删除")] + MachineInfoBLL_Delete, + + #endregion + + #region 设备模具信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MachineInfoModelBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MachineInfoModelBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MachineInfoModelBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MachineInfoModelBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MachineInfoModelBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MachineInfoModelBLL_GetImportData, + + #endregion + + #region 班次信息 + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetProductShiftList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetAllList, + + /// + /// 获取班次信息 + /// + [Description("获取班次信息")] + ProduceShiftBLL_Get, + /// + /// 班次信息插入 + /// + [Description("班次信息插入")] + ProduceShiftBLL_Insert, + /// + /// 班次信息更新 + /// + [Description("班次信息更新")] + ProduceShiftBLL_Update, + /// + /// 班次信息删除 + /// + [Description("班次信息删除")] + ProduceShiftBLL_Delete, + /// + /// 校验班次时间在数据库中是否存在 + /// + [Description("校验班次时间在数据库中是否存在")] + ProduceShiftBLL_ExistsProduceShiftTime, + #endregion + + #region 零件条码标识 + + /// + /// 零件条码标识信息查询列表 + /// + [Description("零件条码标识信息查询列表")] + ProductCodeIdentityBLL_GetList, + /// + /// 获取零件条码标识信息 + /// + [Description("获取零件条码标识信息")] + ProductCodeIdentityBLL_Get, + /// + /// 零件条码标识信息插入 + /// + [Description("零件条码标识信息插入")] + ProductCodeIdentityBLL_Insert, + /// + /// 零件条码标识信息更新 + /// + [Description("零件条码标识信息更新")] + ProductCodeIdentityBLL_Update, + /// + /// 零件条码标识信息删除 + /// + [Description("零件条码标识信息删除")] + ProductCodeIdentityBLL_Delete, + + #endregion + + #region 操作员信息 + + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetList, + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetAllList, + /// + /// 获取操作员信息 + /// + [Description("获取操作员信息")] + OperatorInfoBLL_Get, + /// + /// 操作员信息插入 + /// + [Description("操作员信息插入")] + OperatorInfoBLL_Insert, + /// + /// 操作员信息更新 + /// + [Description("操作员信息更新")] + OperatorInfoBLL_Update, + /// + /// 操作员信息删除 + /// + [Description("操作员信息删除")] + OperatorInfoBLL_Delete, + /// + /// daochu + /// + [Description("daochu")] + OperatorInfoBLL_GetExportData, + + /// + /// 获取所有人员 + /// + [Description("获取所有人员")] + OperatorInfoBLL_GetAllUserList, + #endregion + + #region 工序名称信息 + + /// + /// 工序名称信息查询列表 + /// + [Description("工序名称信息查询列表")] + ProcessInfoBLL_GetList, + /// + /// 获取工序名称信息 + /// + [Description("获取工序名称信息")] + ProcessInfoBLL_Get, + /// + /// 工序名称信息插入 + /// + [Description("工序名称信息插入")] + ProcessInfoBLL_Insert, + /// + /// 工序名称信息更新 + /// + [Description("工序名称信息更新")] + ProcessInfoBLL_Update, + /// + /// 工序名称信息删除 + /// + [Description("工序名称信息删除")] + ProcessInfoBLL_Delete, + + #endregion + + #region 工序设置信息 + + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetList, + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetAllList, + /// + /// 获取工序设置信息 + /// + [Description("获取工序设置信息")] + ProcessSetBLL_Get, + /// + /// 工序设置信息保存 + /// + [Description("工序设置信息保存")] + ProcessSetBLL_Save, + /// + /// 工序设置信息插入 + /// + [Description("工序设置信息插入")] + ProcessSetBLL_Insert, + /// + /// 工序设置信息更新 + /// + [Description("工序设置信息更新")] + ProcessSetBLL_Update, + /// + /// 工序设置信息删除 + /// + [Description("工序设置信息删除")] + ProcessSetBLL_Delete, + /// + /// 根据工序ID获取工序信息 + /// + [Description("根据工序ID获取工序信息")] + ProcessSetBLL_GetProcessInfo, + /// + /// 根据工序ID获取工序信息集合 + /// + [Description("根据工序ID获取工序信息集合")] + ProcessSetBLL_GetProcessInfoList, + /// + /// 根据零件类别获取应添加的工序顺序 + /// + [Description("根据零件类别获取应添加的工序顺序")] + ProcessSetBLL_GetProcessIndex, + + #endregion + + #region 工序先决条件 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetList, + + [Description("信息列表")] + ProcessRuleBLL_GetListForSet, + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetAllList, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProcessRuleBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProcessRuleBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProcessRuleBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProcessRuleBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProcessRuleBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProcessRuleBLL_GetImportData, + + #endregion + + + #region 加工参数标准值设定信息 + + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetList, + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetAllList, + /// + /// 获取加工参数标准值设定信息 + /// + [Description("获取加工参数标准值设定信息")] + ProcessParameterBLL_Get, + /// + /// 加工参数标准值设定信息插入 + /// + [Description("加工参数标准值设定信息插入")] + ProcessParameterBLL_Insert, + /// + /// 加工参数标准值设定信息更新 + /// + [Description("加工参数标准值设定信息更新")] + ProcessParameterBLL_Update, + /// + /// 加工参数标准值设定信息删除 + /// + [Description("加工参数标准值设定信息删除")] + ProcessParameterBLL_Delete, + /// + /// 获取设备编号下拉列表数据 + /// + [Description("获取设备编号下拉列表数据")] + ProcessParameterBLL_GetMachineInfoList, + /// 根据设备ID获取对应设备的工序类别 + /// + [Description("获取设备信息(获取设备对应的工序类别)")] + ProcessParameterBLL_GetMachineInfo, + + #endregion + + #region 投料配置规则信息 + + /// + /// 投料配置规则信息查询列表 + /// + [Description("投料配置规则信息查询列表")] + ProductMderuleBLL_GetList, + /// + /// 获取投料配置规则信息 + /// + [Description("获取投料配置规则信息")] + ProductMderuleBLL_Get, + /// + /// 投料配置规则信息插入 + /// + [Description("投料配置规则信息插入")] + ProductMderuleBLL_Insert, + /// + /// 投料配置规则信息更新 + /// + [Description("投料配置规则信息更新")] + ProductMderuleBLL_Update, + /// + /// 投料配置规则信息删除 + /// + [Description("投料配置规则信息删除")] + ProductMderuleBLL_Delete, + + #endregion + + #region 物料架类型信息 + + /// + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetList, + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetAllList, + /// + /// 获取物料架类型信息 + /// + [Description("获取物料架类型信息")] + MaterialShelfTypeBLL_Get, + /// + /// 物料架类型信息插入 + /// + [Description("物料架类型信息插入")] + MaterialShelfTypeBLL_Insert, + /// + /// 物料架类型信息更新 + /// + [Description("物料架类型信息更新")] + MaterialShelfTypeBLL_Update, + /// + /// 物料架类型信息删除 + /// + [Description("物料架类型信息删除")] + MaterialShelfTypeBLL_Delete, + + #endregion + + #region 投料搪塑注塑投料 + + /// + /// 投料信息查询列表 + /// + [Description("投料信息查询列表")] + InjectionRecorderBLL_GetList, + /// + /// 获取投料信息 + /// + [Description("获取投料信息")] + InjectionRecorderBLL_Get, + /// + /// 投料信息插入 + /// + [Description("投料信息插入")] + InjectionRecorderBLL_Insert, + /// + /// 投料信息更新 + /// + [Description("投料信息更新")] + InjectionRecorderBLL_Update, + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_Delete, + + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_DeleteSingle, + #endregion + + #region 加工参数配置信息 + + /// + /// 获取加工参数配置信息 + /// + [Description("获取加工参数配置信息")] + ParameterConfigBLL_GetList, + + #endregion + + #region 零件类别 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBasicBLL_GetList, + + [Description("信息列表")] + ProductBasicBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_GetByCode, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBasicBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBasicBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBasicBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBasicBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBasicBLL_GetImportData, + + #endregion + + #region 零件条码 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetAllList, + + + /// + /// 信息和属性列表 + /// + [Description("信息和属性列表")] + ProductBLL_GetListAndAttribute, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_GetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_Insert, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertInjection, + + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertForBundle, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertEpidermis, + [Description("插入信息")] + ProductBLL_InsertListEpidermis, + + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBLL_Update, + + /// + /// 更新信息状态 + /// + [Description("更新信息状态")] + ProductBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_Delete, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_ScarpProduct, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_DeleteSingle, + + /// + /// 判断名称是否存在 + /// + [Description("判断名称是否存在")] + ProductBLL_ExistsProduct, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBLL_GetImportData, + + /// + /// 更新零件状态信息(工控机) + /// + [Description("更新零件状态信息(工控机)")] + ProductBLL_MendUpdate, + + /// + /// 获取零件信息(工控机) + /// + [Description("获取零件信息(工控机)")] + ProductBLL_GetProductInfo, + + [Description("更新产品信息")] + ProductBLL_ModifyProductCode, + /// + /// 获取原始产品信息 + /// + ProductBLL_GetOrginProduct, + #endregion + + #region 零件属性 + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetList, + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetAllList, + /// + /// 获取零件属性信息 + /// + [Description("获取零件属性信息")] + ProductAttributeBLL_Get, + /// + /// 零件属性信息插入 + /// + [Description("零件属性信息插入")] + ProductAttributeBLL_Insert, + /// + /// 零件属性信息更新 + /// + [Description("零件属性信息更新")] + ProductAttributeBLL_Update, + /// + /// 零件属性信息删除 + /// + [Description("零件属性信息删除")] + ProductAttributeBLL_Delete, + #endregion + + #region 设备停机维护 + + /// + /// 信息列表 + /// + [Description("信息列表")] + EquipmentMaintainBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + EquipmentMaintainBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + EquipmentMaintainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + EquipmentMaintainBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + EquipmentMaintainBLL_Delete, + + /// + /// 删除信息并更新设备表 + /// + [Description("删除信息并更新设备表")] + EquipmentMaintainBLL_DeleteEquipmentMaintainAndUpdateMachine, + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + EquipmentMaintainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + EquipmentMaintainBLL_GetImportData, + + #endregion + + + #region 投料与零件关联 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductInjectionBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductInjectionBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductInjectionBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductInjectionBLL_Update, + + /// + /// 判断投料信息是否存在 + /// + [Description("判断投料信息是否存在")] + ProductInjectionBLL_ExistsInjection, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductInjectionBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductInjectionBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductInjectionBLL_GetImportData, + + #endregion + + #region 产品批次追溯 + + /// + /// 获取列表(产品批次追溯) + /// + [Description("获取列表(产品批次追溯)")] + ProductInjectionBLL_GetProductInjectionList, + + /// + /// 导出信息列表(产品批次追溯) + /// + [Description("导出信息列表(产品批次追溯)")] + ProductInjectionBLL_GetExportDataForPI, + #endregion + + #region 产品加工追溯 + + /// + /// 设备加工操作 + /// + [Description("设备加工操作")] + MainOperationBLL_MachineOperation, + + /// + /// 获取列表(产品加工追溯) + /// + [Description("获取列表(产品加工追溯)")] + MainOperationBLL_GetMainOperationReviewList, + + /// + /// 导出信息列表(产品加工追溯) + /// + [Description("导出信息列表(产品加工追溯)")] + MainOperationBLL_GetExportDataForMOR, + #endregion + + #region 加工记录信息 + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetListWithParameter, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetAllList, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetList, + + /// + /// 工控机获取加工记录信息 + /// + [Description("工控机获取加工记录信息")] + MainOperationBLL_GetOperationList, + + /// + /// 工控机获取加工记录信息Q5新增 + /// + [Description("工控机获取加工记录信息Q5新增")] + MainOperationBLL_GetOperationListNew, + + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_Operation, + + /// + /// 获取打印条码 + /// + [Description("获取打印条码")] + MainOperationBLL_GetPrintCode, + + /// + /// 加工 + /// + [Description("加工并发送指令")] + MainOperationBLL_OperationForReturn, + + /// + /// 获取指令 + /// + [Description("获取指令")] + MainOperationBLL_GetSendOrder, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPassProcess, + + /// + /// 产品返修 + /// + [Description("产品返修")] + MainOperationBLL_MendProudct, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPunchingPassProcess, + + /// + /// 撤销 + /// + [Description("撤销")] + MainOperationBLL_SetRecovery, + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_SaveAndSendOrder, + + + /// + /// 获取加工记录信息统计 + /// + [Description("获取加工记录信息统计")] + MainOperationBLL_GetListForstatistic, + + /// + /// 获取加工记录信息(web) + /// + [Description("获取加工记录信息(web)")] + MainOperationBLL_GetListWithParameterForWeb, + + + + + + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetListWithParameterForWebTitle, + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetParameterForWebTitle, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupBy, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupByStauts, + + MainOperationBLL_GetListForstatisticWithColor, + + + #endregion + + #region 文件复制 + /// + /// 文件复制 + /// + [Description("文件复制")] + FileCopyRecordBLL_GetBarcode, + + + + #endregion + + #region 模具模腔 + + [Description("获取模具号配置")] + MoldConfigBLL_GetList, + + [Description("获取模具号配置")] + MoldConfigBLL_Get, + + [Description("获取模具号和模架号最大值")] + MoldConfigBLL_GetMaxMold, + + [Description("删除模具号配置")] + MoldConfigBLL_DeleteSingle, + + [Description("修改模具号配置")] + MoldConfigBLL_Update, + + [Description("新增模具号配置")] + MoldConfigBLL_Insert, + + [Description("新增模具号配置")] + MoldConfigBLL_UpdateNextUsed, + + [Description("删除模具号配置")] + MoldConfigBLL_Delete, + + [Description("获取模腔号配置")] + MoldSetBLL_GetList, + + [Description("更新模腔号配置")] + MoldSetBLL_SaveMoldSet, + + [Description("获取浇注配置")] + CastCounterBLL_Get, + + [Description("更新浇注配置")] + CastCounterBLL_Update, + + + MaterialCodeBLL_GetMaterialCode, + ProductBasicBLL_GetProductBasicList, + FactoryBLL_GetFactoryList, + ProductInfoBLL_GetImportData, + ProductInfoBLL_GetExportData, + ProductInfoBLL_Delete, + ProductInfoBLL_Update, + ProductInfoBLL_Insert, + ProductInfoBLL_Get, + ProductInfoBLL_GetList, + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + /// + /// 获取当前工作班次 + /// + ProduceShiftBLL_GetWorkingShift, + ProductBLL_GetProductByPart, + ProductBLL_CreateAssy, + + + #endregion + + } + #endregion + + /// + /// 工控机方法枚举 + /// + [Description("工控机方法枚举")] + public enum B9IPCService + { + #region 时间验证 + + CHECKTIMEBLL_Insert, + CHECKTIMEBLL_Update, + [Description("记录查询列表")] + CHECKTIMEBLL_GetList, + [Description("记录查询列表")] + CHECKTIMEBLL_Get, + + #endregion + + #region 条码补打记录 + [Description("补打记录查询列表")] + BarCodeReplacementBLL_Get, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetRecord, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetList, + + [Description("补打记录新增")] + BarCodeReplacementBLL_Insert, + #endregion + + + #region 配置 + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + LocSwitchHelperBLL_GetPBomItemCodes, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + MaterialBomConfigBLL_GetAutoInputBarCode, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetList, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDConfigBLL_Insert, + + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAllList, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAppConfigValue, + /// + /// 获取物料号 + /// + [Description("获取物料号")] + BZDConfigBLL_GetMaterialCode, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDRecorderBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDRecorderBLL_Insert, + /// + /// BZD条码配置插入 + /// + [Description("创建BZD条码并记录")] + BZDRecorderBLL_CreateBZDCode, + /// + /// 查询BZD记录 + /// + [Description("查询BZD记录")] + BZDRecorderBLL_GetRecord, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_getMaxSeq, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetAllList, + /// + /// 获取配置细信息 + /// + [Description("配置细信息")] + PROCESSPARAMETERBLL_Get, + /// + /// 配置细信息插入 + /// + [Description("配置细信息插入")] + PROCESSPARAMETERBLL_Insert, + /// + /// 配置细信息更新 + /// + [Description("配置细信息更新")] + PROCESSPARAMETERBLL_Update, + /// + /// 配置细信息删除 + /// + [Description("配置细信息删除")] + PROCESSPARAMETERBLL_Delete, + /// + /// 报废走势图 + /// + [Description("报废走势图")] + PROCESSPARAMETERBLL_GetMainList, + #endregion + + #region 查询配置 + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_GetBom, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + ScanIPConfigBLL_Get, + + /// + /// 修改配置信息 + /// + [Description("修改配置信息")] + ScanIPConfigBLL_Update, + + #endregion + + #region SPC监控 + + /// + /// 获得监控信息 + /// + [Description("获得监控信息")] + SPCControlBLL_GetData, + + #endregion + + #region 贴车单 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + SendPlanInfoBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + SendPlanInfoBLL_Insert, + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_InsertAndUpdateMain, + + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_UpdateMain, + + /// + /// 更新信息 + /// + [Description("更新信息")] + SendPlanInfoBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + SendPlanInfoBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + SendPlanInfoBLL_GetImportData, + + /// + /// 贴车单查询 + /// + [Description("贴车单查询")] + SendPlanRecordBLL_GetList, + /// + /// 贴车单查询 + /// + [Description("贴车单详细查询")] + SendPlanRecordBLL_GetItem, + + /// + /// 贴车单查询导出列表 + /// + [Description("贴车单查询导出列表")] + SendPlanRecordBLL_GetExportData, + + #endregion + + #region 发车统计分析 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetSendStatisticsList, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetSendStatisticsExportData, + + #endregion + + #region 加工本体 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetByCondition, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetMaterialSetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_Update, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainBLL_GetImportData, + /// + /// 创建本体信息 + /// + MainBLL_CreateMain, + + #endregion + + #region 主体与零件关系 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetAllList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetListWithProduct, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainProductBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainProductBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainProductBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainProductBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainProductBLL_GetImportData, + + #endregion + + #region 返修记录 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetExportDatas, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetLists, + + MendRecorderBLL_GetMenderReasonList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MendRecorderBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MendRecorderBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MendRecorderBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MendRecorderBLL_GetImportData, + + + /// + /// 获取返修信息(工控机) + /// + [Description("获取返修信息")] + MendRecorderBLL_GetMendRecorderInfo, + + /// + /// 返修登记(工控机) + /// + [Description("返修登记")] + MendRecorderBLL_RegisterMendRecorder, + + /// + /// 返修完成(工控机) + /// + [Description("返修完成")] + MendRecorderBLL_MendRecorderFinish, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_InsertMendRecorder, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_UpdateMendRecorder, + + MendRecorderBLL_CheckProductCode, + + MendRecorderBLL_InsertMendRecordItem, + + /// + /// 获取返修统计信息 + /// + [Description("获取返修统计信息")] + MendRecorderBLL_GetMendRecorderStatistics, + + /// + /// 导出返修统计信息 + /// + [Description("导出返修统计信息")] + MendRecorderBLL_ExportMendRecorderStatistics, + + + #endregion + + #region FIS M100生产信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + FISInfoBLL_GetList, + + #endregion + + #region 出库 + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + OutWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + OutWarehouseBLL_GetMainInfo, + + /// + /// 出库操作(本体) + /// + [Description("出库操作(本体)")] + OutWarehouseBLL_MainOutWarehouse, + + /// + /// 出库操作(零件) + /// + [Description("出库操作(零件)")] + OutWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 入库 + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + InWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + InWarehouseBLL_GetMainInfo, + + /// + /// 入库操作(本体) + /// + [Description("出库操作(本体)")] + InWarehouseBLL_MainOutWarehouse, + + /// + /// 入库操作(零件) + /// + [Description("出库操作(零件)")] + InWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 获取产品信息 + + ProductBLL_GetByCondition, + /// + /// 获取信息PID PRODUCTCODE + /// public Product Get(Product model) + /// + ProductBLL_Get, + + /// + /// 插入产品信息 + /// + ProductBLL_Insert, + + #endregion + + #region 查验 + + InjectionCheckBLL_Insert, + + InjectionCheckBLL_GetList, + + InjectionCheckBLL_Delete, + + #endregion + + #region 缺陷类型 + + DefectTypeBLL_GetDefectType, + MendRecorderBLL_GetListForstatistic, + + #endregion + + #region 获取打印模板路径 + + PrintModelCopyBLL_GetPrintModelCopyList, + + #endregion + + #region 获取采集点信息 + + DAIBLL_GetList, + DAIBLL_GetSignalDAI, + DAICacheBLL_GetWorklocCache, + /// + /// 采集点输入 + /// + DAI_Input, + /// + /// 工位放行 + /// + DAI_LetPass, + /// + /// 撤销回滚 + /// + DAI_Rollback, + DAI_RollbackWithOrder, + DAI_Reset, + + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + #endregion + + #region 生产计划 + + WorkOrderBLL_GetOrderInCell, + WorkOrderBLL_GetOrderCountInCell, + /// + /// 获取加工记录数 + /// + ProcessRecordBLL_GetCount, + WorkOrderBLL_Get, + WorkOrderBLL_GetPlanLabel, + WorkOrderBLL_SuspendOrder, + WorkOrderBLL_CancelSuspend, + WorkOrderBLL_DeleteOrder, + WorkOrderBLL_TakeBack, + WorkOrderBLL_ResetOrder, + WorkOrderBLL_GetPlanLabelBindProdut, + WorkOrderBLL_GetDayPlanCount, + /// + /// 插入产品信息 + /// + ProcessRecordBLL_Insert, + + /// + /// 抽检 + /// + ProductCheckBLL_GetList, + ProductCheckBLL_Delete, + + /// + /// + /// + MainCodeChangeBLL_GetList, + MainCodeChangeBLL_Insert, + MainCodeChangeBLL_Generate, + + + + + + #endregion + + } +} diff --git a/.svn/pristine/8e/8e757c7d9b1d89bba36fa848d728aa909f830a4c.svn-base b/.svn/pristine/8e/8e757c7d9b1d89bba36fa848d728aa909f830a4c.svn-base new file mode 100644 index 0000000..f103fad --- /dev/null +++ b/.svn/pristine/8e/8e757c7d9b1d89bba36fa848d728aa909f830a4c.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:搪塑称重记录 + /// 作 者:张松男 + /// 编写日期:2021年08月23日 + /// + [DBTable(TableName = "T_AW_TSWeighRecore")] + public class TSWeighRecore : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 产品编号 + /// + [Description("产品编号")] + [DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] + public string ProductCode { get; set; } + + /// + /// 颜色 + /// + [Description("颜色")] + [DBColumn(ColumnName = "PColour", DataType = DbType.String)] + public string PColour { get; set; } + + /// + /// 物料号 + /// + [Description("物料号")] + [DBColumn(ColumnName = "MATERIAL_CODE", DataType = DbType.String)] + public string MATERIAL_CODE { get; set; } + + /// + /// 重量 + /// + [Description("重量")] + [DBColumn(ColumnName = "Weigh", DataType = DbType.String)] + public string Weigh { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/8f/8f05a41f416fe862e646e41e0396e89cfd908242.svn-base b/.svn/pristine/8f/8f05a41f416fe862e646e41e0396e89cfd908242.svn-base new file mode 100644 index 0000000..b1c2e23 --- /dev/null +++ b/.svn/pristine/8f/8f05a41f416fe862e646e41e0396e89cfd908242.svn-base @@ -0,0 +1,900 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.902 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APPMain", "APPMain", "{2C939B71-BBA2-4616-A9BE-404C56FCB366}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ServicesCenter", "ServicesCenter", "{91B0A49A-8478-44F8-B6CC-D4E64921F264}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WCF", "WCF", "{B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APPMD", "APPMD", "{5A4446A5-1342-4A09-A213-B9A1BC05076F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HIS", "HIS", "{BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Task", "Task", "{29AE41FB-46EC-4102-9614-EDEB35A9AD19}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APPFJC", "APPFJC", "{2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppCommon", "AppCommon", "{9F8ED4EA-2682-47BF-82E6-03749ABE0B51}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsService", "WindowsService", "{10B7672E-97CF-4310-B2C8-6122B4662A48}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APPQualityTrace", "APPQualityTrace", "{2107F2D3-87B2-4AD7-929F-1E1A9505F2B2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "APPMESReport", "APPMESReport", "{87AA74DD-5103-463C-9F37-7B7A83F6394A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Exchange", "Exchange", "{91162D0F-11CD-4F5F-9712-3630C2B54CFF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.DAL", "APP\QMAPP.DAL\QMAPP.DAL.csproj", "{407204CD-0256-4EDD-8A89-26EBF83D19A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.BLL", "APP\QMAPP.BLL\QMAPP.BLL.csproj", "{DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMFrameWork.ServiceLibrary", "ServicesCenter\WCF\QMFrameWork.ServiceLibrary\QMFrameWork.ServiceLibrary.csproj", "{F68A116A-972E-4414-9B8A-43990136CE15}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMFrameWork.WebServiceHost", "ServicesCenter\WCF\QMFrameWork.WebServiceHost\QMFrameWork.WebServiceHost.csproj", "{AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MD.Web", "APPMD\QMAPP.MD.Web\QMAPP.MD.Web.csproj", "{4B533C1B-7D16-4BD3-9285-D6E7E9740645}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MD.Entity", "APPMD\QMAPP.MD.Entity\QMAPP.MD.Entity.csproj", "{A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MD.DAL", "APPMD\QMAPP.MD.DAL\QMAPP.MD.DAL.csproj", "{25F672F4-55A6-41B3-82DA-84233786D991}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MD.BLL", "APPMD\QMAPP.MD.BLL\QMAPP.MD.BLL.csproj", "{CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "ServicesCenter\HTIS\Common\Common.csproj", "{C78C8970-0737-4F36-8F54-137032EAFE41}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NET", "ServicesCenter\HTIS\NET\NET.csproj", "{35408EF2-9172-4D24-8850-617A80A9ABB8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NSC", "ServicesCenter\HTIS\NSC\NSC.csproj", "{8EA9F44F-1797-445E-B454-561393E80216}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SSC", "ServicesCenter\HTIS\SSC\SSC.csproj", "{FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMHTIS.Host", "ServicesCenter\HTIS\QMHTIS.Host\QMHTIS.Host.csproj", "{6A30AB27-80C1-4B10-8814-8CEAF14CDE17}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTIS.Model", "ServicesCenter\HTIS\HTIS.Model\HTIS.Model.csproj", "{69092965-DDD5-471F-BAE1-6FFBA9160199}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMTask.Core", "ServicesCenter\Task\QMTask.Core\QMTask.Core.csproj", "{DE241503-17EF-4355-B804-F1B0CE9A1BEA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMTask.Host", "ServicesCenter\Task\QMTask.Host\QMTask.Host.csproj", "{96055776-C503-40C4-8DC6-FBE444BE97FF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMTask.WindowService", "ServicesCenter\Task\QMTask.WindowService\QMTask.WindowService.csproj", "{F26CA9C6-7A28-410C-B334-334927D63C49}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMTask.Client", "APP\QMTask.Client\QMTask.Client.csproj", "{E26DBC82-8CEE-435E-805B-1756EA407F83}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMTask.DataDeal", "ServicesCenter\Task\QMTask.DataDeal\QMTask.DataDeal.csproj", "{13B61E0C-2A73-481F-8FDC-7240F472C845}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HTIS.BLL", "ServicesCenter\HTIS\HTIS.BLL\HTIS.BLL.csproj", "{B574FC6A-22CF-400C-9B20-24DF37FF46E6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.Web", "APP\QMAPP.Web\QMAPP.Web.csproj", "{08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OPCPLC", "ServicesCenter\WCF\OPCPLC\OPCPLC.csproj", "{B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EQUIPINTERFACETEST", "ServicesCenter\WCF\EQUIPINTERFACETEST\EQUIPINTERFACETEST.csproj", "{F05A2688-ACD0-4675-B70B-63C867870086}" + ProjectSection(ProjectDependencies) = postProject + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} = {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpcServerHost", "ServicesCenter\WCF\OpcServerHost\OpcServerHost.csproj", "{8122BE97-B883-4647-B64E-B83EFEA68111}" + ProjectSection(ProjectDependencies) = postProject + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} = {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFileAnalyticService", "AutoFileAnalyticService\AutoFileAnalyticService.csproj", "{2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoFileCopyNet", "AutoFileCopyNet\AutoFileCopyNet.csproj", "{DA50A8D5-D034-4D6B-92BB-776C95ECBA07}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Globale_Variablen", "Globale_Variablen\Globale_Variablen.csproj", "{5819E0E2-D471-4A7A-BD90-593B7BDE3422}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpcSlushWinService", "ServicesCenter\WCF\OpcWindowsService\OpcSlushWinService\OpcSlushWinService.csproj", "{E850BABF-EBEE-4706-9D9E-71BB71714B1E}" + ProjectSection(ProjectDependencies) = postProject + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} = {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirbagSupportPackageService", "ServicesCenter\WCF\AirbagSupportPackageService\AirbagSupportPackageService.csproj", "{79616082-F6DE-40C5-AB57-5257DBAB6D7C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMHTIS.HisService", "QMHTIS.HisService\QMHTIS.HisService.csproj", "{5B68EB12-CE98-448A-86DB-238A947C5EE8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsgSendService", "ServicesCenter\WCF\MsgSendService\MsgSendService.csproj", "{465A80D5-87C7-4877-80A0-8C560F688AF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpcServerTest", "OpcServerTest\OpcServerTest.csproj", "{ADC3E824-D827-48EE-A5FE-17325B447380}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Service", "Service\Service.csproj", "{C2F601C2-A2BF-40BA-AF82-B4906C1401C0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.ServicesAgent", "AppCommon\QMAPP.ServicesAgent\QMAPP.ServicesAgent.csproj", "{BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.Common.Web", "AppCommon\QMAPP.Common.Web\QMAPP.Common.Web.csproj", "{5FB9E7FC-1601-467C-86CE-6817DDE70DDE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.Entity", "APP\QMAPP.Entity\QMAPP.Entity.csproj", "{604FB24F-7706-497C-BEC7-27D7B6B5A82C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompleteStatisticsService", "ServicesCenter\WindowsServices\CompleteStatisticsService\CompleteStatisticsService.csproj", "{87D7693E-EBF5-42FF-994A-C0B325E7B529}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.QualityTrace.BLL", "APPQualityTrace\QMAPP.QualityTrace.BLL\QMAPP.QualityTrace.BLL.csproj", "{9F433CE1-5C8E-4BDA-A766-A799384AA7D9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.QualityTrace.DAL", "APPQualityTrace\QMAPP.QualityTrace.DAL\QMAPP.QualityTrace.DAL.csproj", "{96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.QualityTrace.Entity", "APPQualityTrace\QMAPP.QualityTrace.Entity\QMAPP.QualityTrace.Entity.csproj", "{6330BC50-A999-492D-8A4D-401CF7C35800}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.QualityTrace.Web", "APPQualityTrace\QMAPP.QualityTrace.Web\QMAPP.QualityTrace.Web.csproj", "{5268F122-635E-4B7A-B300-3F30821ACB3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.FJC.Entity", "APPQ5\QMAPP.FJC.Entity\QMAPP.FJC.Entity.csproj", "{17123CDD-0BA7-496F-8E4E-FCBABE0463CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.FJC.DAL", "APPQ5\QMAPP.FJC.DAL\QMAPP.FJC.DAL.csproj", "{063B6316-7154-4BD9-B546-21CCE4685235}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.FJC.BLL", "APPQ5\QMAPP.FJC.BLL\QMAPP.FJC.BLL.csproj", "{82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.FJC.Web", "APPQ5\QMAPP.FJC.Web\QMAPP.FJC.Web.csproj", "{47DECB89-B294-4ACC-BDB6-651DB8F18DDE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.WinForm", "APPQ5\QMAPP.WinForm\QMAPP.WinForm.csproj", "{2D1697C6-EB08-46CD-8A8A-27F66DEDE628}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MESReport.Entity", "APPMESReport\QMAPP.MESReport.Entity\QMAPP.MESReport.Entity.csproj", "{7471EDE2-2EDE-410F-94F0-98E6E903394B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MESReport.DAL", "APPMESReport\QMAPP.MESReport.DAL\QMAPP.MESReport.DAL.csproj", "{89C72747-F70D-4E1B-B427-28D797EACB37}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MESReport.BLL", "APPMESReport\QMAPP.MESReport.BLL\QMAPP.MESReport.BLL.csproj", "{BD0BEE96-3D9B-48E1-8932-9F7029097049}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.MESReport.Web", "APPMESReport\QMAPP.MESReport.Web\QMAPP.MESReport.Web.csproj", "{EEB50F42-4964-4A05-A71E-F0741F0F1E6A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QM.Exchange.Adapters", "Exchange\QM.Exchange.Adapters\QM.Exchange.Adapters.csproj", "{8A50A215-C033-42DC-A656-BC1F117DA6BA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QM.Exchange.Core", "Exchange\QM.Exchange.Core\QM.Exchange.Core.csproj", "{7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QM.Exchange.Custom", "Exchange\QM.Exchange.Custom\QM.Exchange.Custom.csproj", "{29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QM.Exchange.Interface", "Exchange\QM.Exchange.Interface\QM.Exchange.Interface.csproj", "{38B85333-B30F-4655-9D8B-186E4187DE57}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QM.ServiceHost", "Exchange\QM.ServiceHost\QM.ServiceHost.csproj", "{206CEF59-CCC5-458F-835C-FA0F43EC7C63}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MeterReadingService", "MeterReadingService\MeterReadingService.csproj", "{4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QMAPP.FJC.TRACING", "APPQ5\QMAPP.FJC.TRACING\QMAPP.FJC.TRACING.csproj", "{706750E7-6D42-4FE2-95BF-99E90F84BE07}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbService", "DbService\DbService.csproj", "{BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbMesB4Service", "DbMesB4Service\DbMesB4Service.csproj", "{FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimerService", "TimerService\TimerService.csproj", "{99707241-2A2E-4180-9C40-3EA76BD40036}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EquipmentAlarmMonitor", "ServicesCenter\WindowsServices\EquipmentAlarmMonitor\EquipmentAlarmMonitor.csproj", "{994A320E-D2A2-4079-89AF-6455DEC9A3BE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpcService", "ServicesCenter\WindowsServices\OpcService\OpcService.csproj", "{EE178BC8-C580-4795-91E9-5687512B9310}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessFileSyncService", "ProcessFileSyncService\ProcessFileSyncService.csproj", "{72A36698-CCFB-4A72-BD12-765F440BE486}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stone.WinModuleTransWare", "APPQ5\Stone.WinModuleTransWare\Stone.WinModuleTransWare\Stone.WinModuleTransWare.csproj", "{3AECE013-AC67-4F6F-9DB4-36577345F428}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Release|Any CPU.Build.0 = Release|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {407204CD-0256-4EDD-8A89-26EBF83D19A7}.Release|x86.ActiveCfg = Release|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Debug|x86.ActiveCfg = Debug|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Release|Any CPU.Build.0 = Release|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01}.Release|x86.ActiveCfg = Release|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Debug|x86.ActiveCfg = Debug|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Release|Any CPU.Build.0 = Release|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F68A116A-972E-4414-9B8A-43990136CE15}.Release|x86.ActiveCfg = Release|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Debug|x86.ActiveCfg = Debug|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Release|Any CPU.Build.0 = Release|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598}.Release|x86.ActiveCfg = Release|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Debug|x86.ActiveCfg = Debug|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Release|Any CPU.Build.0 = Release|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4B533C1B-7D16-4BD3-9285-D6E7E9740645}.Release|x86.ActiveCfg = Release|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Release|Any CPU.Build.0 = Release|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E}.Release|x86.ActiveCfg = Release|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Debug|x86.ActiveCfg = Debug|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Release|Any CPU.Build.0 = Release|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {25F672F4-55A6-41B3-82DA-84233786D991}.Release|x86.ActiveCfg = Release|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Release|Any CPU.Build.0 = Release|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C}.Release|x86.ActiveCfg = Release|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Debug|x86.ActiveCfg = Debug|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Release|Any CPU.Build.0 = Release|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C78C8970-0737-4F36-8F54-137032EAFE41}.Release|x86.ActiveCfg = Release|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Debug|x86.ActiveCfg = Debug|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Release|Any CPU.Build.0 = Release|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {35408EF2-9172-4D24-8850-617A80A9ABB8}.Release|x86.ActiveCfg = Release|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Debug|x86.ActiveCfg = Debug|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Release|Any CPU.Build.0 = Release|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8EA9F44F-1797-445E-B454-561393E80216}.Release|x86.ActiveCfg = Release|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Debug|x86.ActiveCfg = Debug|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Release|Any CPU.Build.0 = Release|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3}.Release|x86.ActiveCfg = Release|Any CPU + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Debug|Any CPU.ActiveCfg = Debug|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Debug|x86.ActiveCfg = Debug|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Debug|x86.Build.0 = Debug|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Release|Any CPU.ActiveCfg = Release|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Release|Mixed Platforms.Build.0 = Release|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Release|x86.ActiveCfg = Release|x86 + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17}.Release|x86.Build.0 = Release|x86 + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Debug|Any CPU.Build.0 = Debug|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Debug|x86.ActiveCfg = Debug|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Release|Any CPU.ActiveCfg = Release|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Release|Any CPU.Build.0 = Release|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {69092965-DDD5-471F-BAE1-6FFBA9160199}.Release|x86.ActiveCfg = Release|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Release|Any CPU.Build.0 = Release|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DE241503-17EF-4355-B804-F1B0CE9A1BEA}.Release|x86.ActiveCfg = Release|Any CPU + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Debug|Any CPU.ActiveCfg = Debug|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Debug|x86.ActiveCfg = Debug|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Debug|x86.Build.0 = Debug|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Release|Any CPU.ActiveCfg = Release|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Release|Mixed Platforms.Build.0 = Release|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Release|x86.ActiveCfg = Release|x86 + {96055776-C503-40C4-8DC6-FBE444BE97FF}.Release|x86.Build.0 = Release|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Debug|Any CPU.ActiveCfg = Debug|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Debug|x86.ActiveCfg = Debug|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Debug|x86.Build.0 = Debug|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Release|Any CPU.ActiveCfg = Release|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Release|Mixed Platforms.Build.0 = Release|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Release|x86.ActiveCfg = Release|x86 + {F26CA9C6-7A28-410C-B334-334927D63C49}.Release|x86.Build.0 = Release|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Debug|Any CPU.ActiveCfg = Debug|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Debug|x86.ActiveCfg = Debug|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Debug|x86.Build.0 = Debug|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Release|Any CPU.ActiveCfg = Release|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Release|Mixed Platforms.Build.0 = Release|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Release|x86.ActiveCfg = Release|x86 + {E26DBC82-8CEE-435E-805B-1756EA407F83}.Release|x86.Build.0 = Release|x86 + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Debug|x86.ActiveCfg = Debug|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Release|Any CPU.Build.0 = Release|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {13B61E0C-2A73-481F-8FDC-7240F472C845}.Release|x86.ActiveCfg = Release|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Debug|x86.ActiveCfg = Debug|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Release|Any CPU.Build.0 = Release|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B574FC6A-22CF-400C-9B20-24DF37FF46E6}.Release|x86.ActiveCfg = Release|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Debug|x86.ActiveCfg = Debug|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Release|Any CPU.Build.0 = Release|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89}.Release|x86.ActiveCfg = Release|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Debug|x86.ActiveCfg = Debug|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Release|Any CPU.Build.0 = Release|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2}.Release|x86.ActiveCfg = Release|Any CPU + {F05A2688-ACD0-4675-B70B-63C867870086}.Debug|Any CPU.ActiveCfg = Debug|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Debug|x86.ActiveCfg = Debug|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Debug|x86.Build.0 = Debug|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Release|Any CPU.ActiveCfg = Release|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Release|Mixed Platforms.Build.0 = Release|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Release|x86.ActiveCfg = Release|x86 + {F05A2688-ACD0-4675-B70B-63C867870086}.Release|x86.Build.0 = Release|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Debug|Any CPU.ActiveCfg = Debug|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Debug|x86.ActiveCfg = Debug|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Debug|x86.Build.0 = Debug|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Release|Any CPU.ActiveCfg = Release|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Release|Mixed Platforms.Build.0 = Release|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Release|x86.ActiveCfg = Release|x86 + {8122BE97-B883-4647-B64E-B83EFEA68111}.Release|x86.Build.0 = Release|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Debug|Any CPU.ActiveCfg = Debug|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Debug|x86.ActiveCfg = Debug|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Debug|x86.Build.0 = Debug|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Release|Any CPU.ActiveCfg = Release|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Release|Mixed Platforms.Build.0 = Release|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Release|x86.ActiveCfg = Release|x86 + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4}.Release|x86.Build.0 = Release|x86 + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Debug|x86.ActiveCfg = Debug|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Release|Any CPU.Build.0 = Release|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07}.Release|x86.ActiveCfg = Release|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Debug|x86.ActiveCfg = Debug|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Release|Any CPU.Build.0 = Release|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {5819E0E2-D471-4A7A-BD90-593B7BDE3422}.Release|x86.ActiveCfg = Release|Any CPU + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Debug|x86.ActiveCfg = Debug|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Debug|x86.Build.0 = Debug|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Release|Any CPU.ActiveCfg = Release|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Release|Mixed Platforms.Build.0 = Release|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Release|x86.ActiveCfg = Release|x86 + {E850BABF-EBEE-4706-9D9E-71BB71714B1E}.Release|x86.Build.0 = Release|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Debug|Any CPU.ActiveCfg = Debug|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Debug|x86.ActiveCfg = Debug|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Debug|x86.Build.0 = Debug|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Release|Any CPU.ActiveCfg = Release|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Release|Mixed Platforms.Build.0 = Release|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Release|x86.ActiveCfg = Release|x86 + {79616082-F6DE-40C5-AB57-5257DBAB6D7C}.Release|x86.Build.0 = Release|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Debug|Any CPU.ActiveCfg = Debug|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Debug|x86.ActiveCfg = Debug|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Debug|x86.Build.0 = Debug|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Release|Any CPU.ActiveCfg = Release|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Release|Mixed Platforms.Build.0 = Release|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Release|x86.ActiveCfg = Release|x86 + {5B68EB12-CE98-448A-86DB-238A947C5EE8}.Release|x86.Build.0 = Release|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Debug|Any CPU.ActiveCfg = Debug|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Debug|x86.ActiveCfg = Debug|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Debug|x86.Build.0 = Debug|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Release|Any CPU.ActiveCfg = Release|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Release|Mixed Platforms.Build.0 = Release|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Release|x86.ActiveCfg = Release|x86 + {465A80D5-87C7-4877-80A0-8C560F688AF2}.Release|x86.Build.0 = Release|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Debug|Any CPU.ActiveCfg = Debug|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Debug|x86.ActiveCfg = Debug|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Debug|x86.Build.0 = Debug|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Release|Any CPU.ActiveCfg = Release|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Release|Mixed Platforms.Build.0 = Release|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Release|x86.ActiveCfg = Release|x86 + {ADC3E824-D827-48EE-A5FE-17325B447380}.Release|x86.Build.0 = Release|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Debug|Any CPU.ActiveCfg = Debug|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Debug|x86.ActiveCfg = Debug|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Debug|x86.Build.0 = Debug|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Release|Any CPU.ActiveCfg = Release|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Release|Mixed Platforms.Build.0 = Release|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Release|x86.ActiveCfg = Release|x86 + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0}.Release|x86.Build.0 = Release|x86 + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Debug|x86.ActiveCfg = Debug|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Release|Any CPU.Build.0 = Release|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91}.Release|x86.ActiveCfg = Release|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Debug|x86.ActiveCfg = Debug|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Release|Any CPU.Build.0 = Release|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE}.Release|x86.ActiveCfg = Release|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Debug|x86.ActiveCfg = Debug|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Release|Any CPU.Build.0 = Release|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {604FB24F-7706-497C-BEC7-27D7B6B5A82C}.Release|x86.ActiveCfg = Release|Any CPU + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Debug|Any CPU.ActiveCfg = Debug|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Debug|x86.ActiveCfg = Debug|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Debug|x86.Build.0 = Debug|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Release|Any CPU.ActiveCfg = Release|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Release|Mixed Platforms.Build.0 = Release|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Release|x86.ActiveCfg = Release|x86 + {87D7693E-EBF5-42FF-994A-C0B325E7B529}.Release|x86.Build.0 = Release|x86 + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Debug|x86.ActiveCfg = Debug|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Release|Any CPU.Build.0 = Release|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9}.Release|x86.ActiveCfg = Release|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Debug|x86.ActiveCfg = Debug|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Release|Any CPU.Build.0 = Release|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA}.Release|x86.ActiveCfg = Release|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Debug|x86.ActiveCfg = Debug|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Release|Any CPU.Build.0 = Release|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6330BC50-A999-492D-8A4D-401CF7C35800}.Release|x86.ActiveCfg = Release|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Debug|x86.ActiveCfg = Debug|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Release|Any CPU.Build.0 = Release|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {5268F122-635E-4B7A-B300-3F30821ACB3C}.Release|x86.ActiveCfg = Release|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Debug|x86.ActiveCfg = Debug|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Release|Any CPU.Build.0 = Release|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA}.Release|x86.ActiveCfg = Release|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Debug|Any CPU.Build.0 = Debug|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Debug|x86.ActiveCfg = Debug|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Release|Any CPU.ActiveCfg = Release|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Release|Any CPU.Build.0 = Release|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {063B6316-7154-4BD9-B546-21CCE4685235}.Release|x86.ActiveCfg = Release|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Release|Any CPU.Build.0 = Release|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0}.Release|x86.ActiveCfg = Release|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Debug|x86.ActiveCfg = Debug|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Release|Any CPU.Build.0 = Release|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE}.Release|x86.ActiveCfg = Release|Any CPU + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Debug|Any CPU.ActiveCfg = Debug|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Debug|x86.ActiveCfg = Debug|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Debug|x86.Build.0 = Debug|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Release|Any CPU.ActiveCfg = Release|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Release|Mixed Platforms.Build.0 = Release|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Release|x86.ActiveCfg = Release|x86 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628}.Release|x86.Build.0 = Release|x86 + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Debug|x86.ActiveCfg = Debug|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Release|Any CPU.Build.0 = Release|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7471EDE2-2EDE-410F-94F0-98E6E903394B}.Release|x86.ActiveCfg = Release|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Debug|x86.ActiveCfg = Debug|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Release|Any CPU.Build.0 = Release|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {89C72747-F70D-4E1B-B427-28D797EACB37}.Release|x86.ActiveCfg = Release|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Debug|x86.ActiveCfg = Debug|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Release|Any CPU.Build.0 = Release|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {BD0BEE96-3D9B-48E1-8932-9F7029097049}.Release|x86.ActiveCfg = Release|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Debug|x86.ActiveCfg = Debug|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Release|Any CPU.Build.0 = Release|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A}.Release|x86.ActiveCfg = Release|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Debug|x86.ActiveCfg = Debug|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Release|Any CPU.Build.0 = Release|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8A50A215-C033-42DC-A656-BC1F117DA6BA}.Release|x86.ActiveCfg = Release|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Debug|x86.ActiveCfg = Debug|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Release|Any CPU.Build.0 = Release|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C}.Release|x86.ActiveCfg = Release|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Debug|x86.ActiveCfg = Debug|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Release|Any CPU.Build.0 = Release|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A}.Release|x86.ActiveCfg = Release|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Debug|x86.ActiveCfg = Debug|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Release|Any CPU.Build.0 = Release|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {38B85333-B30F-4655-9D8B-186E4187DE57}.Release|x86.ActiveCfg = Release|Any CPU + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Debug|Any CPU.ActiveCfg = Debug|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Debug|x86.ActiveCfg = Debug|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Debug|x86.Build.0 = Debug|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Release|Any CPU.ActiveCfg = Release|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Release|Mixed Platforms.Build.0 = Release|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Release|x86.ActiveCfg = Release|x86 + {206CEF59-CCC5-458F-835C-FA0F43EC7C63}.Release|x86.Build.0 = Release|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Debug|Any CPU.ActiveCfg = Debug|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Debug|x86.ActiveCfg = Debug|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Debug|x86.Build.0 = Debug|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Release|Any CPU.ActiveCfg = Release|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Release|Mixed Platforms.Build.0 = Release|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Release|x86.ActiveCfg = Release|x86 + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29}.Release|x86.Build.0 = Release|x86 + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Debug|Any CPU.Build.0 = Debug|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Debug|x86.ActiveCfg = Debug|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Release|Any CPU.ActiveCfg = Release|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Release|Any CPU.Build.0 = Release|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {706750E7-6D42-4FE2-95BF-99E90F84BE07}.Release|x86.ActiveCfg = Release|Any CPU + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Debug|Any CPU.ActiveCfg = Debug|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Debug|x86.ActiveCfg = Debug|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Debug|x86.Build.0 = Debug|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Release|Any CPU.ActiveCfg = Release|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Release|Mixed Platforms.Build.0 = Release|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Release|x86.ActiveCfg = Release|x86 + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D}.Release|x86.Build.0 = Release|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Debug|Any CPU.ActiveCfg = Debug|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Debug|x86.ActiveCfg = Debug|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Debug|x86.Build.0 = Debug|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Release|Any CPU.ActiveCfg = Release|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Release|Mixed Platforms.Build.0 = Release|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Release|x86.ActiveCfg = Release|x86 + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2}.Release|x86.Build.0 = Release|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Debug|Any CPU.ActiveCfg = Debug|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Debug|x86.ActiveCfg = Debug|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Debug|x86.Build.0 = Debug|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Release|Any CPU.ActiveCfg = Release|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Release|Mixed Platforms.Build.0 = Release|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Release|x86.ActiveCfg = Release|x86 + {99707241-2A2E-4180-9C40-3EA76BD40036}.Release|x86.Build.0 = Release|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Debug|Any CPU.ActiveCfg = Debug|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Debug|x86.ActiveCfg = Debug|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Debug|x86.Build.0 = Debug|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Release|Any CPU.ActiveCfg = Release|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Release|Mixed Platforms.Build.0 = Release|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Release|x86.ActiveCfg = Release|x86 + {994A320E-D2A2-4079-89AF-6455DEC9A3BE}.Release|x86.Build.0 = Release|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Debug|Any CPU.ActiveCfg = Debug|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Debug|x86.ActiveCfg = Debug|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Debug|x86.Build.0 = Debug|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Release|Any CPU.ActiveCfg = Release|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Release|Mixed Platforms.Build.0 = Release|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Release|x86.ActiveCfg = Release|x86 + {EE178BC8-C580-4795-91E9-5687512B9310}.Release|x86.Build.0 = Release|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Debug|Any CPU.ActiveCfg = Debug|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Debug|x86.ActiveCfg = Debug|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Debug|x86.Build.0 = Debug|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Release|Any CPU.ActiveCfg = Release|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Release|Mixed Platforms.Build.0 = Release|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Release|x86.ActiveCfg = Release|x86 + {72A36698-CCFB-4A72-BD12-765F440BE486}.Release|x86.Build.0 = Release|x86 + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|x86.ActiveCfg = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Debug|x86.Build.0 = Debug|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|Any CPU.Build.0 = Release|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|x86.ActiveCfg = Release|Any CPU + {3AECE013-AC67-4F6F-9DB4-36577345F428}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} = {91B0A49A-8478-44F8-B6CC-D4E64921F264} + {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} = {91B0A49A-8478-44F8-B6CC-D4E64921F264} + {29AE41FB-46EC-4102-9614-EDEB35A9AD19} = {91B0A49A-8478-44F8-B6CC-D4E64921F264} + {10B7672E-97CF-4310-B2C8-6122B4662A48} = {91B0A49A-8478-44F8-B6CC-D4E64921F264} + {407204CD-0256-4EDD-8A89-26EBF83D19A7} = {2C939B71-BBA2-4616-A9BE-404C56FCB366} + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} = {2C939B71-BBA2-4616-A9BE-404C56FCB366} + {F68A116A-972E-4414-9B8A-43990136CE15} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {AE29E811-0DFD-4A7B-9F3E-0EA8EEB1F598} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {4B533C1B-7D16-4BD3-9285-D6E7E9740645} = {5A4446A5-1342-4A09-A213-B9A1BC05076F} + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} = {5A4446A5-1342-4A09-A213-B9A1BC05076F} + {25F672F4-55A6-41B3-82DA-84233786D991} = {5A4446A5-1342-4A09-A213-B9A1BC05076F} + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} = {5A4446A5-1342-4A09-A213-B9A1BC05076F} + {C78C8970-0737-4F36-8F54-137032EAFE41} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {35408EF2-9172-4D24-8850-617A80A9ABB8} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {8EA9F44F-1797-445E-B454-561393E80216} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {FBDDF0DB-FC62-4C51-90A8-85F8F9F6CFE3} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {6A30AB27-80C1-4B10-8814-8CEAF14CDE17} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {69092965-DDD5-471F-BAE1-6FFBA9160199} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {DE241503-17EF-4355-B804-F1B0CE9A1BEA} = {29AE41FB-46EC-4102-9614-EDEB35A9AD19} + {96055776-C503-40C4-8DC6-FBE444BE97FF} = {29AE41FB-46EC-4102-9614-EDEB35A9AD19} + {F26CA9C6-7A28-410C-B334-334927D63C49} = {29AE41FB-46EC-4102-9614-EDEB35A9AD19} + {E26DBC82-8CEE-435E-805B-1756EA407F83} = {2C939B71-BBA2-4616-A9BE-404C56FCB366} + {13B61E0C-2A73-481F-8FDC-7240F472C845} = {29AE41FB-46EC-4102-9614-EDEB35A9AD19} + {B574FC6A-22CF-400C-9B20-24DF37FF46E6} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {08D34B35-B9CE-4C0C-98A8-1A191AEB2D89} = {2C939B71-BBA2-4616-A9BE-404C56FCB366} + {B8BBFF73-8CC6-477A-A4E8-EC45EF0680E2} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {F05A2688-ACD0-4675-B70B-63C867870086} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {8122BE97-B883-4647-B64E-B83EFEA68111} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {2FFFDCF7-F519-4B04-AA27-B2E9CA7C26E4} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {DA50A8D5-D034-4D6B-92BB-776C95ECBA07} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {5819E0E2-D471-4A7A-BD90-593B7BDE3422} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {E850BABF-EBEE-4706-9D9E-71BB71714B1E} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {79616082-F6DE-40C5-AB57-5257DBAB6D7C} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {5B68EB12-CE98-448A-86DB-238A947C5EE8} = {BBD0FFE7-A565-4BC0-8B56-D8F3BBB9213F} + {465A80D5-87C7-4877-80A0-8C560F688AF2} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {ADC3E824-D827-48EE-A5FE-17325B447380} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {C2F601C2-A2BF-40BA-AF82-B4906C1401C0} = {B0731F6D-EA8F-486E-A25E-AAABD8CFF8E2} + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE} = {9F8ED4EA-2682-47BF-82E6-03749ABE0B51} + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} = {2C939B71-BBA2-4616-A9BE-404C56FCB366} + {87D7693E-EBF5-42FF-994A-C0B325E7B529} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {9F433CE1-5C8E-4BDA-A766-A799384AA7D9} = {2107F2D3-87B2-4AD7-929F-1E1A9505F2B2} + {96C058CF-B0DE-4F1C-ADF7-C8C257CD2EBA} = {2107F2D3-87B2-4AD7-929F-1E1A9505F2B2} + {6330BC50-A999-492D-8A4D-401CF7C35800} = {2107F2D3-87B2-4AD7-929F-1E1A9505F2B2} + {5268F122-635E-4B7A-B300-3F30821ACB3C} = {2107F2D3-87B2-4AD7-929F-1E1A9505F2B2} + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {063B6316-7154-4BD9-B546-21CCE4685235} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {7471EDE2-2EDE-410F-94F0-98E6E903394B} = {87AA74DD-5103-463C-9F37-7B7A83F6394A} + {89C72747-F70D-4E1B-B427-28D797EACB37} = {87AA74DD-5103-463C-9F37-7B7A83F6394A} + {BD0BEE96-3D9B-48E1-8932-9F7029097049} = {87AA74DD-5103-463C-9F37-7B7A83F6394A} + {EEB50F42-4964-4A05-A71E-F0741F0F1E6A} = {87AA74DD-5103-463C-9F37-7B7A83F6394A} + {8A50A215-C033-42DC-A656-BC1F117DA6BA} = {91162D0F-11CD-4F5F-9712-3630C2B54CFF} + {7CF32FCB-02A2-45C6-8B25-FADB7EB72F0C} = {91162D0F-11CD-4F5F-9712-3630C2B54CFF} + {29AF6DAF-30E4-4A77-995B-A4F0E35C5A3A} = {91162D0F-11CD-4F5F-9712-3630C2B54CFF} + {38B85333-B30F-4655-9D8B-186E4187DE57} = {91162D0F-11CD-4F5F-9712-3630C2B54CFF} + {206CEF59-CCC5-458F-835C-FA0F43EC7C63} = {91162D0F-11CD-4F5F-9712-3630C2B54CFF} + {4BFCFF32-BD47-4AC5-83BC-45C9DA6B7B29} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {706750E7-6D42-4FE2-95BF-99E90F84BE07} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + {BEC54FF0-1DA4-4A13-B6A2-5398364A4C4D} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {FC98D1C8-F2F0-40FD-908E-2400BFB6D0D2} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {99707241-2A2E-4180-9C40-3EA76BD40036} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {994A320E-D2A2-4079-89AF-6455DEC9A3BE} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {EE178BC8-C580-4795-91E9-5687512B9310} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {72A36698-CCFB-4A72-BD12-765F440BE486} = {10B7672E-97CF-4310-B2C8-6122B4662A48} + {3AECE013-AC67-4F6F-9DB4-36577345F428} = {2C1B5D21-3E27-4C6A-86A6-DA56AAB311ED} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {309CB55E-489B-416A-9661-6E854D0F3FC5} + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/.svn/pristine/8f/8f1d8f1e29bcbec97c1ec58a61e6b1d11c01673d.svn-base b/.svn/pristine/8f/8f1d8f1e29bcbec97c1ec58a61e6b1d11c01673d.svn-base new file mode 100644 index 0000000..4cc339f Binary files /dev/null and b/.svn/pristine/8f/8f1d8f1e29bcbec97c1ec58a61e6b1d11c01673d.svn-base differ diff --git a/.svn/pristine/8f/8f465fec038b6970f2078e7cbd3d7295faeff1f6.svn-base b/.svn/pristine/8f/8f465fec038b6970f2078e7cbd3d7295faeff1f6.svn-base new file mode 100644 index 0000000..4c9f1e3 --- /dev/null +++ b/.svn/pristine/8f/8f465fec038b6970f2078e7cbd3d7295faeff1f6.svn-base @@ -0,0 +1,48 @@ +using System; +using System.Windows.Forms; + +namespace QMAPP.WinForm +{ + public static class MessageHelper + { + public static void ShowEx(Exception ex) + { + ex = GetInnerException(ex); + var str = ex.ToString().Length > 100 ? ex.Message : ex.ToString(); + MessageBox.Show(str, "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop); + LogHelper.Write(ex.ToString()); + } + + private static Exception GetInnerException(Exception ex) + { + while (true) + { + if (ex.InnerException == null) return ex; + ex = ex.InnerException; + } + } + + public static void ShowError(string msg) + { + MessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); + LogHelper.Write(msg); + } + + public static void ShowWarning(string msg) + { + MessageBox.Show(msg, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + + public static bool ShowQuestion(string msg) + { + var result = MessageBox.Show(msg, "问题", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); + return result == DialogResult.Yes; + } + + public static void ShowInfo(string msg) + { + if (string.IsNullOrEmpty(msg)) return; + MessageBox.Show(msg, "信息", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } +} diff --git a/.svn/pristine/8f/8f562ff96c627dbf5a6c3a98f2f2247159b2eb0a.svn-base b/.svn/pristine/8f/8f562ff96c627dbf5a6c3a98f2f2247159b2eb0a.svn-base new file mode 100644 index 0000000..399111a --- /dev/null +++ b/.svn/pristine/8f/8f562ff96c627dbf5a6c3a98f2f2247159b2eb0a.svn-base @@ -0,0 +1,52 @@ +using System.IO; +using System.Reflection; +using System.Text; + +namespace QMAPP.WinForm +{ + public static class FileHelper + { + public static string GetApplicationPath() + { + string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); + path = path.Replace(@"file:\", ""); + if (path.Substring(path.Length - 1, 1) != @"\") + { + path += @"\"; + } + return path; + } + + public static void Create(string path) + { + if (!Directory.Exists(path)) + Directory.CreateDirectory(path); + } + + public static bool Exists(string filename) + { + filename = GetApplicationPath() + filename; + return File.Exists(filename); + } + + public static void WriteFile(string filename, string str, bool isAppand = false) + { + filename = GetApplicationPath() + filename; + var sw = new StreamWriter(filename, isAppand, Encoding.Unicode); + sw.Write(str); + sw.Close(); + } + + + public static string ReadFile(string filename, Encoding encoding = null) + { + if (encoding == null) + encoding = Encoding.Unicode; + filename = GetApplicationPath() + filename; + var sr = new StreamReader(filename, encoding); + var str = sr.ReadToEnd(); + sr.Close(); + return str; + } + } +} \ No newline at end of file diff --git a/.svn/pristine/92/92e5caaf539d004166561fb45576ca1bfcbfb847.svn-base b/.svn/pristine/92/92e5caaf539d004166561fb45576ca1bfcbfb847.svn-base new file mode 100644 index 0000000..5d5250c --- /dev/null +++ b/.svn/pristine/92/92e5caaf539d004166561fb45576ca1bfcbfb847.svn-base @@ -0,0 +1,740 @@ + + + + + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 设置密码 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 查看/回复 + 导出 + + + + + 查询 + 导出 + + + + + + + + + 保存 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + 配置设备 + + + + + 查询 + 新建 + 修改 + 删除 + 工序配置 + + + + + 查询 + 新建 + 删除 + 配置BOM明细 + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加1 + 添加2 + 删除 + + + + + 查询 + 修改 + 同步数据 + + + + + 查询 + 修改 + 启用 + 禁用 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + + + + + 查询 + 修改 + + + + + 查询 + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 添加 + 整车添加 + 修改 + 修改计划顺序号 + 插单 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 新建 + 修改 + 修改计划顺序号 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 导出 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 盘点明细 + 盘点对比 + 比对结果 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + + 查询 + 添加 + 编辑 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 查看明细 + 导出 + + + + + + 查询 + 导出 + + + + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出Excel + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/93/932af8e6b40110b59eaf093ffcd90c46c469bed7.svn-base b/.svn/pristine/93/932af8e6b40110b59eaf093ffcd90c46c469bed7.svn-base new file mode 100644 index 0000000..274a293 --- /dev/null +++ b/.svn/pristine/93/932af8e6b40110b59eaf093ffcd90c46c469bed7.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.Entity; +using QMFrameWork.Data.Attributes; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.MD.Entity.Bucket +{ + /// + /// 模块名称:注塑打印记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + [DBTable(TableName = "T_MD_RawMaterialRecord")] + public class RawMaterialRecord : BaseEntity + { + /// + /// 主键 + /// + [Description("主键")] + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 投料ID + /// + [Description("投料ID")] + [DBColumn(ColumnName = "RawMaterialPID", DataType = DbType.String)] + public string RawMaterialPID { get; set; } + + /// + /// 注塑条码 + /// + [Description("注塑条码")] + [DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] + public string ProductCode { get; set; } + + /// + /// 物料号 + /// + [Description("物料号")] + [DBColumn(ColumnName = "MaterialCode", DataType = DbType.String)] + public string MaterialCode { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [DBColumn(ColumnName = "IsCheck", DataType = DbType.String)] + public string IsCheck { get; set; } + + /// + /// 创建用户 + /// + [Description("创建用户")] + [DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] + public string CREATEUSER { get; set; } + + /// + /// 创建时间 + /// + [Description("创建时间")] + [DBColumn(ColumnName = "CREATEDATE", DataType = DbType.String)] + public string CREATEDATE { get; set; } + + /// + /// 修改用户 + /// + [Description("修改用户")] + [DBColumn(ColumnName = "UPDATEUSER", DataType = DbType.String)] + public string UPDATEUSER { get; set; } + + /// + /// 修改时间 + /// + [Description("修改时间")] + [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.String)] + public string UPDATEDATE { get; set; } + + } +} diff --git a/.svn/pristine/94/94c81665efb6969ffa18e5f4ac7a4ede9a17d2a3.svn-base b/.svn/pristine/94/94c81665efb6969ffa18e5f4ac7a4ede9a17d2a3.svn-base new file mode 100644 index 0000000..64297f6 --- /dev/null +++ b/.svn/pristine/94/94c81665efb6969ffa18e5f4ac7a4ede9a17d2a3.svn-base @@ -0,0 +1,1922 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628} + WinExe + Properties + QMAPP.WinForm + QMAPP.WinForm + v4.0 + + + 512 + SAK + SAK + SAK + SAK + true + E:\Deploy\CDMES\Winform\ + true + Web + true + Foreground + 7 + Days + true + true + true + http://10.111.144.97:8088/ + http://10.111.144.97:8088/ + Trace System + ADIENT + 1.0.0.0 + true + Default.htm + true + 35 + 1.0.1.%2a + false + true + true + true + Relative + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\QMAPP.WinForm.XML + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + D7B0D251F30AE957B8EE42D7C0AD873E0F75B094 + + + + + + + true + + + false + + + cfaa-mes.ico + + + + false + + + QMSetupKey.pfx + + + + True + + + ..\..\DLL\BarcodeLib.dll + + + + + + False + ..\..\DLL\FastReport\FastReport.dll + + + ..\..\packages\HZH_Controls.1.0.11\lib\net40\HZH_Controls.dll + + + ..\..\DLL\Interop.gregn6Lib.dll + True + + + False + True + bin\Debug\Interop.Microsoft.Office.Core.dll + + + False + True + bin\Debug\Interop.Microsoft.Office.Interop.Excel.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + False + ..\..\DLL\PlaySound.dll + + + False + ..\..\DLL\QMCommon.dll + + + False + ..\..\DLL\QMConfig.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + False + ..\..\DLL\QMWinCommon.dll + + + + + + + + + + + + + + + + + + ..\..\DLL\ThoughtWorks.QRCode.dll + + + + + + + + + Component + + + UserControl + + + Pager.cs + + + + + + + + + + + + + + + + + + + + + + Form + + + CallManageForm.cs + + + + Form + + + frmAlertConfirm.cs + + + Form + + + LeakInspection.cs + + + Form + + + DefaultDataSetNum.cs + + + + Form + + + FrmCarCardDetail.cs + + + Form + + + FrmCarCardPrintShow.cs + + + Form + + + FrmItemList.cs + + + Form + + + frmLineSetting.cs + + + Form + + + FrmPlace.cs + + + True + True + PastCard.rpt + Component + + + + + Form + + + ResetSendIndexForm.cs + + + Form + + + DPShipment.cs + + + Form + + + InjectPasswordForm.cs + + + Form + + + InjectPrintForm.cs + + + Form + + + InjectionCodePrint.cs + + + Form + + + MaterialTreeForm.cs + + + + Form + + + DPLabelRegenerate.cs + + + Form + + + InjectIntoBarcode.cs + + + Form + + + InjectPlat.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + MainCodeChangeEditForm.cs + + + Form + + + MainCodeChangeForm.cs + + + Form + + + MendReasonSubDefects.cs + + + Form + + + MendRecorderWasteForm.cs + + + Form + + + ProductCheckAddForm.cs + + + Form + + + ProductCheckDetailForm.cs + + + Form + + + ProductCheckForm.cs + + + Form + + + ProductCheckValuesFrom.cs + + + Form + + + ReplaceForm.cs + + + Form + + + MendRecorderReasonForm.cs + + + Form + + + BZDPasswordForm.cs + + + Form + + + BZDRePrintForm.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + frmInspectSkipping.cs + + + Form + + + PrintPlanLabel.cs + + + Form + + + frmFISBreakConfirm.cs + + + Form + + + ProductInForm.cs + + + Form + + + ProductInSendCodeForm.cs + + + Form + + + ProductInfo.cs + + + Form + + + DPAssemblyCodePrintForm.cs + + + Form + + + DoorFrameForm.cs + + + Form + + + EquipmentAlarmForm.cs + + + Form + + + FisM100ListForm.cs + + + Form + + + CastCounterSet.cs + + + Form + + + InjectionCheckForm.cs + + + Form + + + InjectionCheckListForm.cs + + + Form + + + InjectionScarpForm.cs + + + Form + + + SingleSlushMoldConfig.cs + + + Form + + + SingleSlushMoldConfigEdit.cs + + + Form + + + SlushMoldingEditForm.cs + + + Form + + + SlushMoldingForm.cs + + + Form + + + SlushMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForm.cs + + + Form + + + EquipmentMaintainEditForm.cs + + + Form + + + EquipmentMaintainForm.cs + + + Form + + + InjectionMoldingEditForm.cs + + + Form + + + InjectionMoldingForm.cs + + + Form + + + InjectionMoldingPrintForm.cs + + + Form + + + ProductBundleForm.cs + + + Form + + + InjectionMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForOldForm.cs + + + Form + + + PouringMoldingEditForm.cs + + + Form + + + PouringMoldingForm.cs + + + Form + + + SlushMoldingPrintLotForm.cs + + + Form + + + InjectionMoldingPrintLotForm.cs + + + Form + + + SlushMoldSet.cs + + + Form + + + SlushScarpForm.cs + + + Form + + + MachineCheckEditForm.cs + + + Form + + + MachineCheckForm.cs + + + Form + + + ItemForm.cs + + + Form + + + MendRecorderForm.cs + + + Form + + + MendRecorderCreateForm.cs + + + Form + + + MendRecorderFinishForm.cs + + + Form + + + MendStaticForm.cs + + + Form + + + SpecifyForm.cs + + + Form + + + TestForm.cs + + + Form + + + VideoTypeEditForm.cs + + + Form + + + MediaPlayerForm.cs + + + Form + + + MediaPlayerSubForm.cs + + + Form + + + MediaPlayerEditForm.cs + + + Form + + + VideoTypeForm.cs + + + Form + + + MainOperationSearchForm.cs + + + Form + + + PrintForm.cs + + + + Form + + + ProductAddForm.cs + + + Form + + + RepairForm.cs + + + Form + + + OperationForm.cs + + + Form + + + SetProcessPassForm.cs + + + Form + + + SPCControlForm.cs + + + Form + + + MainOperationStaticForm.cs + + + Form + + + SlushPlanEditForm.cs + + + Form + + + SlushPlanForm.cs + + + Form + + + ReprintForm.cs + + + Form + + + OutWarehouseForm.cs + + + Form + + + SendPlanSearchEditForm.cs + + + Form + + + SendPlanSearchForm.cs + + + Form + + + SendPlanPrintForm.cs + + + Form + + + EditUserForm.cs + + + Form + + + ManageUserForm.cs + + + Form + + + InWarehouseForm.cs + + + Form + + + SendCodeForm.cs + + + Form + + + SendFinalForm.cs + + + Form + + + MainForm.cs + + + Form + + + LoginForm.cs + + + + + + + + + + + + + + + True + True + Resource1.resx + + + Form + + + ServerSwitch.cs + + + True + True + Reference.svcmap + + + UserControl + + + BaseHole.cs + + + UserControl + + + DetailHole.cs + + + + + Form + + + FormFoundUpdate.cs + + + Form + + + FormSplash.cs + + + + + + + + + + + + + + + Pager.cs + + + CallManageForm.cs + + + frmAlertConfirm.cs + + + LeakInspection.cs + + + DefaultDataSetNum.cs + + + FrmCarCardDetail.cs + + + FrmCarCardPrintShow.cs + + + FrmItemList.cs + + + frmLineSetting.cs + + + FrmPlace.cs + + + CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator + PastCard.cs + + + ResetSendIndexForm.cs + + + DPShipment.cs + + + InjectPasswordForm.cs + + + InjectPrintForm.cs + + + InjectIntoBarcode.cs + + + InjectionCodePrint.cs + + + MaterialTreeForm.cs + + + DPLabelRegenerate.cs + + + InjectPlat.cs + + + DPLabelReplace.cs + + + MainCodeChangeEditForm.cs + + + MainCodeChangeForm.cs + + + MendReasonSubDefects.cs + + + MendRecorderWasteForm.cs + + + ProductCheckAddForm.cs + + + ProductCheckDetailForm.cs + + + ProductCheckForm.cs + + + ProductCheckValuesFrom.cs + + + ReplaceForm.cs + + + MendRecorderReasonForm.cs + + + BZDPasswordForm.cs + + + BZDRePrintForm.cs + + + DPLabelReplace.cs + + + frmInspectSkipping.cs + + + PrintPlanLabel.cs + + + frmFISBreakConfirm.cs + + + ProductInForm.cs + Designer + + + ProductInSendCodeForm.cs + + + ProductInfo.cs + + + DPAssemblyCodePrintForm.cs + + + DoorFrameForm.cs + + + EquipmentAlarmForm.cs + + + FisM100ListForm.cs + + + CastCounterSet.cs + + + InjectionCheckForm.cs + + + InjectionCheckListForm.cs + + + InjectionScarpForm.cs + + + SingleSlushMoldConfig.cs + + + SingleSlushMoldConfigEdit.cs + + + SlushMoldingEditForm.cs + + + SlushMoldingForm.cs + + + SlushMoldingPrintEditForm.cs + + + SlushMoldingPrintForm.cs + + + EquipmentMaintainEditForm.cs + + + EquipmentMaintainForm.cs + + + InjectionMoldingEditForm.cs + + + InjectionMoldingForm.cs + + + InjectionMoldingPrintForm.cs + Designer + + + ProductBundleForm.cs + + + InjectionMoldingPrintEditForm.cs + + + SlushMoldingPrintForOldForm.cs + + + PouringMoldingEditForm.cs + + + PouringMoldingForm.cs + + + SlushMoldingPrintLotForm.cs + + + InjectionMoldingPrintLotForm.cs + + + SlushMoldSet.cs + + + SlushScarpForm.cs + + + MachineCheckEditForm.cs + + + MachineCheckForm.cs + + + ItemForm.cs + + + MendRecorderForm.cs + + + MendRecorderCreateForm.cs + + + MendRecorderFinishForm.cs + + + MendStaticForm.cs + + + SpecifyForm.cs + + + TestForm.cs + + + VideoTypeEditForm.cs + + + MediaPlayerForm.cs + + + MediaPlayerSubForm.cs + + + MediaPlayerEditForm.cs + + + VideoTypeForm.cs + + + MainOperationSearchForm.cs + + + PrintForm.cs + + + ProductAddForm.cs + + + RepairForm.cs + + + OperationForm.cs + Designer + + + SetProcessPassForm.cs + + + SPCControlForm.cs + + + MainOperationStaticForm.cs + + + SlushPlanEditForm.cs + + + SlushPlanForm.cs + + + ReprintForm.cs + + + OutWarehouseForm.cs + Designer + + + SendPlanSearchEditForm.cs + + + SendPlanSearchForm.cs + + + SendPlanPrintForm.cs + + + EditUserForm.cs + + + ManageUserForm.cs + + + InWarehouseForm.cs + Designer + + + SendCodeForm.cs + + + SendFinalForm.cs + + + LoginForm.cs + + + MainForm.cs + + + PublicResXFileCodeGenerator + Designer + Resource1.Designer.cs + + + ServerSwitch.cs + + + BaseHole.cs + + + DetailHole.cs + + + FormFoundUpdate.cs + + + FormSplash.cs + + + Designer + + + + PreserveNewest + + + + + PreserveNewest + + + Always + + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {706750E7-6D42-4FE2-95BF-99E90F84BE07} + QMAPP.FJC.TRACING + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + Always + Designer + + + Always + + + Always + + + Always + + + + + WCF Proxy Generator + Reference.cs + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + Always + + + Designer + + + Always + Designer + + + Always + + + Always + + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + + + + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + aximp + False + + + {F5078F18-C551-11D3-89B9-0000F81FE221} + 3 + 0 + 0 + tlbimp + False + True + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + tlbimp + False + True + + + + + False + 追溯系统 + 1 + cfaa-mes.ico + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/96/9602695ef39473db65cf7296cb1bce5713175a56.svn-base b/.svn/pristine/96/9602695ef39473db65cf7296cb1bce5713175a56.svn-base new file mode 100644 index 0000000..dafb2ed --- /dev/null +++ b/.svn/pristine/96/9602695ef39473db65cf7296cb1bce5713175a56.svn-base @@ -0,0 +1,261 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:搪塑称重记录 + /// 作 者:张松男 + /// 编写日期:2021年08月23日 + /// + public class TSWeighRecoreDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public TSWeighRecore Get(TSWeighRecore info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public TSWeighRecore Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_AW_TSWeighRecore] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(TSWeighRecore condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetALL() + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_AW_TSWeighRecore "; + //分页关键字段及排序 + var LIST = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + LIST = session.GetList(sql, parameters.ToArray()).ToList(); + } + return LIST; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(TSWeighRecore condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + + //构成查询语句 + sqlBuilder.Append("SELECT PID,ProductCode,PColour,MATERIAL_CODE,Weigh,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_AW_TSWeighRecore "); + + if (string.IsNullOrEmpty(condition.ProductCode) == false) + { + whereBuilder.Append(" AND ProductCode = @ProductCode"); + parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); + } + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(TSWeighRecore info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_AW_TSWeighRecore"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(TSWeighRecore info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(TSWeighRecore info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + + } +} diff --git a/.svn/pristine/97/976d3d8181a42593265d7257a5db0ede62503dc9.svn-base b/.svn/pristine/97/976d3d8181a42593265d7257a5db0ede62503dc9.svn-base new file mode 100644 index 0000000..2d43d12 --- /dev/null +++ b/.svn/pristine/97/976d3d8181a42593265d7257a5db0ede62503dc9.svn-base @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMAPP.FJC.Web.Models.CompleteStatistics; +using QMAPP.ServicesAgent; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI.DataSource; +using QMAPP.Entity; +using QMAPP.FJC.Entity.CompleteStatistics; +using QMFrameWork.Log; +using QMFrameWork.Common.ExcelOperation; +using System.Data; + +namespace QMAPP.FJC.Web.Controllers +{ + public class CompleteStatisticsController : QController + { + // + // GET: /CompleteStatistics/ + [HandleException] + public ActionResult CompleteStatisticsList(bool? callBack) + { + CompleteStatisticsModel searchModel = new CompleteStatisticsModel(); + if (callBack == true) + this.TryGetSelectBuffer(out searchModel); + + searchModel.rownumbers = false; + searchModel.url = "/CompleteStatistics/GetList"; + return this.View("CompleteStatisticsList", searchModel); + } + + /// + /// 获取列表 + /// + /// 是否回调 + /// 用户列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + + CompleteStatisticsModel searchModel = this.GetModel(); + + if (callBack == true) { + this.TryGetSelectBuffer(out searchModel); + } + else { + this.SetSelectBuffer(searchModel); + } + + //获取前台分页设置信息 + DataPage page = this.GetDataPage(searchModel); + CompleteStatisticsEntity condition = this.CopyToModel(searchModel); + condition.DELFLAG = searchModel.DOESEXPORT; + DataResult pageResult = wcfAgent.InvokeServiceFunction>("CompleteStatisticsBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) { + this.SetMessage(pageResult.Msg); + return this.CompleteStatisticsList(true); + } + DataGridResult result = new DataGridResult + { + Total = pageResult.Result.RecordCount, + Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()) + }; + return this.Content(result.GetJsonSource()); + + } + + [HttpPost] + [HandleException] + public ActionResult ExportCompleteStatistics() + { + CompleteStatisticsModel searchModel = this.GetModel(); + CompleteStatisticsEntity condition = this.CopyToModel(searchModel); + DataResult result = this.GetServiceAgent().InvokeServiceFunction("CompleteStatisticsBLL_ExportCompleteStatistics", condition); + this.SetMessage(result.Msg); + return this.CompleteStatisticsList(true); + } + + [HttpPost] + [HandleException] + public ActionResult Delete() + { + string selectKey = this.Request.Form["selectKey"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + //删除 + DataResult serviceResult = wcfAgent.InvokeServiceFunction>("", selectKey); + this.SetMessage(string.IsNullOrEmpty(serviceResult.Msg) ? AppResource.DeleteMessage : serviceResult.Msg); + return this.CompleteStatisticsList(true); + } + + [HttpPost] + [HandleException] + public ActionResult Save(CompleteStatisticsModel saveModel) + { + CompleteStatisticsEntity model = this.CopyToModel(saveModel); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult serviceResult = wcfAgent.InvokeServiceFunction>(string.IsNullOrEmpty(model.PID) ? "CompleteStatisticsBLL_Insert" : "CompleteStatisticsBLL_Update", model); + this.SetMessage(string.IsNullOrEmpty(serviceResult.Msg) ? AppResource.SaveMessge : serviceResult.Msg); + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult CompleteStatisticsEdit() + { + CompleteStatisticsModel model = new CompleteStatisticsModel(); + string pid = this.Request.Params["PID"]; + if (!string.IsNullOrEmpty(pid)) { + ServiceAgent serviceAgent = this.GetServiceAgent(); + CompleteStatisticsEntity entity = serviceAgent.InvokeServiceFunction("CompleteStatisticsBLL_GetById", pid); + model = this.CopyToModel(entity); + } + return this.View(model); + } + + /// + /// 导出excel + /// + /// 结果 + [HandleException] + public ActionResult ExportExcel() + { + try + { + CompleteStatisticsModel searchModel = this.GetModel(); + CompleteStatisticsEntity condition = this.CopyToModel(searchModel); + DataResult result = this.GetServiceAgent().InvokeServiceFunction>("CompleteStatisticsBLL_ExportExcelData", condition); + + //导出 + QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool(); + return efTool.GetExcelFileResult("CompleteStatisticsExp", "完工数量统计.xlsx", result.Result); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Info = "导出excel", Tag = "完工数量统计" }); + this.SetMessage("导出excel失败"); + return this.CompleteStatisticsList(true); + } + } + } +} diff --git a/.svn/pristine/97/97c3fa9389c63716d2d0cbc6a3213b4c9bcd0a0a.svn-base b/.svn/pristine/97/97c3fa9389c63716d2d0cbc6a3213b4c9bcd0a0a.svn-base new file mode 100644 index 0000000..ef211b6 --- /dev/null +++ b/.svn/pristine/97/97c3fa9389c63716d2d0cbc6a3213b4c9bcd0a0a.svn-base @@ -0,0 +1,1507 @@ + + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + QMAPP.FJC.Web + QMAPP.FJC.Web + v4.0 + false + + + 4.0 + + + + false + + + + + + + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\DLL\EmitMapper.dll + + + ..\..\DLL\Globale_Variablen.dll + + + ..\..\DLL\itextsharp.dll + + + False + ..\..\DLL\log4net.dll + + + ..\..\DLL\MySql.Data.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\NPOI.dll + + + False + ..\..\DLL\NPOI.OOXML.dll + + + False + ..\..\DLL\NPOI.OpenXml4Net.dll + + + False + ..\..\DLL\NPOI.OpenXmlFormats.dll + + + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + False + ..\..\APPMESReport\QMAPP.MESReport.Web\bin\QMAPP.MESReport.Entity.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.Expand.dll + + + + + 3.5 + + + + + + + + + + + + + False + ..\..\DLL\System.Web.Mvc.dll + + + + + + + + + + + + True + True + AppResource.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PrintMaster.Master + ASPXCodeBehind + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + + + Designer + Always + + + Designer + + + Designer + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + Always + + + + + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE} + QMAPP.Common.Web + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {4B533C1B-7D16-4BD3-9285-D6E7E9740645} + QMAPP.MD.Web + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {C78C8970-0737-4F36-8F54-137032EAFE41} + Common + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + ResXFileCodeGenerator + AppResource.Designer.cs + Designer + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + + False + False + 1777 + / + + + False + False + + + False + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/98/983b6c6fe2719f7a23160fb7888ec4ce41378ed9.svn-base b/.svn/pristine/98/983b6c6fe2719f7a23160fb7888ec4ce41378ed9.svn-base new file mode 100644 index 0000000..292d769 --- /dev/null +++ b/.svn/pristine/98/983b6c6fe2719f7a23160fb7888ec4ce41378ed9.svn-base @@ -0,0 +1,146 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using HZH_Controls.Controls; +using HZH_Controls.Forms; + +namespace QMAPP.WinForm.Common +{ + static class global + { + private static FrmAnchor m_frmAnchor; + public static int enterTime = 0; + private static int m_intSelectionStart; + private static int m_intSelectionLength; + private static MainForm.InvokeViewCloseHandler _invokeViewCloseHandler; + + static global() + { + } + private static UpdateSetting _updateSetting; + /// + /// 自动更新 + /// + public static UpdateSetting UpdateSetting + { + get { return _updateSetting ?? (_updateSetting = GlobalConfig.GetConfigValues(GlobalConfig.UpdateFileName)); } + set { _updateSetting = value; } + } + /// + /// 打开软键盘 + /// + /// + /// + public static bool ShowKey(UCCombox parentControl) + { + + try + { + m_intSelectionStart = parentControl.txtInput.SelectionStart; + m_intSelectionLength = parentControl.txtInput.SelectionLength; + parentControl.FindForm().ActiveControl = parentControl; + parentControl.FindForm().ActiveControl = parentControl.txtInput; + UCKeyBorderAll key = new UCKeyBorderAll(); + key.CharType = KeyBorderCharType.CHAR; + key.RetractClike += (a, b) => { m_frmAnchor.Hide(); }; + m_frmAnchor = new FrmAnchor(parentControl, key); + m_frmAnchor.VisibleChanged += (a, b) => + { + if (m_frmAnchor.Visible) + { + parentControl.txtInput.SelectionStart = m_intSelectionStart; + parentControl.txtInput.SelectionLength = m_intSelectionLength; + } + }; + if (!m_frmAnchor.Visible) m_frmAnchor.Show(parentControl.FindForm()); + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + + throw; + + } + + + + } + + /// + /// 打开软键盘 + /// + /// + /// + public static bool ShowKey(TextBoxBase parentControl) + { + + try + { + m_intSelectionStart = parentControl.SelectionStart; + m_intSelectionLength = parentControl.SelectionLength; + parentControl.FindForm().ActiveControl = parentControl; + //parentControl.FindForm().ActiveControl = parentControl; + UCKeyBorderAll key = new UCKeyBorderAll(); + key.CharType = KeyBorderCharType.CHAR; + key.RetractClike += (a, b) => { m_frmAnchor.Hide(); }; + m_frmAnchor = new FrmAnchor(parentControl, key); + m_frmAnchor.VisibleChanged += (a, b) => + { + if (m_frmAnchor.Visible) + { + parentControl.SelectionStart = m_intSelectionStart; + parentControl.SelectionLength = m_intSelectionLength; + } + }; + if (!m_frmAnchor.Visible) m_frmAnchor.Show(parentControl.FindForm()); + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + + return false; + + } + + + + } + /// + /// 关闭软键盘 + /// + /// + public static bool HideKey() + { + try + { + if (m_frmAnchor != null) + { + if (m_frmAnchor.Visible) m_frmAnchor.Hide(); + } + + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + return false; + } + + } + public static MainForm.InvokeViewCloseHandler GetInvokeViewCloseHandler() + { + return _invokeViewCloseHandler; + } + + public static void SetInvokeViewCloseHandler(MainForm.InvokeViewCloseHandler pHandler) + { + _invokeViewCloseHandler = pHandler; + } + + + } +} \ No newline at end of file diff --git a/.svn/pristine/99/992f1541f28cced8e9a698049acc8854e621843c.svn-base b/.svn/pristine/99/992f1541f28cced8e9a698049acc8854e621843c.svn-base new file mode 100644 index 0000000..4c7ff03 --- /dev/null +++ b/.svn/pristine/99/992f1541f28cced8e9a698049acc8854e621843c.svn-base @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace QMAPP.FJC.TRACING.DataAnalyzers +{ + /// + /// 线束号解析 + /// + public class MaterialAnalyzer : DAInterface.IDataAnalyzer + { + public void Analyze(DAInterface.DAObject data) + { + if (data.DAValue.ToString().StartsWith("NO-")) //无用零件 + { + + DAL.QT.WorkCellRunStateDAL statedal = new DAL.QT.WorkCellRunStateDAL(); + var state = statedal.GetCurrentState(data.DAI.WORKCELL_CODE, data.DAI.WORKLOC_CODE, data.MouldCode); + if (state == null || string.IsNullOrWhiteSpace(state.BOM_CODE)) + { + return; + } + MD.DAL.PbomDAL bomdal = new MD.DAL.PbomDAL(); + var item = bomdal.GetBomItemByMaterilType(state.BOM_CODE, data.DAI.MATERIAL_TYPE,true); + if (item.UNIT_SUM > 0 && item.PBOM_CODE.Contains("F_")) + { + throw new Exception("当前产品为有线束件!"); + } + data.ObjectPID = "";//mould.PID; + data.AnalyzedValue = data.DAValue.ToString(); + data.MaterialCode = item.MATERIAL_CODE; + DAL.MD.MaterialDAL mdal = new DAL.MD.MaterialDAL(); + var material = mdal.Get(data.MaterialCode); + data.MaterialName = material == null ? "" : material.MATERIAL_SHORT; + } + else + { + DAL.MD.MaterialDAL dal = new DAL.MD.MaterialDAL(); + var material = dal.GetWithAnyFormate(data.DAValue.ToString()); + if (material == null) + { + material = dal.GetWithAnyFormateTo(data.DAValue.ToString()); + if (material == null) + throw new Exception("无法查到与此条码相关的物料信息!"); + } + data.ObjectPID = "";//mould.PID; + data.AnalyzedValue = data.DAValue.ToString(); + data.MaterialCode = material.MATERIAL_CODE; + //DAL.MD.MaterialDAL mdal = new DAL.MD.MaterialDAL(); + //var material = mdal.Get(data.MaterialCode); + data.MaterialName = material == null ? "" : material.MATERIAL_SHORT; + if (string.Equals(data.DAI.DIVBY_MOULD, "1")) + { + DAL.Basic.MachineInfoModelDAL moulddal = new DAL.Basic.MachineInfoModelDAL(); + var moulds = moulddal.GetMouldOnMachine(data.MachineCode); + var bindingdal = new DAL.QT.MaterialBindingDAL(); + var bindings = bindingdal.GetBindingTargets(data.DAI.WORKLOC_CODE + "_MOULD", material.MATERIAL_TYPE_CODE); + + var binding = bindings.FirstOrDefault(p => moulds.Exists(m => m.MODELCODE == p.TARGET_CODE)); + if (binding == null) + { + throw new Exception("此零件无法在当前工位进行加工!"); + } + data.MouldCode = binding.TARGET_CODE; + data.MouldReLocate = true; + + } + } + } + } +} \ No newline at end of file diff --git a/.svn/pristine/9c/9c42ca1a4562ff5bc2a1e5b24d9bbf28247e5beb.svn-base b/.svn/pristine/9c/9c42ca1a4562ff5bc2a1e5b24d9bbf28247e5beb.svn-base new file mode 100644 index 0000000..e38c481 --- /dev/null +++ b/.svn/pristine/9c/9c42ca1a4562ff5bc2a1e5b24d9bbf28247e5beb.svn-base @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.Bucket +{ + /// + /// 模块名称:注塑投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + ///// + ///// 设备 + ///// + //[Description("设备")] + //[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + //[InputType(inputType.combotree)] + //[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + //public string MachineCode { get; set; } + + ///// + ///// 产品 + ///// + //[Description("产品")] + //[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + //[InputType(inputType.combotree)] + //[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + //public string ProductLine { get; set; } + + ///// + ///// 零件类型 + ///// + //[Description("零件类型")] + //[HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + //[InputType(inputType.combotree)] + //[DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + //public string MaterialType { get; set; } + + /// + /// 料筒编号 + /// + [Description("料筒编号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200, JsonUtl = "/Dict/GetBucketCodeComboxSource")] + [InputType(inputType.combotree)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string BucketCode { get; set; } + + /// + /// 零件号 + /// + [Description("零件号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string PartCode { get; set; } + + /// + /// 批次号 + /// + [Description("批次号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string BatchCode { get; set; } + + /// + /// 流水号 + /// + [Description("流水号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string SerialCode { get; set; } + + /// + /// 是否可用 + /// + [Description("是否可用")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] + public string IsCheck { get; set; } + + /// + /// 创建人 + /// + [Description("创建用户")] + public string CREATEUSER { get; set; } + + /// + /// 创建日期 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime CREATEDATE { get; set; } + + /// + /// 更新人 + /// + [Description("更新用户")] + public string UPDATEUSER { get; set; } + + /// + /// 更新日期 + /// + [Description("更新时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime UPDATEDATE { get; set; } + } +} diff --git a/.svn/pristine/9c/9c7a4f3d23b9d7388e55c837a280c5450a7a2f08.svn-base b/.svn/pristine/9c/9c7a4f3d23b9d7388e55c837a280c5450a7a2f08.svn-base new file mode 100644 index 0000000..311caf4 --- /dev/null +++ b/.svn/pristine/9c/9c7a4f3d23b9d7388e55c837a280c5450a7a2f08.svn-base @@ -0,0 +1,734 @@ + + + + + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 设置密码 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 查看/回复 + 导出 + + + + + 查询 + 导出 + + + + + + + + + 保存 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + 新建 + 修改 + 删除 + 配置设备 + + + + + 查询 + 新建 + 修改 + 删除 + 工序配置 + + + + + 查询 + 新建 + 删除 + 配置BOM明细 + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 新建 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + 查询 + 添加1 + 添加2 + 删除 + + + + + 查询 + 修改 + 同步数据 + + + + + 查询 + 修改 + 启用 + 禁用 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + 查询 + + + + + 查询 + 修改 + + + + + 查询 + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 添加 + 整车添加 + 修改 + 修改计划顺序号 + 插单 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 新建 + 修改 + 修改计划顺序号 + 删除 + 发布 + 导入 + 导出 + 下载模板 + + + + + 查询 + 导出 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + 盘点明细 + 盘点对比 + 比对结果 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + + 查询 + 添加 + 编辑 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + 查询 + 修改批次号 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 查看明细 + 导出 + + + + + + 查询 + 导出 + + + + + + + + + 查询 + 新建 + 修改 + 删除 + + + + + + + + + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 添加 + 修改 + 删除 + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + + + + + + 查询 + 导出 + + + + + 查询 + 导出 + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/9c/9cb7156bd1ccc6d821970ef16d7eb46fbe22aada.svn-base b/.svn/pristine/9c/9cb7156bd1ccc6d821970ef16d7eb46fbe22aada.svn-base new file mode 100644 index 0000000..1c317e7 --- /dev/null +++ b/.svn/pristine/9c/9cb7156bd1ccc6d821970ef16d7eb46fbe22aada.svn-base @@ -0,0 +1,126 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectPasswordForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.txtMainCode = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.infolabel = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(184, 30); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(321, 37); + this.label1.TabIndex = 0; + this.label1.Text = "注塑条码补打权限"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(27, 127); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(106, 24); + this.label3.TabIndex = 2; + this.label3.Text = "输入密码"; + // + // txtMainCode + // + this.txtMainCode.BackColor = System.Drawing.SystemColors.Window; + this.txtMainCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtMainCode.Location = new System.Drawing.Point(153, 122); + this.txtMainCode.Name = "txtMainCode"; + this.txtMainCode.PasswordChar = '*'; + this.txtMainCode.Size = new System.Drawing.Size(341, 35); + this.txtMainCode.TabIndex = 4; + // + // button1 + // + this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(520, 122); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(123, 35); + this.button1.TabIndex = 5; + this.button1.Text = "确认"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // infolabel + // + this.infolabel.AutoSize = true; + this.infolabel.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.infolabel.ForeColor = System.Drawing.Color.Red; + this.infolabel.Location = new System.Drawing.Point(157, 170); + this.infolabel.Name = "infolabel"; + this.infolabel.Size = new System.Drawing.Size(0, 31); + this.infolabel.TabIndex = 6; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(246, 11); + this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(75, 18); + this.label2.TabIndex = 0; + // + // InjectPasswordForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(665, 235); + this.Controls.Add(this.label2); + this.Controls.Add(this.infolabel); + this.Controls.Add(this.button1); + this.Controls.Add(this.txtMainCode); + this.Controls.Add(this.label3); + this.Controls.Add(this.label1); + this.Name = "InjectPasswordForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "总成装配条码打印"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtMainCode; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label infolabel; + private System.Windows.Forms.Label label2; + } +} \ No newline at end of file diff --git a/.svn/pristine/9d/9d44fdcf0510a93ba7f740fea4b8a460c3256ed4.svn-base b/.svn/pristine/9d/9d44fdcf0510a93ba7f740fea4b8a460c3256ed4.svn-base new file mode 100644 index 0000000..0a4bebf --- /dev/null +++ b/.svn/pristine/9d/9d44fdcf0510a93ba7f740fea4b8a460c3256ed4.svn-base @@ -0,0 +1,505 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using QMAPP.DAL; +using QMAPP.FJC.Entity.Common.Constants; +using QMAPP.FJC.Entity.CompleteStatistics; +using QMFrameWork.Data; + +namespace QMAPP.FJC.DAL.CompleteStatistics +{ + public class CompleteStatisticsDAL : BaseDAL + { + public DataPage GetList(CompleteStatisticsEntity condition, DataPage page) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(condition, out parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + page.SortExpression = "ORDERNO ASC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) { + page = session.GetDataPage(sql, parameters, page); + } + return page; + + } + + public List GetList(CompleteStatisticsEntity condition) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(condition, out parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters).ToList(); + } + } + + public CompleteStatisticsEntity Get(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Get(model); + } + } + + public int Insert(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Insert(model); + } + } + + public bool ExistCompleteStatistics(CompleteStatisticsEntity model) + { + throw new NotImplementedException(); + } + + protected string ExistQureySql() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT *"); + sql.AppendLine(" FROM T_AW_MAINOPERATION T"); + sql.AppendLine(" WHERE INFO.BARCODEIDENTIFY IS NOT NULL"); + sql.AppendLine(" AND T.OPERATEDDATE > @StartTime"); + sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime"); + return sql.ToString(); + } + + public int Update(CompleteStatisticsEntity model) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) { + return session.Update(model); + } + } + + public int GenericCompleteStatistics(DateTime starTime, DateTime endTime) + { + int count; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + + DataParameter[] parameters = { + new DataParameter {ParameterName = "StartTime", DataType = DbType.DateTime, Value = starTime}, + new DataParameter {ParameterName = "EndTime", DataType = DbType.DateTime, Value = endTime} + }; + try { + session.OpenTs(); + //string location = this.GetSystemConfig(CompleteStatisticsConstants.COMP_STATIS_SITE).CODEVALUE; + //string sql = location.Equals("080121") ? this.GetGenericStatisticsSqlForCC() : this.GetGenericStatisticsSqlForCD(); + //成品 + string sql = GetGenericStatisticsSqlForBORA(); + count = session.ExecuteSql(sql, parameters); + //注塑件 + sql = GetGenericStatisticsSqlForINJECT(); + count += session.ExecuteSql(sql, parameters); + + + this.UpdateLastGenericTime(endTime, session); + session.CommitTs(); + } + catch (Exception) { + session.RollbackTs(); + throw; + } + } + return count; + } + + public SystemConfig GetSystemConfig(string codeType) + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT *"); + sql.AppendLine(" FROM T_SYSTEM_CONFIG"); + sql.AppendLine(" WHERE CODETYPE = @CodeType"); + DataParameter[] parameters = { + new DataParameter {ParameterName = "CodeType", DataType = DbType.String, Value = codeType} + }; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters); + } + } + + protected int UpdateLastGenericTime(DateTime endTime, IDataSession session) + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("UPDATE T_SYSTEM_CONFIG"); + sql.AppendLine(" SET CODEVALUE = @EndTime"); + sql.AppendLine(" WHERE CODETYPE = @CodeType"); + DataParameter[] parameters = + { + new DataParameter {ParameterName = "EndTime", DataType = DbType.String, Value = endTime.ToString("yyyy/MM/dd HH:mm:ss")}, + new DataParameter {ParameterName = "CodeType", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_LSTTIME} + }; + return session.ExecuteSql(sql.ToString(), parameters); + } + /// + /// 成都工厂适用SQL + /// + /// + protected string GetGenericStatisticsSqlForCD() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("INSERT INTO T_AW_COMPLETE_STATISTICS"); + sql.AppendLine("SELECT NEWID(),"); + sql.AppendLine(" REPLACE(T.CUSTOMERSPAREPARTS, ' ', '') AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" CNFG.CODEVALUE + "); + sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) +"); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY T.CUSTOMERSPAREPARTS))) + CAST (ROW_NUMBER() OVER (ORDER BY T.CUSTOMERSPAREPARTS) AS VARCHAR) AS ORDERNO,"); + sql.AppendLine(" GETDATE() AS CREATETIME,"); + sql.AppendLine(" USR.USERID AS CREATEUSER,"); + sql.AppendLine(" GETDATE() AS UPDATETIME,"); + sql.AppendLine(" USR.USERID AS UPDATEUSER,"); + sql.AppendLine(" '0' AS DELFLAG"); + sql.AppendLine(" FROM T_DAS_BARCODEVIBPAR T"); + sql.AppendLine(" LEFT JOIN T_QM_USER USR"); + sql.AppendLine(" ON USR.USERID = 'SYSTEM'"); + sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG"); + sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER'"); + sql.AppendLine(" WHERE T.SCANTIME > @StartTime"); + sql.AppendLine(" AND T.SCANTIME <= @EndTime"); + sql.AppendLine(" AND SUBSTRING(T.ABARCODE, 9, 2) <> '99'"); + sql.AppendLine(" GROUP BY T.CUSTOMERSPAREPARTS, USR.USERID, CNFG.CODEVALUE"); + return sql.ToString(); + } + //长春 + protected string GetGenericStatisticsSqlForCC() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine("INSERT INTO T_AW_COMPLETE_STATISTICS"); + sql.AppendLine("SELECT NEWID(),"); + sql.AppendLine(" INFO.MATERIALNO AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" CNFG.CODEVALUE + "); + sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) +"); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY INFO.MATERIALNO))) + CAST (ROW_NUMBER() OVER (ORDER BY INFO.MATERIALNO) AS VARCHAR) AS ORDERNO,"); + sql.AppendLine(" GETDATE() AS CREATETIME,"); + sql.AppendLine(" USR.USERID AS CREATEUSER,"); + sql.AppendLine(" GETDATE() AS UPDATETIME,"); + sql.AppendLine(" USR.USERID AS UPDATEUSER,"); + sql.AppendLine(" '0' AS DELFLAG"); + sql.AppendLine(" FROM T_AW_MAINOPERATION T"); + sql.AppendLine(" LEFT JOIN T_BD_BARCODE_PRODUCT_RELATION RELATION"); + sql.AppendLine(" ON T.PRODUCTTYPE = RELATION.PRODUCTTYPE"); + sql.AppendLine(" AND T.PROCESSTYPE = RELATION.PROCESSTYPE"); + sql.AppendLine(" LEFT JOIN T_BD_MATERIAL_BARCODE_INFO INFO"); + sql.AppendLine(" ON INFO.PROCESSTYPE = RELATION.PROCESSTYPE"); + sql.AppendLine(" AND INFO.PRODUCTTYPE = RELATION.PRODUCTTYPE"); + sql.AppendLine(" AND SUBSTRING(T.PRODUCTCODE, RELATION.STARTINDEX, RELATION.SUBLENGTH) = INFO.BARCODEIDENTIFY"); + sql.AppendLine(" LEFT JOIN T_QM_USER USR"); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM'"); + sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG"); + sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER'"); + sql.AppendLine(" WHERE INFO.BARCODEIDENTIFY IS NOT NULL"); + sql.AppendLine(" AND T.OPERATEDDATE > @StartTime"); + sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime"); + sql.AppendLine(" GROUP BY INFO.MATERIALNO, USR.USERID, CNFG.CODEVALUE"); + return sql.ToString(); + } + //青岛仪表板/门板的成品 + //protected string GetGenericStatisticsSqlForBORA() + //{ + // StringBuilder sql = new StringBuilder(); + // sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + // sql.AppendLine(" SELECT NEWID(), "); + // sql.AppendLine(" T.MATERIAL_CODE AS MATERIALNO, "); + // sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT, "); + // sql.AppendLine(" COUNT(*) AS COMPLETECOUNT, "); + // sql.AppendLine(" @StartTime AS STARTTIME, "); + // sql.AppendLine(" @EndTime AS ENDTIME, "); + // sql.AppendLine(" CNFG.CODEVALUE + "); + // sql.AppendLine(" REPLACE(CONVERT(VARCHAR(100), GETDATE(), 112) + "); + // sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + // sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY T.MATERIAL_CODE))) + CAST (ROW_NUMBER() OVER (ORDER BY T.MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + // sql.AppendLine(" GETDATE() AS CREATETIME, "); + // sql.AppendLine(" USR.USERID AS CREATEUSER, "); + // sql.AppendLine(" GETDATE() AS UPDATETIME, "); + // sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + // sql.AppendLine(" '0' AS DELFLAG "); + // sql.AppendLine(" FROM T_AW_MAINOPERATION T "); + // sql.AppendLine(" LEFT JOIN T_MD_MATERIAL_CLASS C ON C.MATERIAL_TYPE_CODE=T.MATERIAL_TYPE_CODE "); + // sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + // sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG CNFG "); + // sql.AppendLine(" ON CNFG.CODETYPE = 'COMP_STATIS_ORDER' "); + // sql.AppendLine(" WHERE T.OPERATEDDATE > @StartTime "); + // sql.AppendLine(" AND T.OPERATEDDATE <= @EndTime "); + // sql.AppendLine(" AND C.MATERIAL_ATTRIBUTE='2' "); + // sql.AppendLine(" GROUP BY T.MATERIAL_CODE, USR.USERID, CNFG.CODEVALUE "); + // return sql.ToString(); + //} + //青岛注塑件 + protected string GetGenericStatisticsSqlForBORA() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + sql.AppendLine(" SELECT NEWID(),"); + sql.AppendLine(" C.MFG_MATERIAL_CODE AS MATERIALNO,"); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT,"); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT,"); + sql.AppendLine(" @StartTime AS STARTTIME,"); + sql.AppendLine(" @EndTime AS ENDTIME,"); + sql.AppendLine(" C.ORDERIDENTITY + "); + sql.AppendLine(" REPLACE(substring(CONVERT(VARCHAR(100), GETDATE(), 112),3,6) + "); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE))) + CAST (ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + sql.AppendLine(" GETDATE() AS CREATETIME, "); + sql.AppendLine(" USR.USERID AS CREATEUSER, "); + sql.AppendLine(" GETDATE() AS UPDATETIME, "); + sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + sql.AppendLine(" '0' AS DELFLAG "); + sql.AppendLine(" FROM T_AW_PRODUCT T "); + sql.AppendLine(" LEFT JOIN T_MD_MATERIAL_CLASS S ON S.MATERIAL_TYPE_CODE=T.MATERIAL_TYPE "); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C ON C.MES_MATERIAL_CODE = T.MATERIAL_CODE "); + sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + sql.AppendLine(" WHERE S.MATERIAL_ATTRIBUTE='2' "); + sql.AppendLine(" AND C.MFG_MATERIAL_CODE IS NOT NULL "); + sql.AppendLine(" AND T.CREATEDATE > @StartTime "); + sql.AppendLine(" AND T.CREATEDATE <= @EndTime "); + sql.AppendLine(" AND T.MACHINECODDE IS NOT NULL "); + sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY "); + return sql.ToString(); + } + protected string GetGenericStatisticsSqlForINJECT() + { + StringBuilder sql = new StringBuilder(); + sql.AppendLine(" INSERT INTO T_AW_COMPLETE_STATISTICS "); + sql.AppendLine(" SELECT NEWID(), "); + sql.AppendLine(" C.MFG_MATERIAL_CODE AS MATERIALNO, "); + sql.AppendLine(" COUNT(*) AS SYSCOMPLETECOUNT, "); + sql.AppendLine(" COUNT(*) AS COMPLETECOUNT, "); + sql.AppendLine(" @StartTime AS STARTTIME, "); + sql.AppendLine(" @EndTime AS ENDTIME, "); + sql.AppendLine(" C.ORDERIDENTITY + "); + sql.AppendLine(" REPLACE(substring(CONVERT(VARCHAR(100), GETDATE(), 112),3,6) + "); + sql.AppendLine(" CONVERT(VARCHAR(100), GETDATE(), 8),':','') + "); + sql.AppendLine(" REPLICATE('0', 2 - LEN(ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE))) + "); + sql.AppendLine(" CAST (ROW_NUMBER() OVER (ORDER BY C.MFG_MATERIAL_CODE) AS VARCHAR) AS ORDERNO, "); + sql.AppendLine(" GETDATE() AS CREATETIME, "); + sql.AppendLine(" USR.USERID AS CREATEUSER, "); + sql.AppendLine(" GETDATE() AS UPDATETIME, "); + sql.AppendLine(" USR.USERID AS UPDATEUSER, "); + sql.AppendLine(" '0' AS DELFLAG "); + sql.AppendLine(" FROM T_TM_MonitorCode T "); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C "); + sql.AppendLine(" ON C.MES_MATERIAL_CODE = T.MATERIAL_CODE "); + sql.AppendLine(" LEFT JOIN T_QM_USER USR "); + sql.AppendLine(" ON USR.USERNAME = 'SYSTEM' "); + sql.AppendLine(" WHERE T.CurrentMode='3' "); + sql.AppendLine(" AND C.MFG_MATERIAL_CODE IS NOT NULL "); + sql.AppendLine(" AND T.CREATEDATE > @StartTime "); + sql.AppendLine(" AND T.CREATEDATE <= @EndTime "); + sql.AppendLine(" GROUP BY C.MFG_MATERIAL_CODE, USR.USERID, C.ORDERIDENTITY "); + return sql.ToString(); + } + protected string GetQuerySql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT T.PID, "); + sql.AppendLine(" T.MATERIALNO, "); + sql.AppendLine(" MAT.MATERIALNAME, "); + sql.AppendLine(" MAT.PRODUCTLINE, "); + sql.AppendLine(" T.SYSCOMPLETECOUNT,"); + sql.AppendLine(" T.COMPLETECOUNT,"); + sql.AppendLine(" T.STARTTIME, "); + sql.AppendLine(" T.ENDTIME, "); + sql.AppendLine(" T.ORDERNO, "); + sql.AppendLine(" T.CREATETIME,"); + sql.AppendLine(" T.CREATEUSER,"); + sql.AppendLine(" T.UPDATETIME,"); + sql.AppendLine(" T.UPDATEUSER,"); + sql.AppendLine(" T.DELFLAG,"); + sql.AppendLine(" CUSER.USERNAME AS CREATEUSER_DISPLAY,"); + sql.AppendLine(" UUSER.USERNAME AS UPDATEUSER_DISPLAY"); + sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + sql.AppendLine(" LEFT JOIN T_QM_USER CUSER"); + sql.AppendLine(" ON T.CREATEUSER = CUSER.USERID"); + sql.AppendLine(" LEFT JOIN T_QM_USER UUSER"); + sql.AppendLine(" ON T.UPDATEUSER = UUSER.USERID"); + sql.AppendLine(" INNER JOIN T_BD_MATERIAL_BARCODE_INFO MAT"); + sql.AppendLine(" ON T.MATERIALNO = MAT.MATERIALNO"); + sql.AppendLine(" WHERE 1 = 1"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.DELFLAG)) + { + if(condition.DELFLAG == "是") + sql.AppendLine(" AND T.DELFLAG = '1'"); + else if(condition.DELFLAG == "否") + sql.AppendLine(" AND T.DELFLAG = '0'"); + } + + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.EENDTIME) }); + } + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + public List GetExportData(CompleteStatisticsEntity model, IDataSession session) + { + DataParameter[] parameters; + string sql = this.GetExportSql(model, out parameters); + DataParameter[] unableParameters; + string unableSql = this.unableExportDataString(model, out unableParameters); + + List rtn = session.GetList(sql, parameters).ToList(); + session.ExecuteSql(unableSql, unableParameters); + return rtn; + } + + private string unableExportDataString(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("UPDATE T_AW_COMPLETE_STATISTICS"); + sql.AppendLine(" SET DELFLAG = '1'"); + sql.AppendLine(" WHERE DELFLAG = '0'"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.EENDTIME) }); + } + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + //protected string GetExportSql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + //{ + // List parametersList = new List(); + // StringBuilder sql = new StringBuilder(); + // sql.AppendLine("SELECT EM.CODEVALUE AS EMPLOYEE, "); + // sql.AppendLine(" SI.CODEVALUE AS SITE, "); + // sql.AppendLine(" '' AS SHIFT, "); + // sql.AppendLine(" T.MATERIALNO, "); + // sql.AppendLine(" MAT.PRODUCTLINE, "); + // sql.AppendLine(" '' AS EDIMAT, "); + // sql.AppendLine(" '' AS SERIAL, "); + // sql.AppendLine(" USR.CODEVALUE AS USERID, "); + // sql.AppendLine(" T.ORDERNO, "); + // sql.AppendLine(" T.COMPLETECOUNT,"); + // sql.AppendLine(" T.STARTTIME"); + // sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + // sql.AppendLine(" INNER JOIN T_BD_MATERIAL_BARCODE_INFO MAT"); + // sql.AppendLine(" ON T.MATERIALNO = MAT.MATERIALNO"); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG EM"); + // sql.AppendLine(" ON EM.CODETYPE = @Employee"); + // parametersList.Add(new DataParameter { ParameterName = "Employee", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_EMPLOYEE }); + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG SI"); + // sql.AppendLine(" ON SI.CODETYPE = @Site"); + // parametersList.Add(new DataParameter { ParameterName = "Site", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_SITE }); + + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG USR"); + // sql.AppendLine(" ON USR.CODETYPE = @UserId"); + // parametersList.Add(new DataParameter { ParameterName = "UserId", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_USER }); + + // sql.AppendLine(" LEFT JOIN T_SYSTEM_CONFIG ORD"); + // sql.AppendLine(" ON ORD.CODETYPE = @OrderNo"); + // parametersList.Add(new DataParameter { ParameterName = "OrderNo", DataType = DbType.String, Value = CompleteStatisticsConstants.COMP_STATIS_ORDER }); + + // sql.AppendLine(" WHERE T.DELFLAG = '0'"); + // if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + // { + // sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + // parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + // } + // if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + // { + // sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + // parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + // } + // if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + // { + // sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + // parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = string.Format("{0}", condition.EENDTIME) }); + // } + // sql.AppendLine(" ORDER BY T.ORDERNO ASC"); + + // parameters = parametersList.ToArray(); + // return sql.ToString(); + //} + protected string GetExportSql(CompleteStatisticsEntity condition, out DataParameter[] parameters) + { + List parametersList = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT C.MFG_USERCODE AS EMPLOYEE, "); + sql.AppendLine(" C.MFG_LOCATIONCODE AS SITE, "); + sql.AppendLine(" '' AS SHIFT, "); + sql.AppendLine(" T.MATERIALNO, "); + sql.AppendLine(" C.PRODUCELINECODE AS PRODUCTLINE, "); + sql.AppendLine(" '' AS EDIMAT, "); + sql.AppendLine(" '' AS SERIAL, "); + sql.AppendLine(" C.USERID, "); + sql.AppendLine(" T.ORDERNO, "); + sql.AppendLine(" T.COMPLETECOUNT,"); + sql.AppendLine(" T.STARTTIME,"); + sql.AppendLine(" T.ENDTIME"); + sql.AppendLine(" FROM T_AW_COMPLETE_STATISTICS T"); + sql.AppendLine(" LEFT JOIN T_AW_COMPLETE_MFG_CONFIG C"); + sql.AppendLine(" ON T.MATERIALNO = C.MFG_MATERIAL_CODE"); + + sql.AppendLine(" WHERE T.DELFLAG = '0'"); + if (!string.IsNullOrWhiteSpace(condition.MATERIALNO)) + { + sql.AppendLine(" AND T.MATERIALNO LIKE @MaterialNo"); + parametersList.Add(new DataParameter { ParameterName = "MaterialNo", DataType = DbType.String, Value = string.Format("%{0}%", condition.MATERIALNO) }); + } + if (!string.IsNullOrWhiteSpace(condition.SENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME >= @SEndTime"); + parametersList.Add(new DataParameter { ParameterName = "SEndTime", DataType = DbType.DateTime, Value = Convert.ToDateTime(condition.SENDTIME) }); + } + if (!string.IsNullOrWhiteSpace(condition.EENDTIME)) + { + sql.AppendLine(" AND T.ENDTIME <= @EEndTime"); + parametersList.Add(new DataParameter { ParameterName = "EEndTime", DataType = DbType.DateTime, Value = string.Format("{0}", condition.EENDTIME) }); + } + sql.AppendLine(" ORDER BY T.ORDERNO ASC"); + + parameters = parametersList.ToArray(); + return sql.ToString(); + } + + public DataTable ExportExcelData(CompleteStatisticsEntity model) + { + DataParameter[] parameters; + string sql = this.GetQuerySql(model, out parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetTable(sql, parameters); + } + } + } +} diff --git a/.svn/pristine/9d/9de3d41abe4bf7aba8d4c4dcaf17153b2bd71a3c.svn-base b/.svn/pristine/9d/9de3d41abe4bf7aba8d4c4dcaf17153b2bd71a3c.svn-base new file mode 100644 index 0000000..c8132d6 --- /dev/null +++ b/.svn/pristine/9d/9de3d41abe4bf7aba8d4c4dcaf17153b2bd71a3c.svn-base @@ -0,0 +1,286 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.FJC.Web.Models.FeedInManage; +using QMFrameWork.Data; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.FeedInManage; +using QMFrameWork.Common.Serialization; +using QMAPP.Entity; +using QMAPP.FJC.Entity.Injection; +using System.Data; +using QMFrameWork.Common.ExcelOperation; +using QMFrameWork.Log; +using QMFrameWork.WebUI.DataSource; + +namespace QMAPP.FJC.Web.Controllers +{ + public class WIPProductController : QController + { + #region 获取列表 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callBack) + { + WIPProductModel seachModel = new WIPProductModel(); + seachModel.STARTCREATEDATE = DateTime.Now.Date.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss"); + seachModel.ENDCREATEDATE = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"); + seachModel.ImmediateSearch = false; + if (callBack == true) + TryGetSelectBuffer(out seachModel); + + seachModel.rownumbers = false; + seachModel.url = "/WIPProduct/GetList"; + return View("List", seachModel); + } + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + WIPProductModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + Epidermis condition = null; + try + { + //获取查询对象 + seachModel = GetModel(); + + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + //condition.PRODUCTTYPE = ((int)QMAPP.FJC.Entity.EnumGeter.ProductType.fengdao).ToString();//默认查询表皮 + + #region wcf服务统一接口 + var dataResult = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.FeedInManage.EpidermisBLL_GetList.ToString(), condition, page); + + //通过返回dataResult判断 + if (dataResult.Ex != null) + { + throw dataResult.Ex; + } + else if (dataResult.IsSuccess) + { + page = dataResult.Result; + } + + DateGridResult result = new DateGridResult(); + result.Total = page.RecordCount; + if (page.Result == null) + page.Result = "[{}]"; + result.Rows = JsonConvertHelper.GetDeserialize>(page.Result.ToString()); + #endregion + + return Content(result.GetJsonSource()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// 处理结果 + [HandleException] + public ActionResult Save(WIPProductModel saveModel) + { + InjectionRecorder condition = new InjectionRecorder(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + List objlist = new List(); + + try + { + condition = CopyToModel(saveModel); + + #region 修改 + var dataResult = wcfAgent.InvokeServiceFunction(QMAPP.ServicesAgent.FeedInManage.EpidermisBLL_UpdateMaterial.ToString(), condition); + + //通过返回dataResult判断 + if (dataResult.Ex != null) + { + throw dataResult.Ex; + } + else if (dataResult.IsSuccess) + { + objlist.Add(new { isSuccess = true }); + SetMessage(AppResource.SaveMessge); + } + else + { + SetMessage(dataResult.Msg); + } + #endregion + + return Content(JsonConvertHelper.GetSerializes(objlist)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导出excel + /// + /// 导出excel + /// + /// 结果 + [HandleException] + public ActionResult ExportExcel() + { + WIPProductModel seachModel = null; + Epidermis condition = null; + DataTable exportDt = new DataTable(); + string selectKey = Request["selectKey"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + //获取查询对象 + seachModel = GetModel(); + condition = CopyToModel(seachModel); + + condition.TableName = "WIPProductEXP"; + //condition.PRODUCTTYPE = ((int)QMAPP.FJC.Entity.EnumGeter.ProductType.fengdao).ToString();//默认查询风道 + + //获取数据 + //var dataResult = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.FeedInManage.EpidermisBLL_GetExportData.ToString(), condition); + QMAPP.FJC.BLL.FeedInManage.EpidermisBLL bll = new QMAPP.FJC.BLL.FeedInManage.EpidermisBLL(); + var dataResult = bll.GetExportData(condition); + //通过返回dataResult判断 + if (dataResult.Ex != null) + { + throw dataResult.Ex; + } + else if (dataResult.IsSuccess) + { + exportDt = dataResult.Result; + } + else + { + SetMessage(dataResult.Msg); + return List(true); + } + + //根据所选信息进行导出 + if (!String.IsNullOrEmpty(selectKey)) + { + DataView dv = new DataView(exportDt); + string strWhere = ""; + string[] list = selectKey.Split(":".ToCharArray()); + foreach (string ID in list) + { + strWhere += " PID='" + ID + "' or"; + } + if (strWhere != "") + { + strWhere = strWhere.Remove((strWhere.Length - 2), 2); + } + dv.RowFilter = strWhere; + exportDt = dv.ToTable(); + } + + //导出 + IEExcelHelper ieExcelHelper = new IEExcelHelper(); + var sheetInfo = ieExcelHelper.GetMainInfo("WIPProductEXP"); + var fileName = System.Guid.NewGuid().ToString() + ".xlsx"; + ieExcelHelper.ExportExcel(sheetInfo, exportDt, QMAPP.Web.Common.ExcelOperationHelper.GetTempPath() + fileName, true); + return Content(fileName); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Info = "导出excel", Tag = "在制品信息查询" }); + SetMessage("导出excel失败"); + return List(true); + } + } + + /// + /// 导出文件 + /// + /// + public ActionResult ExportFile() + { + String filePath = QMAPP.Web.Common.ExcelOperationHelper.GetTempPath(); + String fileName = Request["FileName"]; + QMAPP.Web.Common.ExcelOperationHelper.FileDownload(Response, filePath + fileName, "在制品信息查询.xlsx"); + return Content(""); + } + #endregion + + #region 加载投料列表 + /// + /// 加载投料列表 + /// + /// 结果 + [HandleException] + public ActionResult GetProductInfectionList() + { + string pid = Request.Params["PID"]; + string materialBatch = Request.Params["MATERIALBATCH"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + List list = new List(); + InjectionRecorder condition = new InjectionRecorder(); + #region wcf服务统一接口 + var dataResult = wcfAgent.InvokeServiceFunction>>(QMAPP.ServicesAgent.FeedInManage.EpidermisBLL_GetProductInfectionList.ToString(), pid); + + //通过返回dataResult判断 + if (dataResult.Ex != null) + { + throw dataResult.Ex; + } + else if (dataResult.IsSuccess) + { + list = dataResult.Result; + } + + List objlist = new List(); + foreach (var o in list) + { + objlist.Add(new + { + PID = o.PID, + PPID = o.MPPID, + MATERIALNAME = o.MATERIALNAME, + MATERIALCODE = o.MATERIALCODE, + MATERIALTYPE = o.MATERIALTYPE, + MATERIALBATCH = o.MATERIALBATCH, + INJECTIONINDEX = o.INJECTIONINDEX, + INJECTIONTERMINAL = o.INJECTIONTERMINAL, + USEDWEIGHT = o.USEDWEIGHT + }); + } + + return Content(JsonConvertHelper.GetSerializes(objlist)); + #endregion + } + #endregion + } +} diff --git a/.svn/pristine/9f/9f29c3ab7330e9d8a63a6aff855f62090532ce4b.svn-base b/.svn/pristine/9f/9f29c3ab7330e9d8a63a6aff855f62090532ce4b.svn-base new file mode 100644 index 0000000..16e0bf0 --- /dev/null +++ b/.svn/pristine/9f/9f29c3ab7330e9d8a63a6aff855f62090532ce4b.svn-base @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Data.SqlClient; +using System.Data; +namespace QM.Assist +{ + public class PrintUtil + { + /// + /// 条码打印队列1 + /// + public static List LabelList1 = new List(); + + /// + /// 条码打印队列2(PDF虚拟打印机) + /// + public static List LabelList2 = new List(); + + int count1 = 0; + + /// + /// 截取字符串函数每行放20个字符 + /// + /// + /// + private string[] strSplit(string str) + { + //计数如果大于20则放弃 + string[] tempStr = new string[3]; + int strNo = 0; + //分解的次数 + int number = 0; + + string strTemp = string.Empty; + for (int i = 0; i < str.Length; i++) + { + strTemp = str.Substring(i, 1); + byte[] strByte = Encoding.Default.GetBytes(strTemp); + + if (strNo + strByte.Length <= 20) + { + strNo += strByte.Length; + tempStr[number] = tempStr[number] + strTemp; + } + else + { + strNo = strByte.Length; + number += 1; + tempStr[number] = tempStr[number] + strTemp; + } + } + return tempStr; + + + } + + /// + /// 打印条码2(PDF) + /// + public void PrintLabel2(string proPath, string temPath, string dataPath) + { + + /*************************************测试用***********************************************************************************************************/ + #region + while (true) + { + count1 = LabelList2.Count; + + System.Diagnostics.Process[] thisproc = System.Diagnostics.Process.GetProcessesByName("Lmwprint"); + if (thisproc.Length == 0) + { + if (count1 > 0) + { + //ModifyDataBase2(dataPath); + try + { + System.Diagnostics.Process proc = new System.Diagnostics.Process(); + proc.StartInfo.FileName = "\"" + proPath + "\""; + proc.StartInfo.Arguments = " \"" + temPath + "\""; + proc.Start(); + + for (int i = 0; i < count1; i++) + { + LabelList2.RemoveAt(0); + } + + break; + + } + catch (Exception ex) + { + throw ex; + } + } + } + else + { + thisproc[0].Kill(); + } + System.Threading.Thread.Sleep(1000); + } + #endregion + } + + /// + /// 修改2号条码数据文件(PDF) + /// + private void ModifyDataBase2(string dataPath) + { + #region + while (true) + { + try + { + string head = System.IO.File.ReadAllLines(dataPath, Encoding.ASCII)[0]; + string[] lines = new string[count1 + 1]; + lines[0] = head; + + for (int i = 1; i <= count1; i++) + { + lines[i] = LabelList2[i - 1].BarCode; + //QM.Assist.ExceptionUtil.WriteTrace(lines[i]); + } + System.IO.File.WriteAllLines(dataPath, lines, Encoding.Default); + lines = null; + break; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } + + + /// + /// 打印条码 + /// + public void PrintLabel() + { + + #region + while (true) + { + count1 = LabelList2.Count; + + System.Diagnostics.Process[] thisproc = System.Diagnostics.Process.GetProcessesByName("Lmwprint"); + if (thisproc.Length == 0) + { + if (count1 > 0) + { + ModifyDataBase(); + try + { + System.Diagnostics.Process proc = new System.Diagnostics.Process(); + proc.StartInfo.FileName = "\"" + "程序文件" + "\""; + proc.StartInfo.Arguments = " \"" + "模板文件" + "\""; + proc.Start(); + + for (int i = 0; i < count1; i++) + { + LabelList2.RemoveAt(0); + } + + break; + + } + catch (Exception ex) + { + throw ex; + } + } + } + else + { + thisproc[0].Kill(); + } + System.Threading.Thread.Sleep(1000); + } + #endregion + } + /// + /// 修改2号条码数据文件(PDF) + /// + private void ModifyDataBase() + { + #region + while (true) + { + try + { + string head = System.IO.File.ReadAllLines("数据文件", Encoding.ASCII)[0]; + string[] lines = new string[count1 + 1]; + lines[0] = head; + + for (int i = 1; i <= count1; i++) + { + lines[i] = LabelList2[i - 1].LabelData.Rows[0]["LABELID"].ToString() + + "," + "零件号 " + LabelList2[i - 1].LabelData.Rows[0]["MATNO"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["ITEMNAME"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["MATNAME"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["PACKAAGEQUAN"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["COLOR"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["SIZE"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["WEIGHT"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["BATCH"].ToString() + + "," + "供应商编号 " + LabelList2[i - 1].LabelData.Rows[0]["VENDORID"].ToString() + + "," + LabelList2[i - 1].LabelData.Rows[0]["VENDORNAME"].ToString(); + + //QM.Assist.ExceptionUtil.WriteTrace(lines[i]); + } + System.IO.File.WriteAllLines("数据文件", lines, Encoding.Default); + lines = null; + break; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } + + public static class BarCode + { + + public static string Get128CodeString(string inputData) + { + string result; + int checksum = 104; + + for (int ii = 0; ii < inputData.Length; ii++) + { + if (inputData[ii] >= 32) + { + checksum += (inputData[ii] - 32) * (ii + 1); + } + else + { + checksum += (inputData[ii] + 64) * (ii + 1); + } + } + + checksum = checksum % 103; + if (checksum < 95) + { + checksum += 32; + } + else + { + checksum += 100; + } + + result = Convert.ToChar(204) + inputData + Convert.ToChar(checksum) + Convert.ToChar(206); + return result; + } + } + + } +} diff --git a/.svn/pristine/9f/9fbceb9b3ca069ef8aaf14006e21548bf6d8990a.svn-base b/.svn/pristine/9f/9fbceb9b3ca069ef8aaf14006e21548bf6d8990a.svn-base new file mode 100644 index 0000000..040582d --- /dev/null +++ b/.svn/pristine/9f/9fbceb9b3ca069ef8aaf14006e21548bf6d8990a.svn-base @@ -0,0 +1,78 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ <%=Html.QV(p => p.BucketCode)%> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QV(p=>p.PartCode) %> + + <%=Html.QC(p => p.PartCode)%> +
+ <%=Html.QV(p => p.BatchCode)%> + + <%=Html.QC(p => p.BatchCode)%> +
+ <%=Html.QV(p => p.SerialCode)%> + + <%=Html.QC(p => p.SerialCode)%> +
+
+ <%=Html.HiddenFor(p=>p.PID) %> + <%=Html.HiddenFor(p => p.IsCheck)%> + <%=Html.HiddenFor(p=>p.CREATEDATE) %> + <%=Html.HiddenFor(p=>p.CREATEUSER) %> + <%=Html.HiddenFor(p=>p.UPDATEDATE)%> + <%=Html.HiddenFor(p=>p.UPDATEUSER) %> + <%=Html.QPEnd() %> +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "RawMaterial", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/a0/a0ba7da8b92a53e74152d01008904bcacd04a6b9.svn-base b/.svn/pristine/a0/a0ba7da8b92a53e74152d01008904bcacd04a6b9.svn-base new file mode 100644 index 0000000..12c73e7 --- /dev/null +++ b/.svn/pristine/a0/a0ba7da8b92a53e74152d01008904bcacd04a6b9.svn-base @@ -0,0 +1,221 @@ +using System; +using System.Collections.Generic; +using QMAPP.BLL; + +using QMFrameWork.Data; + +using QMAPP.Entity; +using System.Data; +using QMAPP.MD.Entity; +using QMAPP.MD.DAL; + +namespace QMAPP.MD.BLL +{ + /// + /// 模块名称:缺陷表 + /// 作 者:张松男 + /// 编写日期:2021年5月26日 + /// + public class DefectDictBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(DefectDict model) + { + DataResult result = new DataResult(); + try + { + result.Result = new DefectDictDAL().Get(model); + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + } + #endregion + + #region 获取列表(分页) + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(DefectDict condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + //获取物料信息列表 + DataPage dataPage = new DefectDictDAL().GetList(condition, page); + + result.Result = dataPage; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Msg = Resource.SystemException; + throw ex; + } + result.IsSuccess = true; + return result; + + } + /// + /// 获取全部条码格式规则 + /// + /// + public List GetAllList() + { + return new DefectDictDAL().GetAllList(); + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// 信息 + /// true:已存在;fasel:不存在。 + public bool Exists(DefectDict info) + { + try + { + return new DefectDictDAL().Exists(info); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(DefectDict info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + var isok = new DefectDictDAL().Exists(info); + if (isok) + { + result.Msg = "作废编号重复"; + result.IsSuccess = false; + return result; + } + else + { + info.PID = Guid.NewGuid().ToString(); + info.MFGCODETYPE = "DEFECTCODE"; + info.MFGCODETYPENAME = "缺陷代码"; + info.TYPE_CODE = "N/a"; + DefectDictDAL cmdDAL = new DefectDictDAL(); + result.Result = new DefectDictDAL().Insert(info); + result.IsSuccess = true; + return result; + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// 信息 + /// 更新行数 + public DataResult Update(DefectDict info) + { + DataResult result = new DataResult(); + try + { + var isok = new DefectDictDAL().Exists(info); + if (isok) + { + result.Msg = "作废编号重复"; + result.IsSuccess = false; + return result; + } + else + { + result.Result = new DefectDictDAL().Update(info); + result.IsSuccess = true; + return result; + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除信息 + /// + /// 主键串 + /// 删除个数 + public DataResult Delete(string strs) + { + int count = 0; + DataResult result = new DataResult(); + string[] list = strs.Split(":".ToCharArray()); + try + { + foreach (string str in list) + { + count += this.DeleteBarcodeRules(new DefectDict { PID = str }); + } + result.Result = count; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int DeleteBarcodeRules(DefectDict info) + { + try + { + return new DefectDictDAL().Delete(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/a1/a16d4b35e39ec6066569be10f891dd6848440612.svn-base b/.svn/pristine/a1/a16d4b35e39ec6066569be10f891dd6848440612.svn-base new file mode 100644 index 0000000..3773f1a --- /dev/null +++ b/.svn/pristine/a1/a16d4b35e39ec6066569be10f891dd6848440612.svn-base @@ -0,0 +1,3527 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + //private string _cfgAutoProduct = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + private string _371BiaoPiBarCodeRegex = string.Empty; //表皮码 + private string _316BiaoPiBarCodeRegex = string.Empty; //表皮码 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = GetAppConfigValue("AutoInput条码正则表达式"); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + _371BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则371"]; + _316BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则316"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //if(string.IsNullOrEmpty(_cfgAutoProduct)) + // _cfgAutoProduct = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE) && result.Success) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + else + { + if ((System.Text.RegularExpressions.Regex.IsMatch(productCode, _371BiaoPiBarCodeRegex) || System.Text.RegularExpressions.Regex.IsMatch(productCode, _316BiaoPiBarCodeRegex)) + && processMainCode != productCode) + { + processMainCode = productCode; + } + } + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _bentiBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + { + ispass = true; + } + + } + if (ispass)//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); + if (filterList.Count > 0) + { + string PBOM_CODE = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), PBOM_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + } + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr || "IP_ASSEMBLING,GWASSEMBLE_VW371PA".Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码失败!缺少list[3];planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception($"创建BZD码异常!list=null;planMATERIAL_CODE={planMATERIAL_CODE};processMainCode={processMainCode}"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + if (record == null) + { + record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_Get316Record.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetMaterial.ToString(), new BZDConfig() { MATERIALCODDE = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + else + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/a1/a16f7964e33dc71b3847be2fcb0258ff042c356e.svn-base b/.svn/pristine/a1/a16f7964e33dc71b3847be2fcb0258ff042c356e.svn-base new file mode 100644 index 0000000..48eea25 --- /dev/null +++ b/.svn/pristine/a1/a16f7964e33dc71b3847be2fcb0258ff042c356e.svn-base @@ -0,0 +1,221 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.WinForm.Common; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Operation; +using QMFrameWork.Common.Serialization; +using QMAPP.Entity; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工统计 + /// 作者:王庆男 + /// 时间:2016年3月2日 + /// + public partial class MainOperationStaticForm : Form + { + private ServiceAgent wcfAgent = null; + private MachineInfo _machine = null; + private ProcessSet _pSet = null; + public MainOperationStaticForm() + { + InitializeComponent(); + if (ClientContext.MachineInfo != null) + { + _machine = ClientContext.MachineInfo; + } + + Init(); + } + + public MainOperationStaticForm(MachineInfo machine) + { + InitializeComponent(); + _machine = machine; + Init(); + } + + public MainOperationStaticForm(MachineInfo machine,ProcessSet pSet) + { + InitializeComponent(); + _machine = machine; + _pSet = pSet; + Init(); + } + + private void Init() + { + + DGData.AutoGenerateColumns = false; + + wcfAgent = ClientContext.GetServiceAgent(); + + DateTime dtStart = DateTime.Now; + if (dtStart < Convert.ToDateTime(dtStart.ToShortDateString() + " 7:30:00")) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart; + + comHourStart.Text = "0"; + comHourEnd.Text = "7"; + comMinuteStart.Text = "0"; + comMinuteEnd.Text = "30"; + } + + else if (dtStart > Convert.ToDateTime(dtStart.ToShortDateString() + " 7:30:00") && dtStart.Hour < 16) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart; + + comHourStart.Text = "7"; + comMinuteStart.Text = "30"; + comHourEnd.Text = "16"; + comMinuteEnd.Text = "0"; + } + + else if (dtStart.Hour >= 16) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart.AddDays(1); + + comHourStart.Text = "16"; + comHourEnd.Text = "0"; + comMinuteStart.Text = "0"; + comMinuteEnd.Text = "0"; + } + + + + //this.dateOpeStart.ValueX = dtStart; + //this.dateOpeEnd.ValueX = dtEnd; + BindDataGrid(); + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindDataGrid() + { + MainOperation condtion = new MainOperation(); + condtion.CREATEUSER = ClientContext.LoginInfo.UserID; + condtion.MACHINECODDE = _machine.MACHINECODDE; + condtion.DATEOPESTART = Convert.ToDateTime(dpOpeStart.Value.ToString("yyyy-MM-dd") + " " + comHourStart.Text.ToString() + ":" + comMinuteStart.Text.ToString() + ":00"); + condtion.DATEOPEEND = Convert.ToDateTime(dpOpeEnd.Value.ToString("yyyy-MM-dd") + " " + comHourEnd.Text.ToString() + ":" + comMinuteEnd.Text.ToString() + ":00"); + var dataResult = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9BasicService.MainOperationBLL_GetListForstatisticWithColor.ToString(), + condtion); + + //new MainOperation + // { + // DATEOPESTART = String.IsNullOrEmpty(dateOpeStart.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()) ? DateTime.MinValue : Convert.ToDateTime(dateOpeStart.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()), + // DATEOPEEND = String.IsNullOrEmpty(dateOpeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()) ? DateTime.MinValue : Convert.ToDateTime(dateOpeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()), + // CREATEUSER = ClientContext.LoginInfo.UserID, + // MACHINECODDE = _machine.MACHINECODDE + // } + + if (!dataResult.IsSuccess) + { + MessageBox.Show(dataResult.Msg); + } + + DataTable dt = dataResult.Result; + + if (dt.Rows.Count > 0) + { + int sum = 0; + foreach (DataRow dr in dt.Rows) + { + sum += Convert.ToInt32(dr["加工数量"]); + } + + DataRow ndr = dt.NewRow(); + //ndr["颜色"] = "合计"; + ndr["加工数量"] = sum; + dt.Rows.Add(ndr); + } + + + DGData.DataSource = dt; + + DGData.ClearSelection(); + + //设置数值型局右显示 + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + + BindDataGrid(); + } + #endregion + + #region 窗体加载事件 + private void MainOperationStaticForm_Load(object sender, EventArgs e) + { + this.WindowState = FormWindowState.Maximized; + } + #endregion + + #region 设置序号 + private void DGData_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGData.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGData.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + + private void tbtnSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OperationForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OperationForm form = new OperationForm(); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void toolStripButton1_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void toolStripButton2_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationCompleteForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationCompleteForm form = new MainOperationCompleteForm(); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + } +} diff --git a/.svn/pristine/a1/a170ee67596218b12e8bb7aac519e5ffe11c785e.svn-base b/.svn/pristine/a1/a170ee67596218b12e8bb7aac519e5ffe11c785e.svn-base new file mode 100644 index 0000000..7ba0b78 --- /dev/null +++ b/.svn/pristine/a1/a170ee67596218b12e8bb7aac519e5ffe11c785e.svn-base @@ -0,0 +1,4706 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace QMAPP.ServicesAgent +{ + /// + /// 示例服务方法枚举 + /// + [Description("示例服务方法枚举")] + public enum ExampleService + { + /// + /// 获取用户列表 + /// + [Description("获取用户列表")] + UserManageBLL_GetList + } + + /// + /// 系统服务方法枚举 + /// + [Description("系统服务方法枚举")] + public enum SystemService + { + /// + /// 服务初始化 + /// + [Description("服务初始化")] + ServiceInit, + + #region 通知管理 + + /// + /// 获取通知信息 + /// + [Description("获取通知信息")] + NoticeManageBll_Get, + /// + /// 根据通知ID,从通知浏览记录表中,获取发送目标 + /// + [Description("根据通知ID,从通知浏览记录表中,获取发送目标 ")] + NoticeManageBll_GetSendaimIdList, + /// + /// 获取用户 + /// + [Description("获取用户")] + NoticeManageBll_GetUser, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_DeleteNotice, + + /// + /// 删除原附件 + /// + [Description("删除原附件")] + NoticeManageBll_DeleteFile, + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + NoticeManageBll_ExistsFile, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_Save, + + /// + /// 获取未读通知 + /// + [Description("获取未读通知")] + NoticeManageBll_GetNotReadNotice, + /// + /// 获取未读即时通知 + /// + [Description("获取未读即时通知")] + NoticeManageBll_GetNotReadInstantNotice, + /// + /// 获取通知列表 + /// + [Description("获取通知列表")] + NoticeManageBll_GetList, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowse, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowseModel, + /// + /// 更新通知浏览记录为已浏览 + /// + [Description("更新通知浏览记录为已浏览")] + NoticeManageBll_UpdateNoticeBrowse, + /// + /// 获取通知浏览记录列表 + /// + [Description("获取通知浏览记录列表")] + NoticeManageBll_GetBrowseList, + /// + /// 获取导出通知信息 + /// + [Description("获取导出通知信息")] + NoticeManageBll_GetExportData, + /// + /// 定时删除超过六个月的通知浏览记录 + /// + [Description("定时删除超过六个月的通知浏览记录")] + NoticeManageBll_DeleteNoticeBrowse, + /// + /// 获取联系人列表 + /// + [Description("获取联系人列表")] + NoticeManageBll_GetNoticeUserList, + /// + /// 获取组织结构树形集合 + /// + [Description("获取组织结构树形集合")] + NoticeManageBll_GetAllList, + #endregion + + #region 文件管理 + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileInfoBLL_Get, + + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + FileInfoBLL_ExistsFile, + + /// + /// 获取文件信息列表 + /// + [Description("获取文件信息列表")] + FileInfoBLL_GetList, + /// + /// 删除附件 + /// + [Description("删除附件")] + FileInfoBLL_DeleteFile, + /// + /// 删除文件信息 + /// + [Description("删除文件信息")] + FileInfoBLL_Delete, + /// + /// 获取导出文件信息 + /// + [Description("获取导出文件信息")] + FileInfoBLL_GetExportData, + + + /// + /// 插入文件信息 + /// + [Description("插入文件信息")] + FileInfoBLL_Insert, + /// + /// 更新文件信息 + /// + [Description("更新文件信息")] + FileInfoBLL_Update, + + #endregion + + #region 文件类型管理 + /// + /// 获取文件类型 + /// + [Description("获取文件类型")] + FileTypeBLL_Get, + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileTypeBLL_Delete, + /// + /// 获取文件类型树状列表 + /// + [Description("获取文件类型树状列表")] + FileTypeBLL_GetAllList, + + /// + /// 获取文件类型列表 + /// + [Description("获取文件类型列表")] + FileTypeBLL_GetList, + + /// + /// 插入文件类型 + /// + [Description("插入文件类型")] + FileTypeBLL_Insert, + + /// + /// 修改文件类型 + /// + [Description("修改文件类型")] + FileTypeBLL_Update, + + /// + /// 获取文件分类下拉列表 + /// + [Description("获取文件分类下拉列表")] + FileTypeBLL_GetCombox + #endregion + + } + + + #region 基础数据方法枚举 + + /// + /// 基础数据方法枚举 + /// + [Description("基础数据方法枚举")] + public enum DictService + { + #region 生产配置 + + /// + /// 插入 + /// + [Description("插入")] + AppConfigBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + AppConfigBLL_Update, + + #endregion + + #region + + /// + /// 插入 + /// + [Description("插入")] + TSWeighRecoreBLL_Insert, + + /// + /// 查询 + /// + [Description("查询")] + TSWeighRecoreBLL_GetList, + + #endregion + + + #region 注塑物料绑定信息 + /// + /// 插入 + /// + [Description("插入")] + BucketMaterialClassBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketMaterialClassBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketMaterialClassBLL_Delete, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialClassBLL_GetBucketMaterialList, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialClassBLL_GetList, + /// + /// 查询 + /// + [Description("查询")] + RawMaterialRecordBLL_GetListRecord, + /// + /// 查询 + /// + [Description("查询")] + RawMaterialBLL_GetListRaw, + + #endregion + + #region 注塑料筒绑定信息信息 + /// + /// 插入 + /// + [Description("插入")] + BucketMaterialBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketMaterialBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketMaterialBLL_Delete, + + /// + /// 查询 + /// + [Description("查询")] + BucketMaterialBLL_GetBucketMaterialList, + + #endregion + + #region 注塑料筒信息 + /// + /// 插入 + /// + [Description("插入")] + BucketInfoBLL_Insert, + + /// + /// 更新 + /// + [Description("更新")] + BucketInfoBLL_Update, + + /// + /// 删除 + /// + [Description("删除")] + BucketInfoBLL_Delete, + + #endregion + + #region 工厂信息 + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList, + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList1, + + /// + /// 获取工厂信息(字典) + /// + [Description("获取工厂字典")] + FactoryBLL_GetFactorys, + + /// + /// 获取工厂信息 + /// + [Description("获取工厂信息")] + FactoryBLL_Get, + + /// + /// 根据主键获取工厂信息 + /// + [Description("根据主键获取工厂信息")] + FactoryBLL_GetFactoryByPk, + + /// + /// 插入工厂信息 + /// + [Description("插入工厂信息")] + FactoryBLL_Insert, + + /// + /// 删除工厂信息 + /// + [Description("删除工厂信息")] + FactoryBLL_Delete, + /// + /// 更新工厂信息 + /// + [Description("工厂更新信息")] + FactoryBLL_Update, + + /// + /// 工厂信息导出 + /// + [Description("工厂信息导出")] + FactoryBLL_GetExportData, + + /// + /// 工厂信息导入 + /// + [Description("工厂信息导入")] + FactoryBLL_GetImportData, + + /// + /// 检验工厂编号是否重复 + /// + [Description("检验工厂编号")] + FactoryBLL_ExistsFactory, + /// + /// 根据工位查找工厂 + /// + [Description("根据工位查找工厂")] + DictManagerBLL_GetWerksList, + /// + /// 根据工厂查找工位 + /// + [Description("根据工厂查找工位")] + DictManagerBLL_GetWorkSationListFor, + #endregion + + #region 母车信息 + + + /// + /// 获取母车信息列表 + /// + [Description("获取母车信息列表")] + MotherCarTypeBLL_GetList, + + /// + /// 获取母车信息列表 + /// + [Description("获取母车字典")] + MotherCarTypeBLL_GetMotherCarTypes, + + /// + /// 获取母车信息 + /// + [Description("获取母车信息")] + MotherCarTypeBLL_Get, + + /// + /// 插入母车信息 + /// + [Description("插入母车信息")] + MotherCarTypeBLL_Insert, + + /// + /// 删除母车信息 + /// + [Description("删除母车信息")] + MotherCarTypeBLL_Delete, + /// + /// 更新母车信息 + /// + [Description("更新母车信息")] + MotherCarTypeBLL_Update, + + /// + /// 母车信息导出 + /// + [Description("母车信息导出")] + MotherCarTypeBLL_GetExportData, + + /// + /// 母车信息数据导入 + /// + [Description("母车信息数据导入")] + MotherCarTypeBLL_GetImportData, + + /// + /// 检验母车编号是否重复 + /// + [Description("检验母车编号")] + MotherCarTypeBLL_ExistsMotherCarType, + + #endregion + + #region 子车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子车信息列表")] + SonCarTypeBLL_GetList, + + /// + /// 获取子车信息 + /// + [Description("获取子车信息")] + SonCarTypeBLL_Get, + + /// + /// 获取子车信息 + /// + [Description("获取子车字典")] + SonCarTypeBLL_GetSonCarTypes, + + /// + /// 插入子车信息 + /// + [Description("插入子车信息")] + SonCarTypeBLL_Insert, + + /// + /// 删除子车信息 + /// + [Description("删除子车信息")] + SonCarTypeBLL_Delete, + /// + /// 更新子车信息 + /// + [Description("更新子车信息")] + SonCarTypeBLL_Update, + + /// + /// 子车信息导出 + /// + [Description("子车信息导出")] + SonCarTypeBLL_GetExportData, + + /// + /// 子车信息数据导入 + /// + [Description("子车信息数据导入")] + SonCarTypeBLL_GetImportData, + + /// + /// 检验子车编号是否重复 + /// + [Description("检验子车编号")] + SonCarTypeBLL_ExistsSonCarType, + #endregion + + #region 子母车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子母车信息列表")] + MotherSonRelationManageBLL_GetList, + + /// + /// 获取子母车信息 + /// + [Description("获取子母车信息")] + MotherSonRelationManageBLL_Get, + + // + /// 子母车信息重复检验 + /// + [Description("子母车信息重复检验")] + MotherSonRelationManageBLL_ExistsMotherSonRelation, + + /// + /// 插入子母车信息 + /// + [Description("插入子母车信息")] + MotherSonRelationManageBLL_Insert, + + /// + /// 删除子母车信息 + /// + [Description("删除子母车信息")] + MotherSonRelationManageBLL_Delete, + /// + /// 更新子母车信息 + /// + [Description("更新子母车信息")] + MotherSonRelationManageBLL_Update, + + /// + /// 子母车信息导出 + /// + [Description("子母车信息导出")] + MotherSonRelationManageBLL_GetExportData, + + /// + /// 子母车信息数据导入 + /// + [Description("子母车信息数据导入")] + MotherSonRelationManageBLL_GetImportData, + + #endregion + + #region 退货原因信息 + + /// + /// 退货原因信息列表 + /// + [Description("获取退货原因信息列表")] + ReturnReasonManageBLL_GetList, + + /// + ///退货原因信息 + /// + [Description("获取退货原因信息")] + ReturnReasonManageBLL_Get, + + /// + /// 插入退货原因信息 + /// + [Description("插入退货原因信息")] + ReturnReasonManageBLL_Insert, + + /// + /// 退货编号重复校验 + /// + [Description("退货编号重复校验")] + ReturnReasonManageBLL_ExistsReturnReason, + + /// + /// 删除退货原因信息 + /// + [Description("删除退货原因信息")] + ReturnReasonManageBLL_Delete, + /// + /// 更新退货原因信息 + /// + [Description("更新退货原因信息")] + ReturnReasonManageBLL_Update, + + /// + /// 子退货原因信息导出 + /// + [Description("退货原因信息导出")] + ReturnReasonManageBLL_GetExportData, + + /// + /// 子退货原因信息数据导入 + /// + [Description("子退货原因信息数据导入")] + ReturnReasonManageBLL_GetImportData, + #endregion + + #region 要货地信息 + + /// + /// 要货地信息列表 + /// + [Description("获取要货地信息列表")] + PlacedisManageBLL_GetList, + + /// + ///要货地信息 + /// + [Description("获取要货地信息")] + PlacedisManageBLL_Get, + + /// + /// 插入要货地信息 + /// + [Description("插入要货地信息")] + PlacedisManageBLL_Insert, + + /// + /// 删除要货地信息 + /// + [Description("删除要货地信息")] + PlacedisManageBLL_Delete, + + /// + /// Sap同步要货地信息 + /// + [Description("Sap同步要货地信息")] + PlacedisManageBLL_SapSyn, + + /// + /// 更新要货地信息 + /// + [Description("更新要货地信息")] + PlacedisManageBLL_Update, + + /// + /// 要货地信息导出 + /// + [Description("要货地信息导出")] + PlacedisManageBLL_GetImportData, + + /// + /// 要货地信息导入 + /// + [Description("要货地信息导入")] + PlacedisManageBLL_GetExportData, + + /// + /// 获要货信息列表 + /// + [Description("获要货信息列表")] + DictManagerBLL_GetPlaceDisList, + + [Description("获要货信息列表根据权限")] + DictManagerBLL_GetReqPlaceList, + + /// + /// 转换包装台和仓库对应 + /// + [Description("转换包装台和仓库对应")] + DictManagerBLL_GetCpackPlaceList2, + #endregion + + #region 仓库信息 + + /// + /// 获取仓库信息列表 + /// + [Description("获取仓库信息列表")] + CorpManageBLL_GetList, + + [Description("获取仓库信息列表")] + DictManagerBLL_GetAllCorpList, + + [Description("根据用户获取仓库信息列表")] + DictManagerBLL_GetCorpList, + /// + /// 获取仓库信息 + /// + [Description("获取仓库信息")] + CorpManageBLL_Get, + /// + /// 获取仓库信息 + /// + [Description("获取仓库相关工厂信息")] + CorpManageBLL_GetCorpRelation, + /// + /// 插入仓库信息 + /// + [Description("插入仓库信息")] + CorpManageBLL_Insert, + + /// + /// 删除仓库信息 + /// + [Description("删除仓库信息")] + CorpManageBLL_Delete, + /// + /// 更新仓库信息 + /// + [Description("仓库更新信息")] + CorpManageBLL_Update, + + /// + /// 仓库信息导出 + /// + [Description("仓库信息导出")] + CorpManageBLL_GetExportData, + + /// + /// 仓库信息入 + /// + [Description("仓库信息导入")] + CorpManageBLL_GetImportData, + + [Description("仓库权限")] + CorpManageBLL_UserCorp, + #endregion + + #region 区域信息 + + /// + /// 获取区域信息列表 + /// + [Description("获取区域信息列表")] + StorageAreaManageBLL_GetList, + + /// + /// 获取区域信息 + /// + [Description("获取区域信息")] + StorageAreaManageBLL_Get, + + /// + /// 插入区域信息 + /// + [Description("插入区域信息")] + StorageAreaManageBLL_Insert, + + /// + /// 删除区域信息 + /// + [Description("删除区域信息")] + StorageAreaManageBLL_Delete, + /// + /// 更新区域信息 + /// + [Description("区域更新信息")] + StorageAreaManageBLL_Update, + + /// + /// 区域信息导出 + /// + [Description("区域信息导出")] + StorageAreaManageBLL_GetExportData, + + /// + /// 区域信息入 + /// + [Description("区域信息导入")] + StorageAreaManageBLL_GetImportData, + #endregion + + #region 框架协议 + + /// + /// 获取框架协议列表 + /// + [Description("获取框架协议列表")] + SourceListBLL_GetList, + + /// + /// 删除框架协议列表 + /// + [Description("删除框架协议列表")] + SourceListBLL_Delete, + + /// + /// 获取框架协议 + /// + [Description("获取框架协议")] + SourceListBLL_Get, + + /// + /// 更新框架协议 + /// + [Description("更新框架协议")] + SourceListBLL_Update, + + /// + /// 添加框架协议 + /// + [Description("添加框架协议")] + SourceListBLL_Insert, + + /// + /// 单条同步 + /// + [Description("单条同步")] + SourceListBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + SourceListBLL_AllSynData, + + #endregion + + #region BESI数据 + /// + /// 获取BESI数据列表 + /// + [Description("获取框架协议列表")] + BESIBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + BESIBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + BESIBLL_AllSynData, + #endregion + + #region 零件信息 + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageBLL_StopRecover, + #endregion + + #region 零件信息ForPAD + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageForPADBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageForPADBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageForPADBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageForPADBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageForPADBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageForPADBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageForPADBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageForPADBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageForPADBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageForPADBLL_StopRecover, + #endregion + + #region 零件类别 + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表字典")] + MaterialSortManageBLL_GetMatSorts, + + /// + /// 获取零件类别(根据用户过滤) + /// + [Description("获取零件类别(根据用户过滤)")] + DictManagerBLL_GetMaterialSort, + + [Description("获取零件类别(根据工厂、仓库、工位、路线、零件号)")] + DictManagerBLL_GetMaterialSortFor, + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表")] + MaterialSortManageBLL_GetList, + + /// + /// 获取零件类别信息 + /// + [Description("获取零件类别信息")] + MaterialSortManageBLL_Get, + + /// + /// 获取零件类别s + /// + [Description("获取零件类别")] + DictManagerBLL_GetAllMaterialSort, + + /// + /// 插入零件类别信息 + /// + [Description("插入零件类别信息")] + MaterialSortManageBLL_Insert, + + /// + /// 删除零件类别信息 + /// + [Description("删除零件类别信息")] + MaterialSortManageBLL_Delete, + /// + /// 零件类别更新信息 + /// + [Description("零件类别更新信息")] + MaterialSortManageBLL_Update, + + /// + /// 零件类别信息导出 + /// + [Description("零件类别导出")] + MaterialSortManageBLL_GetExportData, + + /// + /// 零件类别信息导入 + /// + [Description("零件类别导入")] + MaterialSortManageBLL_GetImportData, + + #endregion + + #region 工位信息 + /// + /// 获取工位信息列表(数据源) + /// + [Description("获取工位信息列表(数据源)")] + WorkStationManageBLL_GetCombox, + /// + /// 获取工位信息列表 + /// + [Description("获取工位信息列表")] + WorkStationManageBLL_GetList, + + /// + /// 获取工位信息列表 + /// + [Description("工位同步")] + WorkStationManageBLL_SapSyn, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationBLL_Get, + + /// + /// 插入工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_Insert, + + /// + /// 插入PAD工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_PADInsert, + + /// + /// 删除零件信息 + /// + [Description("删除工位信息")] + WorkStationManageBLL_Delete, + /// + /// 工位更新信息 + /// + [Description("工位更新信息")] + WorkStationManageBLL_Update, + + /// + /// 工位信息导出 + /// + [Description("工位信息导出")] + WorkStationManageBLL_GetExportData, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationManageBLL_Get, + + [Description("工位获取导入数据")] + WorkStationManageBLL_GetImportData, + + #endregion + + #region 路线信息 + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + LineManageBLL_GetList, + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + DictManagerBLL_GetAllLineList, + + [Description("根据用户及仓库获取路线信息列表")] + DictManagerBLL_GetLineList, + /// + /// 获取路线信息 + /// + [Description("获取路线信息")] + LineManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + LineManageBLL_GetLineByPk, + + /// + /// 插入路线信息 + /// + [Description("插入路线信息")] + LineManageBLL_Insert, + + /// + /// 删除路线信息 + /// + [Description("删除路线信息")] + LineManageBLL_Delete, + /// + /// 路线更新信息 + /// + [Description("路线更新信息")] + LineManageBLL_Update, + + /// + /// 路线信息导出 + /// + [Description("路线信息导出")] + LineManageBLL_GetExportData, + /// + /// 路线信息导入 + /// + [Description("路线信息导入")] + LineManageBLL_GetImportData, + #endregion + + #region 库位信息 + + /// + /// 获取库位信息列表 + /// + [Description("获取库位信息列表")] + StorageBinManageBLL_GetList, + + /// + /// 获取库位信息 + /// + [Description("获取库位信息")] + StorageBinBLL_Get, + + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + StorageBinManageBLL_GetStorageBinByPk, + + + /// + /// 插入库位信息 + /// + [Description("插入库位信息")] + StorageBinManageBLL_Insert, + + /// + /// 删除库位信息 + /// + [Description("删除库位信息")] + StorageBinManageBLL_Delete, + /// + /// 库位更新信息 + /// + [Description("库位更新信息")] + StorageBinManageBLL_Update, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn1, + /// + /// 库位信息导出 + /// + [Description("库位信息导出")] + StorageBinManageBLL_GetExportData, + + [Description("库位检查重复项")] + StorageBinManageBLL_CheckMaterialnoSingle, + + [Description("库位获取导入数据")] + StorageBinManageBLL_GetImportData, + + [Description("库位检查删除零件")] + StorageBinManageBLL_CheckdDeleteMaterial, + #endregion + + #region 零件高低储信息 + + /// + /// 获取零件高低储信息列表 + /// + [Description("获取零件高低储信息列表")] + MatLowerUpperManageBLL_GetList, + + /// + /// 获取零件高低储信息 + /// + [Description("获取零件高低储信息")] + MatLowerUpperBLL_Get, + + /// + /// 插入零件高低储信息 + /// + [Description("插入零件高低储信息")] + MatLowerUpperManageBLL_Insert, + + /// + /// 删除零件高低储信息 + /// + [Description("删除零件高低储信息")] + MatLowerUpperManageBLL_Delete, + /// + /// 零件高低储更新信息 + /// + [Description("零件高低储更新信息")] + MatLowerUpperManageBLL_Update, + + /// + /// 零件高低储信息导出 + /// + [Description("零件高低储信息导出")] + MatLowerUpperManageBLL_GetExportData, + + /// + /// 零件高低储信息导入 + /// + [Description("零件高低储信息导入")] + MatLowerUpperManageBLL_ImportData, + + #endregion + + #region 自制件器具信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + UtenSilManageBLL_GetCombox, + + /// + /// 获取自制件器具信息列表 + /// + [Description("获取自制件器具信息列表")] + UtenSilManageBLL_GetList, + + /// + /// 获取自制件器具信息 + /// + [Description("获取自制件器具信息")] + UtenSilManageBLL_Get, + + /// + /// 插入自制件器具信息 + /// + [Description("插入自制件器具信息")] + UtenSilManageBLL_Insert, + + /// + /// 删除自制件器具信息 + /// + [Description("删除自制件器具信息")] + UtenSilManageBLL_Delete, + /// + /// 自制件器具更新信息 + /// + [Description("自制件器具更新信息")] + UtenSilManageBLL_Update, + + /// + /// 自制件器具信息导出 + /// + [Description("自制件器具信息导出")] + UtenSilManageBLL_GetExportData, + + [Description("自制件器具信息导入")] + UtenSilManageBLL_GetImportData, + + #endregion + + #region 自制件零件相关信息 + + /// + /// 获取自制件零件相关信息列表 + /// + [Description("获取自制件零件相关信息列表")] + HMaterialManageBLL_GetList, + + /// + /// 获取自制件零件相关信息 + /// + [Description("获取自制件零件相关信息")] + HMaterialManageBLL_Get, + + /// + /// 插入自制件零件相关信息 + /// + [Description("插入自制件零件相关信息")] + HMaterialManageBLL_Insert, + + /// + /// 删除自制件零件相关信息 + /// + [Description("删除自制件零件相关信息")] + HMaterialManageBLL_Delete, + /// + /// 自制件零件相关更新信息 + /// + [Description("自制件零件相关更新信息")] + HMaterialManageBLL_Update, + + /// + /// 自制件零件相关信息导出 + /// + [Description("自制件零件相关信息导出")] + HMaterialManageBLL_GetExportData, + + /// + /// 自制件零件相关信息导入 + /// + [Description("自制件零件相关信息导入")] + HMaterialManageBLL_GetImportData, + #endregion + + #region 自制件发货地信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + HMatSendPlaceManageBLL_GetCombox, + + /// + /// 获取自制件发货地信息列表 + /// + [Description("获取自制件发货地信息列表")] + HMatSendPlaceManageBLL_GetList, + + /// + /// 获取自制件发货地信息 + /// + [Description("获取自制件发货地信息")] + HMatSendPlaceManageBLL_Get, + + /// + /// 插入自制件发货地信息 + /// + [Description("插入自制件发货地信息")] + HMatSendPlaceManageBLL_Insert, + + /// + /// 删除自制件发货地信息 + /// + [Description("删除自制件发货地信息")] + HMatSendPlaceManageBLL_Delete, + /// + /// 自制件发货地更新信息 + /// + [Description("自制件发货地更新信息")] + HMatSendPlaceManageBLL_Update, + + /// + /// 自制件发货地信息导出 + /// + [Description("自制件发货地信息导出")] + HMatSendPlaceManageBLL_GetExportData, + + /// + /// 自制件发货地信息导入 + /// + [Description("自制件发货地信息导入")] + HMatSendPlaceManageBLL_GetImportData, + + #endregion + + #region 转换包装台信息 + + /// + /// 获取转换包装台信息列表 + /// + [Description("获取转换包装台信息列表")] + CpackPlaceManageBLL_GetList, + + /// + /// 获取转换包装台信息 + /// + [Description("获取转换包装台信息")] + CpackPlaceManageBLL_Get, + + /// + /// 插入转换包装台信息 + /// + [Description("插入转换包装台信息")] + CpackPlaceManageBLL_Insert, + + /// + /// 删除转换包装台信息 + /// + [Description("删除转换包装台信息")] + CpackPlaceManageBLL_Delete, + /// + /// 转换包装台更新信息 + /// + [Description("转换包装台更新信息")] + CpackPlaceManageBLL_Update, + + /// + /// 转换包装台信息导出 + /// + [Description("转换包装台信息导出")] + CpackPlaceManageBLL_GetExportData, + + /// + /// 转换包装台信息导入 + /// + [Description("转换包装台信息导入")] + CpackPlaceManageBLL_ImportData, + + #endregion + + #region 转换包装关联关系信息 + + /// + /// 获取转换包装关联关系信息列表 + /// + [Description("获取转换包装关联关系信息列表")] + CpackageManageBLL_GetList, + + /// + /// 获取转换包装关联关系信息 + /// + [Description("获取转换包装关联关系信息")] + CpackBLL_Get, + + /// + /// 插入转换包装关联关系信息 + /// + [Description("插入转换包装关联关系信息")] + CpackageManageBLL_Insert, + + /// + /// 删除转换包装关联关系信息 + /// + [Description("删除转换包装关联关系信息")] + CpackageManageBLL_Delete, + /// + /// 转换包装关联关系更新信息 + /// + [Description("转换包装关联关系更新信息")] + CpackageManageBLL_Update, + + /// + /// 转换包装关联关系信息导出 + /// + [Description("转换包装关联关系信息导出")] + CpackageManageBLL_GetExportData, + + #endregion + + #region 转换包装台与零件关系信息 + + /// + /// 获取转换包装台与零件关系信息列表 + /// + [Description("获取转换包装台与零件关系信息列表")] + CpackPlaceMatManageBLL_GetList, + + /// + /// 获取转换包装台与零件关系信息 + /// + [Description("获取转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Get, + + /// + /// 插入转换包装台与零件关系信息 + /// + [Description("插入转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Insert, + + /// + /// 删除转换包装台与零件关系信息 + /// + [Description("删除转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Delete, + /// + /// 转换包装台与零件关系更新信息 + /// + [Description("转换包装台与零件关系更新信息")] + CpackPlaceMatManageBLL_Update, + + [Description("转换包装台获取仓库信息")] + CpackPlaceMatManageBLL_GetCpackPlace, + + /// + /// 转换包装台与零件关系信息导出 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_GetExportData, + /// + /// 转换包装台与零件关系信息导入 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_ImportData, + + [Description("转换包装台与零件关系信息同步SAP")] + CpackPlaceMatManageBLL_SapSyn, + MatLowerUpperManageBLL_Get, + WorkStationManageBLL_CheckSame, + StorageBinManageBLL_CheckSame, + StorageBinManageBLL_Get, + + + #endregion + + #region 货位类型信息 + + /// + /// 获取货位类型信息列表 + /// + [Description("获取货位类型信息列表")] + CargoTypeManageBLL_GetList, + + /// + /// 获取货位类型信息 + /// + [Description("获取货位类型信息")] + CargoTypeManageBLL_Get, + + /// + /// 插入货位类型信息 + /// + [Description("插入货位类型信息")] + CargoTypeManageBLL_Insert, + + /// + /// 删除货位类型信息 + /// + [Description("删除货位类型信息")] + CargoTypeManageBLL_Delete, + /// + /// 货位类型更新信息 + /// + [Description("货位类型更新信息")] + CargoTypeManageBLL_Update, + + [Description("货位类型导出")] + CargoTypeManageBLL_GetExportData, + + [Description("货位类型导入")] + CargoTypeManageBLL_ImportData, + #endregion + + #region 特殊配额 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + ZspqaBLL_GetList, + /// + /// 获取特殊配额信息 + /// + [Description("获取特殊配额信息")] + ZspqaBLL_Get, + /// + /// 插入 + /// + [Description("插入")] + ZspqaBLL_Insert, + /// + /// 更新 + /// + [Description("更新")] + ZspqaBLL_Update, + /// + /// 删除 + /// + [Description("删除")] + ZspqaBLL_Delete, + /// + /// 导入 + /// + [Description("导入")] + ZspqaBLL_ImportData, + /// + /// 导出 + /// + [Description("导出")] + ZspqaBLL_GetExportData, + /// + /// 获取配额表中零件号及信息 + /// + [Description("获取配额表中零件号及信息")] + ZspqaBLL_GetMaterListByQuota, + #endregion + + #region 配额管理 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + QuoTaBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + QuoTaBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + QuoTaBLL_AllSynData, + + #endregion + + #region 工位零件货位类型 + [Description("工位零件货位类型删除")] + MatstorageBinstationBLL_Delete, + + [Description("工位零件货位类型获取数据列表")] + MatstorageBinstationBLL_GetList, + + [Description("工位零件货位类型更新")] + MatstorageBinstationBLL_Update, + + [Description("工位零件货位类型添加")] + MatstorageBinstationBLL_Insert, + + [Description("工位零件货位类型导入")] + MatstorageBinstationBLL_GetImportData, + + [Description("工位零件货位类型导出")] + MatstorageBinstationBLL_GetExportData, + + [Description("删除货位类型校验")] + MatstorageBinstationBLL_CheckDeleteCargo, + + [Description("工位零件货位类型获取单条数据")] + MatstorageBinstationBLL_Get, + MatstorageBinstationBLL_GetDetail, + StorageBinManageBLL_CheckdArea, + WorkStationManageBLL_CheckMWID, + StorageBinManageBLL_Lock, + [Description("库位SAP同步")] + StorageBinManageBLL_SapSyn, + #endregion + + #region R3器具 + [Description("获取R3器具信息列表")] + R3UtenSilManageBLL_GetList, + R3UtenSilManageBLL_Insert, + R3UtenSilManageBLL_Delete, + R3UtenSilManageBLL_GetExportData, + R3UtenSilManageBLL_ImportData, + R3UtenSilManageBLL_SapSyn, + #endregion + + #region 要货类型 + [Description("获取列表")] + RequestTypeBLL_GetList, + RequestTypeBLL_Get, + RequestTypeBLL_Insert, + RequestTypeBLL_Update, + RequestTypeBLL_Delete, + RequestTypeBLL_ImportData, + RequestTypeBLL_GetExportData, + + #endregion + + #region 承运商车辆信息 + + [Description("获取列表")] + SendSplrBLL_Get, + SendSplrBLL_Search, + SendSplrBLL_Insert, + SendSplrBLL_Delete, + SendSplrBLL_Update, + SendSplrBLL_Import, + SendSplrBLL_GetExportData, + + #endregion + + #region DictManageBLL + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplrList, + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplr, + + DictManagerBLL_GetTruckNo, + + + #endregion + + #region 工位器具 + + /// + /// 获取工位器具信息列表 + /// + [Description("获取工位器具信息列表")] + WorkStationMaterialBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + WorkStationMaterialBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + WorkStationMaterialBLL_AllSynData, + + #endregion + + #region 零件同步 + + /// + /// 获取零件同步信息列表 + /// + [Description("获取零件同步信息列表")] + MatnrBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + MatnrBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + MatnrBLL_AllSynData, + #endregion + + #region CDK库存 + /// + /// 获取CDK库存信息列表 + /// + [Description("获取CDK库存信息列表")] + CKDStockBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + CKDStockBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + CKDStockBLL_AllSynData, + #endregion + + CKDBatchPriorityBLL_Get, + + CKDBatchPriorityBLL_Insert, + + CKDBatchPriorityBLL_Update, + + CKDBatchPriorityBLL_Delete, + + CKDBatchPriorityBLL_GetList, + + CKDBatchPriorityBLL_GetExportData, + + CKDBatchPriorityBLL_GetImportData, + + CKDBatchPriorityBLL_Forward, + + CKDBatchPriorityBLL_Backone, + + DictManageBLL_GetMachineListByProcessType, + + + } + + #endregion + + /// + /// 支持交互方法枚举 + /// + [Description("支持交互方法枚举")] + public enum SupportMutualService + { + [Description("获取问题类型信息")] + SIProblemTypeBLL_Get, + + [Description("获取问题类型列表")] + SIProblemTypeBLL_GetList, + + [Description("判断类型名称是否已经存在")] + SIProblemTypeBLL_CheckProblemTypeNameExist, + + + [Description("插入问题类型信息")] + SIProblemTypeBLL_Insert, + + [Description("更新问题类型信息")] + SIProblemTypeBLL_Update, + + [Description("删除问题类型信息")] + SIProblemTypeBLL_Delete, + + [Description("获取问题类型导出信息")] + SIProblemTypeBLL_GetExportData, + + [Description("搜索问题解决方案")] + SupportInteractionBLL_GetList, + + [Description("获取问题类型下拉列表")] + SupportInteractionBLL_GetTypeList, + + [Description("问题解决方案导出")] + SupportInteractionBLL_GetExportData, + + [Description("获取问题列表")] + SupportInteractionBLL_GetProblemList, + + [Description("插入问题")] + SupportInteractionBLL_Insert, + + [Description("更新问题")] + SupportInteractionBLL_Update, + + [Description("获取编辑信息")] + SupportInteractionBLL_GetInfo, + + [Description("判断选中的问题是否已经关闭")] + SupportInteractionBLL_CheckProblemClosed, + + [Description("校验选中问题的处理部门是否为当前用户部门")] + SupportInteractionBLL_CheckProblemDept, + + [Description("校验选中问题的处理人是否为当前用户")] + SupportInteractionBLL_CheckProblemUser, + + [Description("获取处理记录列表")] + SupportInteractionBLL_GetSIDealList, + + [Description("获取流程设置")] + WorkFlowBLL_GetWorkFlow, + + [Description("保存流程用户")] + WorkFlowBLL_WorkFlowBLL_SaveSelectOrganization, + + [Description("获取用户的处理机构")] + SupportInteractionBLL_GetCurrentHandleOrga, + + [Description("保存处理方法")] + SupportInteractionBLL_UpdateSupportInteraction, + + [Description("解决问题")] + SupportInteractionBLL_SloveSupportInteraction, + + [Description("获取流程设置信息")] + SIParamSetBLL_Get, + + [Description("保存支持交互参数设置")] + SIParamSetBLL_SaveSIParamSet, + + [Description(" 更新支持交互参数设置")] + SIParamSetBLL_UpdateSIParamSet, + + [Description("判断是否存在未解决的问题")] + OverTimeRemindBLL_CheckCurrenUserOverTime1Remind, + + [Description("判断是否存在未解决的问题2")] + OverTimeRemindBLL_CheckCurrenUserOverTime2Remind, + + } + + + #region 发运模块 + /// + /// 发运模块 + /// + [Description("发运模块")] + public enum FrmPlaceManage + { + /// + /// 发运模块列表查询 + /// + [Description("发运模块列表查询")] + FrmPlaceBLL_GetList, + + /// + /// 贴车单记录查询 + /// + [Description("贴车单记录查询")] + FrmPlaceBLL_GetPastecardInfoWithVin, + + /// + /// 贴车单记录明细查询 + /// + [Description("贴车单记录明细查询")] + FrmPlaceBLL_GetPasteDetails, + + /// + /// 实现校准功能 + /// + [Description(" 实现校准功能")] + FrmPlaceBLL_UpdateFisOrder, + + /// + /// 获取贴车单当天的总条数 + /// + [Description(" 获取贴车单当天的总条数")] + FrmPlaceBLL_GetPastecardNo, + + + /// + /// 获取发车信息 + /// + [Description(" 获取发车信息")] + FrmPlaceBLL_GetPastecardIndex, + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddPasteCard, + + + /// + /// 更新贴车单信息 + /// + [Description(" 更新贴车单信息")] + FrmPlaceBLL_UpdatePastecardIndex, + + + + /// + /// 获取下护板扫描表其他条码号 + /// + [Description(" 获取下护板扫描表其他条码号")] + FrmPlaceBLL_GetOhterCode, + + /// + /// 获取配置表中的规则类型值 + /// + [Description(" 获取配置表中的规则类型值")] + FrmPlaceBLL_GetRule, + + /// + /// 根据条码标识查询零件信息 + /// + [Description(" 根据条码标识查询零件信息")] + FrmPlaceBLL_GetSparepartsinfo, + + + /// + /// 判断条码是否重复 + /// + [Description(" 判断条码是否重复")] + FrmPlaceBLL_ExistBarcode, + + + /// + /// 打印条码 + /// + [Description(" 打印条码")] + FrmPlaceBLL_WriteFile, + + + + /// + /// 更新贴车单补打印时间 + /// + [Description(" 更新贴车单补打印时间")] + FrmPlaceBLL_UpdataBarcodeDate, + + + /// + /// 插入LOG + /// + [Description(" 插入LOG")] + FrmPlaceBLL_InsertLog, + + + /// + /// 获取扫取条形码是否存在 + /// + [Description(" 获取扫取条形码是否存在")] + FrmPlaceBLL_GetExitsCode, + + + /// + /// 查询是否为成品 + /// + [Description(" 查询是否为成品")] + FrmPlaceBLL_GetExitsStatus, + + + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddNewPasteCard, + + + /// + /// 获取工作中心 + /// + [Description(" 获取工作中心")] + FrmPlaceBLL_GetWORKCENTERCODE, + + + /// + /// 获取 DASPASTECARDINDEX表数据 + /// + [Description(" 获取 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_GetDaspssteCarIndexByPlanName, + + + /// + /// 插入 DASPASTECARDINDEX表数据 + /// + [Description(" 插入 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_InsertDaspssteCarIndexByPlanName, + + + /// + /// GetPastecardDeatis + /// + [Description(" GetPastecardDeatis")] + FrmPlaceBLL_GetPastecardDeatis, + + + + /// + /// 根据贴车单ID获取详细 + /// + [Description(" 根据贴车单ID获取详细")] + FrmPlaceBLL_GetPascardDetailsByPid, + + + /// + /// 修改补打时间 + /// + [Description(" 修改补打时间")] + FrmPlaceBLL_UpdatePasteCardPasteCardDate2Value, + + [Description("通过产品条码获取产品")] + FrmPlaceBLL_GetProductForSend, + + + [Description("通过总成条码获取产品")] + FrmPlaceBLL_GetProductByAssembleCode, + FrmPlaceBLL_GetTimeOutSet, + + } + #endregion 发运模块 + + #region 库存盘点 + /// + /// 库存盘点 + /// + [Description("库存盘点")] + public enum StocktakingManage + { + /// + /// 库存盘点查询汇总页面 + /// + [Description("库存盘点查询汇总页面")] + StocktakingBLL_GetList, + + /// + /// 添加盘点信息 + /// + [Description("添加盘点信息")] + StocktakingBLL_Insert, + + /// + /// 获取每日最新的计划单号 + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_GetPlanNoByDate, + + + + + + /// + /// 删除子表的数据根据PLANID + /// + [Description("添加盘点信息")] + StocktakingBLL_SubDelete, + + /// + /// 删除父表数据根据ID + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_Delete, + + /// + /// 添加盘点信息 + /// + [Description("插入详细信息(单表)")] + StocktakingBLL_SubInsert, + + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PID")] + StocktakingBLL_GetModel, + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PLANID")] + StocktakingBLL_GetSubModel, + + + + /// + /// 获取子页面详细列表 + /// + [Description("获取子页面详细列表")] + StocktakingBLL_GetSubList, + + + /// + /// 修改盘点信息页面 + /// + [Description("修改盘点信息页面")] + StocktakingBLL_Update, + + + /// + /// 获取盘点详细信息页面 + /// + [Description("获取盘点详细信息页面")] + StocktakingBLL_GetPanDetail, + + /// + /// 导出 + /// + [Description("导出")] + StocktakingBLL_GetExportData, + + + /// + /// 盘点信息对比结果 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_GetPanResultDetail, + + + /// + /// 盘点对比处理 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_detailCompareResult, + + + /// + /// 获取物料号 + /// + [Description("获取物料号")] + StocktakingBLL_GetMaterialList, + + /// + /// 删除 + /// + [Description("删除")] + StocktakingBLL_EditDelete, + + + + } + + #endregion 库存盘点 + + + #region 投料管理枚举 + /// + /// 投料管理枚举 + /// + [Description("投料管理枚举")] + public enum FeedInManage + { + #region 表皮查询 + /// + /// 表皮查询 + /// + [Description("表皮查询")] + EpidermisBLL_GetList, + + [Description("中控已完成")] + EpidermisBLL_UseComplete, + + /// + /// 表皮批次号修改 + /// + [Description("表皮批次号修改")] + EpidermisBLL_UpdateMaterial, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + EpidermisBLL_Get, + + /// + /// 表皮数据导出 + /// + [Description("表皮数据导出")] + EpidermisBLL_GetExportData, + + /// + /// 表皮投料信息获取 + /// + [Description("表皮投料信息获取")] + EpidermisBLL_GetProductInfectionList, + + #endregion + + #region 注塑投料记录 + + /// + /// 注塑投料记录查询 + /// + [Description("注塑投料记录查询")] + InjectionRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + InjectionRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + InjectionRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + InjectionRecorderBLL_Get, + /// + /// 注塑投料记录删除 + /// + [Description("注塑投料记录删除")] + InjectionRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + InjectionRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + InjectionRecorderBLL_GetProduceShiftList, + #endregion + + #region 搪塑投料记录 + + /// + /// 搪塑投料记录查询 + /// + [Description("搪塑投料记录查询")] + SlushRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + SlushRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + SlushRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + SlushRecorderBLL_Get, + /// + /// 搪塑投料记录删除 + /// + [Description("搪塑投料记录删除")] + SlushRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + SlushRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + SlushRecorderBLL_GetProduceShiftList, + #endregion + + #region 浇注投料记录 + + /// + /// 浇注投料记录查询 + /// + [Description("浇注投料记录查询")] + PouringRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + PouringRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + PouringRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + PouringRecorderBLL_Get, + /// + /// 浇注投料记录删除 + /// + [Description("浇注投料记录删除")] + PouringRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + PouringRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + PouringRecorderBLL_GetProduceShiftList, + + [Description("获取浇注投料记录")] + MainBLL_GetProductInfectionList, + + [Description("修改零件投料关联表批次号")] + MainBLL_UpdateMaterial, + #endregion + } + #endregion + + #region 生产管理枚举 + /// + /// 生产管理枚举 + /// + [Description("生产管理枚举")] + public enum ProduceManage + { + #region 生产记录维护 + /// + /// 生产记录维护查询列表 + /// + [Description("生产记录维护查询列表")] + ProducePlanBLL_GetList, + + /// + /// 统计 + /// + [Description("统计")] + ProducePlanBLL_GetTotal, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + ProducePlanBLL_Get, + + /// + /// 生产记录新建 + /// + [Description("生产记录新建")] + ProducePlanBLL_Insert, + + /// + /// 生产记录修改 + /// + [Description("生产记录修改")] + ProducePlanBLL_Update, + + /// + /// 生产记录完成 + /// + [Description("生产记录完成")] + ProducePlanBLL_ProductOver, + + /// + /// 生产记录删除 + /// + [Description("生产记录删除")] + ProducePlanBLL_Delete, + #endregion + + #region 不合格品记录查询 + /// + /// 不合格品记录查询列表 + /// + [Description("不合格品记录查询列表")] + UnQualityBLL_GetList, + + /// + /// 不合格品记录数据导出 + /// + [Description("不合格品记录数据导出")] + UnQualityBLL_GetExportData, + #endregion + } + #endregion + + #region 产品追溯 + /// + /// 产品追溯 + /// + [Description("产品追溯")] + public enum ProductPetrospect + { + #region 产品档案 + /// + /// 产品档案查询 + /// + [Description("产品档案查询")] + ProductArchivesBLL_GetProductParameter, + /// + /// 产品档案导出 + /// + [Description("产品档案导出")] + ProductArchivesBLL_GetExportData, + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + ProductArchivesBLL_GetMainInfo, + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + ProductArchivesBLL_GetMainOperationInfo, + #endregion + } + #endregion + + #region 报警管理枚举 + /// + /// 报警管理枚举 + /// + [Description("报警管理枚举")] + public enum WarnManage + { + #region 设备报警记录查询 + /// + /// 设备报警记录查询列表 + /// + [Description("不合格品记录查询列表")] + EquipMentAlarmBLL_GetList, + + /// + /// 设备报警记录数据导出 + /// + [Description("不合格品记录数据导出")] + EquipMentAlarmBLL_GetExportData, + #endregion + + #region 自动报警维护 + + #region 报警信息维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInfoList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInfoGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInfoInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInfoUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInfoDelete, + #endregion + + #region 报警类别维护 + + /// + /// 报警信息Page列表 + /// + [Description("报警信息Page列表")] + WarnManageBLL_GetAllWarnTypeList, + + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnTypeList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnTypeGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnTypeInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnTypeUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnTypeDelete, + #endregion + + #region 报警统治人员维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInformerList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInformerGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInformerInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInformerUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInformerDelete, + #endregion + + /// + /// 报警信息关闭 + /// + [Description("报警信息关闭")] + WarnManageBLL_WarnIsDone, + + /// + /// 报警信息发送 + /// + [Description("报警信息发送")] + WarnManageBLL_WarnIsSend, + + /// + /// 报警信息发送页面加载 + /// + [Description("报警信息发送页面加载")] + WarnManageBLL_GetWarnInformerListForSend, + + /// + /// 报警信息详情列表加载 + /// + [Description("报警信息详情列表加载")] + WarnManageBLL_GetWarnDetailList, + #endregion + + #region 设备停机记录 + /// + /// 设备停机记录查询 + /// + [Description("设备停机记录查询")] + EquipMentMaintainSearchBLL_GetList, + /// + /// 设备停机记录导出 + /// + [Description("设备停机记录导出")] + EquipMentMaintainSearchBLL_GetExportData, + #endregion + } + #endregion + + #region 视频播放枚举 + /// + /// 视频播放枚举 + /// + [Description("视频播放枚举")] + public enum VideoInfoEnum + { + #region 视频播放记录查询 + /// + /// 视频播放记录查询列表 + /// + [Description("视频播放记录查询列表")] + VideoInfoBLL_GetDataPageList, + + #endregion + + } + #endregion + + #region 在制品监控枚举 + /// + /// 在制品监控枚举 + /// + [Description("在制品监控枚举")] + public enum WIPManage + { + #region 低储报警信息 + /// + /// 低储报警信息查询 + /// + [Description("低储报警信息查询")] + StorageAlarmBLL_GetList, + /// + /// 低储报警信息导出 + /// + [Description("低储报警信息导出")] + StorageAlarmBLL_GetExportData, + #endregion + + #region 滞留品查询 + /// + /// 滞留品信息查询 + /// + [Description("滞留品信息查询")] + DetentionBLL_GetList, + /// + /// 滞留品信息导出 + /// + [Description("滞留品信息导出")] + DetentionBLL_GetExportData, + #endregion + + #region 在制品库存 + /// + /// 在制品库存 + /// + [Description("在制品库存")] + WIPInventoryBLL_GetList, + /// + /// 在制品入库信息工序列表 + /// + [Description("在制品入库信息工序列表")] + WIPInventoryBLL_GetProcessSetList, + /// + /// 在制品入库信息零件列表 + /// + [Description("在制品入库信息零件列表")] + WIPInventoryBLL_GetProductSetList, + /// + /// 在制品入库信息 + /// + [Description("在制品入库信息")] + WIPInRecorderBLL_GetList, + /// + /// 在制品出库信息 + /// + [Description("在制品出库信息")] + WIPOutRecorderBLL_GetList, + /// + /// 在制品库存导出列表 + /// + [Description("在制品库存导出列表")] + WIPInventoryBLL_GetExportData, + /// + /// 在制品入库信息导出列表 + /// + [Description("在制品入库信息导出列表")] + WIPInRecorderBLL_GetExportData, + /// + /// 在制品出库信息导出列表 + /// + [Description("在制品出库信息导出列表")] + WIPOutRecorderBLL_GetExportData, + #endregion + } + #endregion + + #region 基础信息方法枚举 + + /// + /// 基础信息方法枚举 + /// + [Description("基础信息方法枚举")] + public enum B9BasicService + { + #region 查找注塑投料记录 + /// + /// 查询注塑投料记录 + /// + [Description("查询注塑投料记录")] + RawMaterialRecordBLL_Get, + /// + /// 新增注塑投料记录 + /// + [Description("新增注塑投料记录")] + RawMaterialRecordBLL_Insert, + /// + /// 修改注塑投料记录 + /// + [Description("修改注塑投料记录")] + RawMaterialRecordBLL_Update, + /// + /// 删除注塑投料记录 + /// + [Description("删除注塑投料记录")] + RawMaterialRecordBLL_Delete, + /// + /// 查询注塑投料记录 + /// + [Description("查询注塑投料记录")] + RawMaterialRecordBLL_GetList, + + #endregion + + #region 查找注塑投料 + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_Get, + /// + /// 新增注塑投料 + /// + [Description("新增注塑投料")] + RawMaterialBLL_Insert, + /// + /// 修改注塑投料 + /// + [Description("修改注塑投料")] + RawMaterialBLL_Update, + /// + /// 删除注塑投料 + /// + [Description("删除注塑投料")] + RawMaterialBLL_Delete, + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_GetList, + + /// + /// 查询注塑投料 + /// + [Description("查询注塑投料")] + RawMaterialBLL_GetListTo, + #endregion + + #region 缺陷信息 + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetList, + /// + /// 缺陷信息查询列表 + /// + [Description("缺陷信息查询列表")] + DefectDictBLL_GetAllList, + /// + /// 获取缺陷信息 + /// + [Description("获取缺陷信息")] + DefectDictBLL_Get, + /// + /// 缺陷信息插入 + /// + [Description("缺陷信息插入")] + DefectDictBLL_Insert, + /// + /// 缺陷信息更新 + /// + [Description("缺陷信息更新")] + DefectDictBLL_Update, + /// + /// 缺陷信息删除 + /// + [Description("缺陷信息删除")] + DefectDictBLL_Delete, + #endregion + + #region 物料号信息 + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetList, + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetAllList, + /// + /// 获取物料号信息 + /// + [Description("获取物料号信息")] + MaterielBLL_Get, + /// + /// 物料号信息插入 + /// + [Description("物料号信息插入")] + MaterielBLL_Insert, + /// + /// 物料号信息更新 + /// + [Description("物料号信息更新")] + MaterielBLL_Update, + /// + /// 物料号信息删除 + /// + [Description("物料号信息删除")] + MaterielBLL_Delete, + #endregion + + #region 设备信息 + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetMachineInfoList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllList, + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllListAndModels, + + /// + /// 获取设备信息 + /// + [Description("获取设备信息")] + MachineInfoBLL_Get, + /// + /// 设备信息插入 + /// + [Description("设备信息插入")] + MachineInfoBLL_Insert, + /// + /// 设备信息更新 + /// + [Description("设备信息更新")] + MachineInfoBLL_Update, + /// + /// 设备信息删除 + /// + [Description("设备信息删除")] + MachineInfoBLL_Delete, + + #endregion + + #region 设备模具信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MachineInfoModelBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MachineInfoModelBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MachineInfoModelBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MachineInfoModelBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MachineInfoModelBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MachineInfoModelBLL_GetImportData, + + #endregion + + #region 班次信息 + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetProductShiftList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetAllList, + + /// + /// 获取班次信息 + /// + [Description("获取班次信息")] + ProduceShiftBLL_Get, + /// + /// 班次信息插入 + /// + [Description("班次信息插入")] + ProduceShiftBLL_Insert, + /// + /// 班次信息更新 + /// + [Description("班次信息更新")] + ProduceShiftBLL_Update, + /// + /// 班次信息删除 + /// + [Description("班次信息删除")] + ProduceShiftBLL_Delete, + /// + /// 校验班次时间在数据库中是否存在 + /// + [Description("校验班次时间在数据库中是否存在")] + ProduceShiftBLL_ExistsProduceShiftTime, + #endregion + + #region 零件条码标识 + + /// + /// 零件条码标识信息查询列表 + /// + [Description("零件条码标识信息查询列表")] + ProductCodeIdentityBLL_GetList, + /// + /// 获取零件条码标识信息 + /// + [Description("获取零件条码标识信息")] + ProductCodeIdentityBLL_Get, + /// + /// 零件条码标识信息插入 + /// + [Description("零件条码标识信息插入")] + ProductCodeIdentityBLL_Insert, + /// + /// 零件条码标识信息更新 + /// + [Description("零件条码标识信息更新")] + ProductCodeIdentityBLL_Update, + /// + /// 零件条码标识信息删除 + /// + [Description("零件条码标识信息删除")] + ProductCodeIdentityBLL_Delete, + + #endregion + + #region 操作员信息 + + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetList, + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetAllList, + /// + /// 获取操作员信息 + /// + [Description("获取操作员信息")] + OperatorInfoBLL_Get, + /// + /// 操作员信息插入 + /// + [Description("操作员信息插入")] + OperatorInfoBLL_Insert, + /// + /// 操作员信息更新 + /// + [Description("操作员信息更新")] + OperatorInfoBLL_Update, + /// + /// 操作员信息删除 + /// + [Description("操作员信息删除")] + OperatorInfoBLL_Delete, + /// + /// daochu + /// + [Description("daochu")] + OperatorInfoBLL_GetExportData, + + /// + /// 获取所有人员 + /// + [Description("获取所有人员")] + OperatorInfoBLL_GetAllUserList, + #endregion + + #region 工序名称信息 + + /// + /// 工序名称信息查询列表 + /// + [Description("工序名称信息查询列表")] + ProcessInfoBLL_GetList, + /// + /// 获取工序名称信息 + /// + [Description("获取工序名称信息")] + ProcessInfoBLL_Get, + /// + /// 工序名称信息插入 + /// + [Description("工序名称信息插入")] + ProcessInfoBLL_Insert, + /// + /// 工序名称信息更新 + /// + [Description("工序名称信息更新")] + ProcessInfoBLL_Update, + /// + /// 工序名称信息删除 + /// + [Description("工序名称信息删除")] + ProcessInfoBLL_Delete, + + #endregion + + #region 工序设置信息 + + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetList, + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetAllList, + /// + /// 获取工序设置信息 + /// + [Description("获取工序设置信息")] + ProcessSetBLL_Get, + /// + /// 工序设置信息保存 + /// + [Description("工序设置信息保存")] + ProcessSetBLL_Save, + /// + /// 工序设置信息插入 + /// + [Description("工序设置信息插入")] + ProcessSetBLL_Insert, + /// + /// 工序设置信息更新 + /// + [Description("工序设置信息更新")] + ProcessSetBLL_Update, + /// + /// 工序设置信息删除 + /// + [Description("工序设置信息删除")] + ProcessSetBLL_Delete, + /// + /// 根据工序ID获取工序信息 + /// + [Description("根据工序ID获取工序信息")] + ProcessSetBLL_GetProcessInfo, + /// + /// 根据工序ID获取工序信息集合 + /// + [Description("根据工序ID获取工序信息集合")] + ProcessSetBLL_GetProcessInfoList, + /// + /// 根据零件类别获取应添加的工序顺序 + /// + [Description("根据零件类别获取应添加的工序顺序")] + ProcessSetBLL_GetProcessIndex, + + #endregion + + #region 工序先决条件 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetList, + + [Description("信息列表")] + ProcessRuleBLL_GetListForSet, + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetAllList, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProcessRuleBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProcessRuleBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProcessRuleBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProcessRuleBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProcessRuleBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProcessRuleBLL_GetImportData, + + #endregion + + + #region 加工参数标准值设定信息 + + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetList, + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetAllList, + /// + /// 获取加工参数标准值设定信息 + /// + [Description("获取加工参数标准值设定信息")] + ProcessParameterBLL_Get, + /// + /// 加工参数标准值设定信息插入 + /// + [Description("加工参数标准值设定信息插入")] + ProcessParameterBLL_Insert, + /// + /// 加工参数标准值设定信息更新 + /// + [Description("加工参数标准值设定信息更新")] + ProcessParameterBLL_Update, + /// + /// 加工参数标准值设定信息删除 + /// + [Description("加工参数标准值设定信息删除")] + ProcessParameterBLL_Delete, + /// + /// 获取设备编号下拉列表数据 + /// + [Description("获取设备编号下拉列表数据")] + ProcessParameterBLL_GetMachineInfoList, + /// 根据设备ID获取对应设备的工序类别 + /// + [Description("获取设备信息(获取设备对应的工序类别)")] + ProcessParameterBLL_GetMachineInfo, + + #endregion + + #region 投料配置规则信息 + + /// + /// 投料配置规则信息查询列表 + /// + [Description("投料配置规则信息查询列表")] + ProductMderuleBLL_GetList, + /// + /// 获取投料配置规则信息 + /// + [Description("获取投料配置规则信息")] + ProductMderuleBLL_Get, + /// + /// 投料配置规则信息插入 + /// + [Description("投料配置规则信息插入")] + ProductMderuleBLL_Insert, + /// + /// 投料配置规则信息更新 + /// + [Description("投料配置规则信息更新")] + ProductMderuleBLL_Update, + /// + /// 投料配置规则信息删除 + /// + [Description("投料配置规则信息删除")] + ProductMderuleBLL_Delete, + + #endregion + + #region 物料架类型信息 + + /// + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetList, + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetAllList, + /// + /// 获取物料架类型信息 + /// + [Description("获取物料架类型信息")] + MaterialShelfTypeBLL_Get, + /// + /// 物料架类型信息插入 + /// + [Description("物料架类型信息插入")] + MaterialShelfTypeBLL_Insert, + /// + /// 物料架类型信息更新 + /// + [Description("物料架类型信息更新")] + MaterialShelfTypeBLL_Update, + /// + /// 物料架类型信息删除 + /// + [Description("物料架类型信息删除")] + MaterialShelfTypeBLL_Delete, + + #endregion + + #region 投料搪塑注塑投料 + + /// + /// 投料信息查询列表 + /// + [Description("投料信息查询列表")] + InjectionRecorderBLL_GetList, + /// + /// 获取投料信息 + /// + [Description("获取投料信息")] + InjectionRecorderBLL_Get, + /// + /// 投料信息插入 + /// + [Description("投料信息插入")] + InjectionRecorderBLL_Insert, + /// + /// 投料信息更新 + /// + [Description("投料信息更新")] + InjectionRecorderBLL_Update, + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_Delete, + + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_DeleteSingle, + #endregion + + #region 加工参数配置信息 + + /// + /// 获取加工参数配置信息 + /// + [Description("获取加工参数配置信息")] + ParameterConfigBLL_GetList, + + #endregion + + #region 零件类别 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBasicBLL_GetList, + + [Description("信息列表")] + ProductBasicBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_GetByCode, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBasicBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBasicBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBasicBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBasicBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBasicBLL_GetImportData, + + #endregion + + #region 零件条码 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetAllList, + + + /// + /// 信息和属性列表 + /// + [Description("信息和属性列表")] + ProductBLL_GetListAndAttribute, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_GetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_Insert, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertInjection, + + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertForBundle, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertEpidermis, + [Description("插入信息")] + ProductBLL_InsertListEpidermis, + + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBLL_Update, + + /// + /// 更新信息状态 + /// + [Description("更新信息状态")] + ProductBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_Delete, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_ScarpProduct, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_DeleteSingle, + + /// + /// 判断名称是否存在 + /// + [Description("判断名称是否存在")] + ProductBLL_ExistsProduct, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBLL_GetImportData, + + /// + /// 更新零件状态信息(工控机) + /// + [Description("更新零件状态信息(工控机)")] + ProductBLL_MendUpdate, + + /// + /// 获取零件信息(工控机) + /// + [Description("获取零件信息(工控机)")] + ProductBLL_GetProductInfo, + + [Description("更新产品信息")] + ProductBLL_ModifyProductCode, + /// + /// 获取原始产品信息 + /// + ProductBLL_GetOrginProduct, + #endregion + + #region 零件属性 + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetList, + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetAllList, + /// + /// 获取零件属性信息 + /// + [Description("获取零件属性信息")] + ProductAttributeBLL_Get, + /// + /// 零件属性信息插入 + /// + [Description("零件属性信息插入")] + ProductAttributeBLL_Insert, + /// + /// 零件属性信息更新 + /// + [Description("零件属性信息更新")] + ProductAttributeBLL_Update, + /// + /// 零件属性信息删除 + /// + [Description("零件属性信息删除")] + ProductAttributeBLL_Delete, + #endregion + + #region 设备停机维护 + + /// + /// 信息列表 + /// + [Description("信息列表")] + EquipmentMaintainBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + EquipmentMaintainBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + EquipmentMaintainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + EquipmentMaintainBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + EquipmentMaintainBLL_Delete, + + /// + /// 删除信息并更新设备表 + /// + [Description("删除信息并更新设备表")] + EquipmentMaintainBLL_DeleteEquipmentMaintainAndUpdateMachine, + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + EquipmentMaintainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + EquipmentMaintainBLL_GetImportData, + + #endregion + + + #region 投料与零件关联 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductInjectionBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductInjectionBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductInjectionBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductInjectionBLL_Update, + + /// + /// 判断投料信息是否存在 + /// + [Description("判断投料信息是否存在")] + ProductInjectionBLL_ExistsInjection, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductInjectionBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductInjectionBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductInjectionBLL_GetImportData, + + #endregion + + #region 产品批次追溯 + + /// + /// 获取列表(产品批次追溯) + /// + [Description("获取列表(产品批次追溯)")] + ProductInjectionBLL_GetProductInjectionList, + + /// + /// 导出信息列表(产品批次追溯) + /// + [Description("导出信息列表(产品批次追溯)")] + ProductInjectionBLL_GetExportDataForPI, + #endregion + + #region 产品加工追溯 + + /// + /// 设备加工操作 + /// + [Description("设备加工操作")] + MainOperationBLL_MachineOperation, + + /// + /// 获取列表(产品加工追溯) + /// + [Description("获取列表(产品加工追溯)")] + MainOperationBLL_GetMainOperationReviewList, + + /// + /// 导出信息列表(产品加工追溯) + /// + [Description("导出信息列表(产品加工追溯)")] + MainOperationBLL_GetExportDataForMOR, + #endregion + + #region 加工记录信息 + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetListWithParameter, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetAllList, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetList, + + /// + /// 工控机获取加工记录信息 + /// + [Description("工控机获取加工记录信息")] + MainOperationBLL_GetOperationList, + + /// + /// 工控机获取加工记录信息Q5新增 + /// + [Description("工控机获取加工记录信息Q5新增")] + MainOperationBLL_GetOperationListNew, + + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_Operation, + + /// + /// 获取打印条码 + /// + [Description("获取打印条码")] + MainOperationBLL_GetPrintCode, + + /// + /// 加工 + /// + [Description("加工并发送指令")] + MainOperationBLL_OperationForReturn, + + /// + /// 获取指令 + /// + [Description("获取指令")] + MainOperationBLL_GetSendOrder, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPassProcess, + + /// + /// 产品返修 + /// + [Description("产品返修")] + MainOperationBLL_MendProudct, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPunchingPassProcess, + + /// + /// 撤销 + /// + [Description("撤销")] + MainOperationBLL_SetRecovery, + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_SaveAndSendOrder, + + + /// + /// 获取加工记录信息统计 + /// + [Description("获取加工记录信息统计")] + MainOperationBLL_GetListForstatistic, + + /// + /// 获取加工记录信息(web) + /// + [Description("获取加工记录信息(web)")] + MainOperationBLL_GetListWithParameterForWeb, + + + + + + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetListWithParameterForWebTitle, + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetParameterForWebTitle, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupBy, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupByStauts, + + MainOperationBLL_GetListForstatisticWithColor, + + MainOperationBLL_GetListForstatisticWithColor2, + + + #endregion + + #region 文件复制 + /// + /// 文件复制 + /// + [Description("文件复制")] + FileCopyRecordBLL_GetBarcode, + + + + #endregion + + #region 模具模腔 + + [Description("获取模具号配置")] + MoldConfigBLL_GetList, + + [Description("获取模具号配置")] + MoldConfigBLL_Get, + + [Description("获取模具号和模架号最大值")] + MoldConfigBLL_GetMaxMold, + + [Description("删除模具号配置")] + MoldConfigBLL_DeleteSingle, + + [Description("修改模具号配置")] + MoldConfigBLL_Update, + + [Description("新增模具号配置")] + MoldConfigBLL_Insert, + + [Description("新增模具号配置")] + MoldConfigBLL_UpdateNextUsed, + + [Description("删除模具号配置")] + MoldConfigBLL_Delete, + + [Description("获取模腔号配置")] + MoldSetBLL_GetList, + + [Description("更新模腔号配置")] + MoldSetBLL_SaveMoldSet, + + [Description("获取浇注配置")] + CastCounterBLL_Get, + + [Description("更新浇注配置")] + CastCounterBLL_Update, + + + MaterialCodeBLL_GetMaterialCode, + ProductBasicBLL_GetProductBasicList, + FactoryBLL_GetFactoryList, + ProductInfoBLL_GetImportData, + ProductInfoBLL_GetExportData, + ProductInfoBLL_Delete, + ProductInfoBLL_Update, + ProductInfoBLL_Insert, + ProductInfoBLL_Get, + ProductInfoBLL_GetList, + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + /// + /// 获取当前工作班次 + /// + ProduceShiftBLL_GetWorkingShift, + ProductBLL_GetProductByPart, + ProductBLL_CreateAssy, + + + #endregion + + } + #endregion + + /// + /// 工控机方法枚举 + /// + [Description("工控机方法枚举")] + public enum B9IPCService + { + #region 时间验证 + + CHECKTIMEBLL_Insert, + CHECKTIMEBLL_Update, + [Description("记录查询列表")] + CHECKTIMEBLL_GetList, + [Description("记录查询列表")] + CHECKTIMEBLL_Get, + + #endregion + + #region 条码补打记录 + [Description("补打记录查询列表")] + BarCodeReplacementBLL_Get, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetRecord, + + [Description("补打记录查询列表")] + BarCodeReplacementBLL_GetList, + + [Description("补打记录新增")] + BarCodeReplacementBLL_Insert, + + [Description("查找316总成信息")] + BZDRecorderBLL_Get316Record, + #endregion + + + #region 配置 + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + LocSwitchHelperBLL_GetPBomItemCodes, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + MaterialBomConfigBLL_GetAutoInputBarCode, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetList, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_Get, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_GetMaterial, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDConfigBLL_Insert, + + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAllList, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAppConfigValue, + /// + /// 获取物料号 + /// + [Description("获取物料号")] + BZDConfigBLL_GetMaterialCode, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDRecorderBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDRecorderBLL_Insert, + /// + /// BZD条码配置插入 + /// + [Description("创建BZD条码并记录")] + BZDRecorderBLL_CreateBZDCode, + /// + /// 查询BZD记录 + /// + [Description("查询BZD记录")] + BZDRecorderBLL_GetRecord, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_getMaxSeq, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetAllList, + /// + /// 获取配置细信息 + /// + [Description("配置细信息")] + PROCESSPARAMETERBLL_Get, + /// + /// 配置细信息插入 + /// + [Description("配置细信息插入")] + PROCESSPARAMETERBLL_Insert, + /// + /// 配置细信息更新 + /// + [Description("配置细信息更新")] + PROCESSPARAMETERBLL_Update, + /// + /// 配置细信息删除 + /// + [Description("配置细信息删除")] + PROCESSPARAMETERBLL_Delete, + /// + /// 报废走势图 + /// + [Description("报废走势图")] + PROCESSPARAMETERBLL_GetMainList, + #endregion + + #region 查询配置 + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_Get, + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_GetMATERIAL, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_GetBom, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + ScanIPConfigBLL_Get, + + /// + /// 修改配置信息 + /// + [Description("修改配置信息")] + ScanIPConfigBLL_Update, + + #endregion + + #region SPC监控 + + /// + /// 获得监控信息 + /// + [Description("获得监控信息")] + SPCControlBLL_GetData, + + #endregion + + #region 贴车单 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + SendPlanInfoBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + SendPlanInfoBLL_Insert, + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_InsertAndUpdateMain, + + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_UpdateMain, + + /// + /// 更新信息 + /// + [Description("更新信息")] + SendPlanInfoBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + SendPlanInfoBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + SendPlanInfoBLL_GetImportData, + + /// + /// 贴车单查询 + /// + [Description("贴车单查询")] + SendPlanRecordBLL_GetList, + /// + /// 贴车单查询 + /// + [Description("贴车单详细查询")] + SendPlanRecordBLL_GetItem, + + /// + /// 贴车单查询导出列表 + /// + [Description("贴车单查询导出列表")] + SendPlanRecordBLL_GetExportData, + + #endregion + + #region 发车统计分析 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetSendStatisticsList, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetSendStatisticsExportData, + + #endregion + + #region 加工本体 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetByCondition, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetMaterialSetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_Update, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainBLL_GetImportData, + /// + /// 创建本体信息 + /// + MainBLL_CreateMain, + + #endregion + + #region 主体与零件关系 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetAllList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetListWithProduct, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainProductBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainProductBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainProductBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainProductBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainProductBLL_GetImportData, + + #endregion + + #region 返修记录 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetExportDatas, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetLists, + + MendRecorderBLL_GetMenderReasonList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MendRecorderBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MendRecorderBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MendRecorderBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MendRecorderBLL_GetImportData, + + + /// + /// 获取返修信息(工控机) + /// + [Description("获取返修信息")] + MendRecorderBLL_GetMendRecorderInfo, + + /// + /// 返修登记(工控机) + /// + [Description("返修登记")] + MendRecorderBLL_RegisterMendRecorder, + + /// + /// 返修完成(工控机) + /// + [Description("返修完成")] + MendRecorderBLL_MendRecorderFinish, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_InsertMendRecorder, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_UpdateMendRecorder, + + MendRecorderBLL_CheckProductCode, + + MendRecorderBLL_InsertMendRecordItem, + + /// + /// 获取返修统计信息 + /// + [Description("获取返修统计信息")] + MendRecorderBLL_GetMendRecorderStatistics, + + /// + /// 导出返修统计信息 + /// + [Description("导出返修统计信息")] + MendRecorderBLL_ExportMendRecorderStatistics, + + + #endregion + + #region FIS M100生产信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + FISInfoBLL_GetList, + + #endregion + + #region 出库 + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + OutWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + OutWarehouseBLL_GetMainInfo, + + /// + /// 出库操作(本体) + /// + [Description("出库操作(本体)")] + OutWarehouseBLL_MainOutWarehouse, + + /// + /// 出库操作(零件) + /// + [Description("出库操作(零件)")] + OutWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 入库 + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + InWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + InWarehouseBLL_GetMainInfo, + + /// + /// 入库操作(本体) + /// + [Description("出库操作(本体)")] + InWarehouseBLL_MainOutWarehouse, + + /// + /// 入库操作(零件) + /// + [Description("出库操作(零件)")] + InWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 获取产品信息 + + ProductBLL_GetByCondition, + /// + /// 获取信息PID PRODUCTCODE + /// public Product Get(Product model) + /// + ProductBLL_Get, + + /// + /// 插入产品信息 + /// + ProductBLL_Insert, + + #endregion + + #region 查验 + + InjectionCheckBLL_Insert, + + InjectionCheckBLL_GetList, + + InjectionCheckBLL_Delete, + + #endregion + + #region 缺陷类型 + + DefectTypeBLL_GetDefectType, + MendRecorderBLL_GetListForstatistic, + + #endregion + + #region 获取打印模板路径 + + PrintModelCopyBLL_GetPrintModelCopyList, + + #endregion + + #region 获取采集点信息 + + DAIBLL_GetList, + DAIBLL_GetSignalDAI, + DAICacheBLL_GetWorklocCache, + /// + /// 采集点输入 + /// + DAI_Input, + /// + /// 工位放行 + /// + DAI_LetPass, + /// + /// 撤销回滚 + /// + DAI_Rollback, + DAI_RollbackWithOrder, + DAI_Reset, + + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + #endregion + + #region 生产计划 + + WorkOrderBLL_GetOrderInCell, + WorkOrderBLL_GetOrderCountInCell, + /// + /// 获取加工记录数 + /// + ProcessRecordBLL_GetCount, + WorkOrderBLL_Get, + WorkOrderBLL_GetPlanLabel, + WorkOrderBLL_SuspendOrder, + WorkOrderBLL_CancelSuspend, + WorkOrderBLL_DeleteOrder, + WorkOrderBLL_TakeBack, + WorkOrderBLL_ResetOrder, + WorkOrderBLL_GetPlanLabelBindProdut, + WorkOrderBLL_GetDayPlanCount, + /// + /// 插入产品信息 + /// + ProcessRecordBLL_Insert, + + /// + /// 抽检 + /// + ProductCheckBLL_GetList, + ProductCheckBLL_Delete, + + /// + /// + /// + MainCodeChangeBLL_GetList, + MainCodeChangeBLL_Insert, + MainCodeChangeBLL_Generate, + + + + + + #endregion + + } +} diff --git a/.svn/pristine/a1/a172478b10cae85a78b16c97c6a2355b6efa2130.svn-base b/.svn/pristine/a1/a172478b10cae85a78b16c97c6a2355b6efa2130.svn-base new file mode 100644 index 0000000..601442e Binary files /dev/null and b/.svn/pristine/a1/a172478b10cae85a78b16c97c6a2355b6efa2130.svn-base differ diff --git a/.svn/pristine/a1/a17c2a39adbaab8f476c47530d57a663b4c5b123.svn-base b/.svn/pristine/a1/a17c2a39adbaab8f476c47530d57a663b4c5b123.svn-base new file mode 100644 index 0000000..500cc02 --- /dev/null +++ b/.svn/pristine/a1/a17c2a39adbaab8f476c47530d57a663b4c5b123.svn-base @@ -0,0 +1,486 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class SlushMoldingPrintForOldForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.lblLock = new System.Windows.Forms.LinkLabel(); + this.label12 = new System.Windows.Forms.Label(); + this.comMouldNumber = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.cbM = new System.Windows.Forms.CheckBox(); + this.cBoxModelCode = new System.Windows.Forms.ComboBox(); + this.comMachineCode = new System.Windows.Forms.ComboBox(); + this.dtpDate = new DateTimePickerA(); + this.label14 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.comPosition = new System.Windows.Forms.ComboBox(); + this.comColor = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.ErrorMessage = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MAINCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.COLOR = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PRODUCTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tsbSave = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.lblLock); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.comMouldNumber); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.cbM); + this.groupBox1.Controls.Add(this.cBoxModelCode); + this.groupBox1.Controls.Add(this.comMachineCode); + this.groupBox1.Controls.Add(this.dtpDate); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.comPosition); + this.groupBox1.Controls.Add(this.comColor); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(720, 2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(499, 368); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "信息录入"; + // + // lblLock + // + this.lblLock.AutoSize = true; + this.lblLock.Font = new System.Drawing.Font("新宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblLock.Location = new System.Drawing.Point(68, 64); + this.lblLock.Name = "lblLock"; + this.lblLock.Size = new System.Drawing.Size(89, 19); + this.lblLock.TabIndex = 20; + this.lblLock.TabStop = true; + this.lblLock.Tag = "0"; + this.lblLock.Text = "锁定工位"; + this.lblLock.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblLock_LinkClicked); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(68, 221); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(21, 25); + this.label12.TabIndex = 18; + this.label12.Text = "*"; + // + // comMouldNumber + // + this.comMouldNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMouldNumber.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMouldNumber.FormattingEnabled = true; + this.comMouldNumber.Location = new System.Drawing.Point(166, 216); + this.comMouldNumber.Name = "comMouldNumber"; + this.comMouldNumber.Size = new System.Drawing.Size(247, 32); + this.comMouldNumber.TabIndex = 16; + this.comMouldNumber.SelectedIndexChanged += new System.EventHandler(this.comMouldNumber_SelectedIndexChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label13.Location = new System.Drawing.Point(88, 221); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(76, 16); + this.label13.TabIndex = 17; + this.label13.Text = "模架号:"; + // + // cbM + // + this.cbM.AutoSize = true; + this.cbM.Checked = true; + this.cbM.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbM.Enabled = false; + this.cbM.Location = new System.Drawing.Point(427, 44); + this.cbM.Name = "cbM"; + this.cbM.Size = new System.Drawing.Size(69, 29); + this.cbM.TabIndex = 15; + this.cbM.Text = "扣料"; + this.cbM.UseVisualStyleBackColor = true; + // + // cBoxModelCode + // + this.cBoxModelCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBoxModelCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cBoxModelCode.FormattingEnabled = true; + this.cBoxModelCode.Location = new System.Drawing.Point(166, 273); + this.cBoxModelCode.Name = "cBoxModelCode"; + this.cBoxModelCode.Size = new System.Drawing.Size(247, 32); + this.cBoxModelCode.TabIndex = 12; + // + // comMachineCode + // + this.comMachineCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMachineCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMachineCode.FormattingEnabled = true; + this.comMachineCode.Items.AddRange(new object[] { + "否", + "是"}); + this.comMachineCode.Location = new System.Drawing.Point(166, 41); + this.comMachineCode.Name = "comMachineCode"; + this.comMachineCode.Size = new System.Drawing.Size(247, 32); + this.comMachineCode.TabIndex = 11; + // + // dtpDate + // + this.dtpDate.CustomFormat = " "; + this.dtpDate.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtpDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.FormatString = "yyyy年MM月dd日"; + this.dtpDate.Location = new System.Drawing.Point(166, 329); + this.dtpDate.Name = "dtpDate"; + this.dtpDate.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.Size = new System.Drawing.Size(249, 35); + this.dtpDate.TabIndex = 10; + this.dtpDate.ValueX = null; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.Color.Red; + this.label14.Location = new System.Drawing.Point(99, 163); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(21, 25); + this.label14.TabIndex = 9; + this.label14.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(68, 270); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(21, 25); + this.label10.TabIndex = 9; + this.label10.Text = "*"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(45, 42); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(21, 25); + this.label6.TabIndex = 9; + this.label6.Text = "*"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Red; + this.label4.Location = new System.Drawing.Point(78, 105); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(21, 25); + this.label4.TabIndex = 9; + this.label4.Text = "*"; + // + // comPosition + // + this.comPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comPosition.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comPosition.FormattingEnabled = true; + this.comPosition.Items.AddRange(new object[] { + "A+B"}); + this.comPosition.Location = new System.Drawing.Point(166, 160); + this.comPosition.Name = "comPosition"; + this.comPosition.Size = new System.Drawing.Size(247, 32); + this.comPosition.TabIndex = 5; + // + // comColor + // + this.comColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comColor.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comColor.FormattingEnabled = true; + this.comColor.Location = new System.Drawing.Point(166, 99); + this.comColor.Name = "comColor"; + this.comColor.Size = new System.Drawing.Size(247, 32); + this.comColor.TabIndex = 3; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label11.Location = new System.Drawing.Point(118, 163); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(42, 16); + this.label11.TabIndex = 6; + this.label11.Text = "腔:"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label15.Location = new System.Drawing.Point(70, 333); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(93, 16); + this.label15.TabIndex = 6; + this.label15.Text = "加工时间:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(86, 278); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(76, 16); + this.label9.TabIndex = 6; + this.label9.Text = "模腔号:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label5.Location = new System.Drawing.Point(70, 44); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(93, 16); + this.label5.TabIndex = 6; + this.label5.Text = "搪塑设备:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(101, 107); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(59, 16); + this.label3.TabIndex = 6; + this.label3.Text = "颜色:"; + // + // ErrorMessage + // + this.ErrorMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ErrorMessage.AutoSize = true; + this.ErrorMessage.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ErrorMessage.ForeColor = System.Drawing.Color.Red; + this.ErrorMessage.Location = new System.Drawing.Point(741, 649); + this.ErrorMessage.Name = "ErrorMessage"; + this.ErrorMessage.Size = new System.Drawing.Size(0, 25); + this.ErrorMessage.TabIndex = 19; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.DGView); + this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox2.Location = new System.Drawing.Point(2, 2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(714, 794); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "打印记录"; + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MAINCODE, + this.COLOR, + this.PRODUCTCODE, + this.CREATETIME}); + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(3, 29); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(708, 762); + this.DGView.TabIndex = 39; + // + // MAINCODE + // + this.MAINCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MAINCODE.DataPropertyName = "MAINCODE"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F); + this.MAINCODE.DefaultCellStyle = dataGridViewCellStyle2; + this.MAINCODE.FillWeight = 48.95314F; + this.MAINCODE.HeaderText = "条码信息"; + this.MAINCODE.Name = "MAINCODE"; + this.MAINCODE.ReadOnly = true; + this.MAINCODE.Width = 240; + // + // COLOR + // + this.COLOR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.COLOR.DataPropertyName = "MATERIAL_NAME"; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F); + this.COLOR.DefaultCellStyle = dataGridViewCellStyle3; + this.COLOR.FillWeight = 99.90437F; + this.COLOR.HeaderText = "表皮颜色"; + this.COLOR.Name = "COLOR"; + this.COLOR.ReadOnly = true; + this.COLOR.Width = 150; + // + // PRODUCTCODE + // + this.PRODUCTCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.PRODUCTCODE.DataPropertyName = "PRODUCTCODE"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PRODUCTCODE.DefaultCellStyle = dataGridViewCellStyle4; + this.PRODUCTCODE.FillWeight = 48.95314F; + this.PRODUCTCODE.HeaderText = "零件号"; + this.PRODUCTCODE.Name = "PRODUCTCODE"; + this.PRODUCTCODE.ReadOnly = true; + this.PRODUCTCODE.Width = 240; + // + // CREATETIME + // + this.CREATETIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.CREATETIME.DataPropertyName = "CREATETIME"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle5.Format = "f"; + dataGridViewCellStyle5.NullValue = null; + this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle5; + this.CREATETIME.FillWeight = 48.95314F; + this.CREATETIME.HeaderText = "操作时间"; + this.CREATETIME.Name = "CREATETIME"; + this.CREATETIME.ReadOnly = true; + this.CREATETIME.Width = 250; + // + // tsbSave + // + this.tsbSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.Location = new System.Drawing.Point(886, 442); + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(232, 137); + this.tsbSave.TabIndex = 35; + this.tsbSave.Text = "打印"; + this.tsbSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.tsbSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.tsbSave.UseVisualStyleBackColor = true; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // SlushMoldingPrintForOldForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1223, 798); + this.Controls.Add(this.tsbSave); + this.Controls.Add(this.ErrorMessage); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "SlushMoldingPrintForOldForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "单色搪塑机条码打印"; + this.Load += new System.EventHandler(this.Form_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox comPosition; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comColor; + private System.Windows.Forms.Label label15; + private DateTimePickerA dtpDate; + private System.Windows.Forms.ComboBox cBoxModelCode; + private System.Windows.Forms.ComboBox comMachineCode; + private System.Windows.Forms.CheckBox cbM; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox comMouldNumber; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label ErrorMessage; + private System.Windows.Forms.LinkLabel lblLock; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.Button tsbSave; + private System.Windows.Forms.DataGridViewTextBoxColumn MAINCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn COLOR; + private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME; + } +} \ No newline at end of file diff --git a/.svn/pristine/a1/a17dcde1c9bd9162e99fefad3f841150dff8b493.svn-base b/.svn/pristine/a1/a17dcde1c9bd9162e99fefad3f841150dff8b493.svn-base new file mode 100644 index 0000000..ce9c0a5 --- /dev/null +++ b/.svn/pristine/a1/a17dcde1c9bd9162e99fefad3f841150dff8b493.svn-base @@ -0,0 +1,301 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + Library + Properties + QMAPP.FJC.Entity + QMAPP.FJC.Entity + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\APPMESReport\QMAPP.MESReport.Web\Bin\QMAPP.MESReport.Entity.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + True + Resource.resx + + + + + + + + + + + + + + + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + PublicResXFileCodeGenerator + Resource.Designer.cs + Designer + + + + + + \ No newline at end of file diff --git a/.svn/pristine/a1/a192f8fdf64f26fc86c4f52d1dff70c3ee2bfec7.svn-base b/.svn/pristine/a1/a192f8fdf64f26fc86c4f52d1dff70c3ee2bfec7.svn-base new file mode 100644 index 0000000..0187222 --- /dev/null +++ b/.svn/pristine/a1/a192f8fdf64f26fc86c4f52d1dff70c3ee2bfec7.svn-base @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.Basic; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; + +namespace QMAPP.FJC.DAL.Basic +{ + /// + /// 模块名称:配置表 + /// 作 者:张松男 + /// 编写日期:2021年05月14日 + /// + public class MaterialBomConfigDAL + { + + /// + /// 查询自动输入的输入条码 + /// + /// + /// + /// + public List GetAutoInputBarCode(string pBomCode, string pWorkLoc) + { + List parameter = new List(); + List list = new List(); + var data = new DataTable(); + string sqlScript = $@"select Product_Code from T_MD_MaterialBomConfig_QD + where material_code is not null and material_code in + (select material_code from T_MD_PBOM_ITEM where pbom_code = '{pBomCode}' + INTERSECT + select material_code from T_MD_MaterialBomConfig_QD where workloc = '{pWorkLoc}' ) and workloc ='{pWorkLoc}'"; + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //DataSet dataSet = SqlHelper.ExecuteDataset(Config.maindbConnectionString, CommandType.Text, sqlScript); + data = session.GetTable(sqlScript, parameter.ToArray()); + } + if (data.Rows.Count > 0) + { + foreach (DataRow dataRow in data.Rows) + { + string pbom = dataRow["Product_Code"].ToString(); + if (!list.Contains(pbom) && !string.IsNullOrEmpty(pbom)) + { + list.Add(pbom); + } + } + } + return list; + } + + /// + /// 获取全部规则 + /// + /// + public List Get(MaterialBomConfig MaterialBomConfig) + { + try + { + string sql = $"SELECT PID,Material_Code,Workloc,Product_Code,Material_Name FROM [T_MD_ScanIPConfig_QD] where Workloc = '{MaterialBomConfig.Workloc}' and Material_Code = '{MaterialBomConfig.Material_Code}' "; + List parameters = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + } +} diff --git a/.svn/pristine/a2/a221ad6f9475d38f5f4a91236b6ef2f77f1c09eb.svn-base b/.svn/pristine/a2/a221ad6f9475d38f5f4a91236b6ef2f77f1c09eb.svn-base new file mode 100644 index 0000000..3adfbc3 --- /dev/null +++ b/.svn/pristine/a2/a221ad6f9475d38f5f4a91236b6ef2f77f1c09eb.svn-base @@ -0,0 +1,82 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.svn/pristine/a3/a3485893375935c9f6f9bbdedb7b7ed84db7f22b.svn-base b/.svn/pristine/a3/a3485893375935c9f6f9bbdedb7b7ed84db7f22b.svn-base new file mode 100644 index 0000000..5dbd6e7 --- /dev/null +++ b/.svn/pristine/a3/a3485893375935c9f6f9bbdedb7b7ed84db7f22b.svn-base @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.MD.Entity; +using QMFrameWork.Data; +using System.Data; +using QMAPP.DAL; +using QMAPP.Entity; +using QMAPP.Entity.Sys; +using QMAPP.FJC.Entity.BZD; +using QMAPP.FJC.DAL.BZD; + +namespace QMAPP.MD.DAL +{ + /// + /// 模块名称:条码补打记录 + /// 作 者:张松男 + /// 编写日期:2021年05月21日 + /// + public class BarCodeReplacementDAL : BaseDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public BarCodeReplacement Get(BarCodeReplacement info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + public BarCodeReplacement GetRecord(BarCodeReplacement info) + { + try + { + List parameters = new List(); + var sql = "SELECT * FROM T_AW_BarCode_Replacement WHERE 1=1 "; + if (string.IsNullOrEmpty(info.PID) == false) + { + sql += " AND PID = @PID"; + parameters.Add(new DataParameter("PID", info.PID)); + } + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + + var list = session.GetList(sql, parameters.ToArray()).ToList(); + if (list.Count > 0) + return list[0]; + else + return null; + } + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(BarCodeReplacement condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql2(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "CreateTime DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + // 对应多种数据库 + //string sqlChange = this.ChangeSqlByDB(sql, session); + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql2(BarCodeReplacement condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + if (condition.BeginTime == Convert.ToDateTime("0001/1/1 00:00:00")) + condition.BeginTime = DateTime.Now.AddDays(-5); + if (condition.EndTime == Convert.ToDateTime("0001/1/1 00:00:00")) + condition.EndTime = DateTime.Now; + //构成查询语句 + sqlBuilder.Append("select PID,Type,ProductCode,CreateTime,CreateUser "); + sqlBuilder.Append("FROM T_AW_BarCode_Replacement "); + + //查询条件 + + //查询条件 + if (string.IsNullOrEmpty(condition.ProductCode) == false) + { + whereBuilder.Append(" AND ProductCode like @ProductCode "); + parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = "%" + condition.ProductCode + "%" }); + } + + //查询条件 + if (string.IsNullOrEmpty(condition.Type) == false) + { + whereBuilder.Append(" AND Type like @Type "); + parameters.Add(new DataParameter { ParameterName = "Type", DataType = DbType.String, Value = "%" + condition.Type + "%" }); + } + + whereBuilder.Append($" AND CreateTime >= '{condition.BeginTime}' and CreateTime <= '{condition.EndTime}' "); + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(BarCodeReplacement info) + { + int count = 0; + List parameters = new List(); + try + { + var sql = $" insert into T_AW_BarCode_Replacement (PID,Type,ProductCode,CreateTime,CreateUser)" + + $"VALUES('{info.PID}','{info.Type}','{info.ProductCode}','{DateTime.Now}','{info.CreateUser}')"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.ExecuteSql(sql, parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/a4/a4d018aadad1d49224c5e1a3e88eb014885cffa3.svn-base b/.svn/pristine/a4/a4d018aadad1d49224c5e1a3e88eb014885cffa3.svn-base new file mode 100644 index 0000000..0232bf5 --- /dev/null +++ b/.svn/pristine/a4/a4d018aadad1d49224c5e1a3e88eb014885cffa3.svn-base @@ -0,0 +1,175 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.FJC.Web.Models.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.MD.Web.Models; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.FJC.Web.Models.Bucket; +using QMAPP.MD.Entity.Bucket; +using QMAPP.FJC.Web.Models; + +namespace QMAPP.FJC.Web.Controllers +{ + public class AppConfigController : QController + { + #region 获取信息 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callback) + { + AppConfigModel seachModel = new AppConfigModel(); + if (callback == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.url = "/AppConfig/GetList"; + return View("AppConfigList", seachModel); + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + AppConfigModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + AppConfig condition = null; + DataResult pageResult = new DataResult(); + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + + pageResult = wcfAgent.InvokeServiceFunction>("AppConfigBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + return Content(result.GetJsonSource()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 编辑 + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult Edit() + { + AppConfigModel model = new AppConfigModel(); + string ID = Request.Params["ID"]; + AppConfig Entity = new AppConfig(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + if (string.IsNullOrEmpty(ID) == false) + { + //修改获取原数据 + Entity.ID = ID; + var appConfig = wcfAgent.InvokeServiceFunction("AppConfigBLL_GetPID", Entity); + if (appConfig == null) + { + SetMessage("未查询到结果"); + return View("AppConfigEdit", model); + } + model = CopyToModel(appConfig); + } + return View("AppConfigEdit", model); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 保存 + /// + /// + /// 处理结果 + [HttpPost] + [HandleException] + [ValidateInput(false)] + public ActionResult Save(AppConfigModel saveModel) + { + AppConfig Entity = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + Entity = CopyToModel(saveModel); + if (string.IsNullOrEmpty(Entity.ID) == true) + { + //新增 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.AppConfigBLL_Insert.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("AppConfigEdit", saveModel); + } + } + else + { + //修改 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.AppConfigBLL_Update.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("AppConfigEdit", saveModel); + } + } + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/a4/a4f4b4f5819dc680d031b5bb05c574efef94d5d7.svn-base b/.svn/pristine/a4/a4f4b4f5819dc680d031b5bb05c574efef94d5d7.svn-base new file mode 100644 index 0000000..17bb419 --- /dev/null +++ b/.svn/pristine/a4/a4f4b4f5819dc680d031b5bb05c574efef94d5d7.svn-base @@ -0,0 +1,462 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/a5/a530b5a13543ac9f49c4db9dd6ff1593e2efb6c5.svn-base b/.svn/pristine/a5/a530b5a13543ac9f49c4db9dd6ff1593e2efb6c5.svn-base new file mode 100644 index 0000000..0950b94 --- /dev/null +++ b/.svn/pristine/a5/a530b5a13543ac9f49c4db9dd6ff1593e2efb6c5.svn-base @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.FJC.Entity.QT; +using QMAPP.MD.DAL; + +namespace QMAPP.FJC.TRACING.DataValidators +{ + /// + /// 根据BOM校验零件 + /// + public class BOMValidator:IDataValidator + { + public ValidateResult Validate(DAObject data,DAIValidation validOption) + { + if (string.Equals(data.DAI.DA_MODE, "3")) // 如果采集项为自适应项 则不验证BOM + { + return new ValidateResult(true, ""); + } + //提取采集数据中的物料号信息 + var materials = (from da in data.WorkLocState.DataCache + where !string.IsNullOrWhiteSpace(da.MATERIAL_CODE) + && !string.Equals(da.DA_MODE, "2") //过滤掉可省略的采集点 + && !string.Equals(da.DA_CODE, data.DAI.DA_CODE) //过滤掉当前输入的采集点 + && (!(string.Equals(da.MATERIAL_CODE, data.WorkLocState.CurrentState.MATERIAL_CODE) + && da.ISPROCESSCODE == "1")) //过滤掉当前输入的采集点 + select da.MATERIAL_CODE).ToList(); + PbomDAL dal = new PbomDAL(); + + materials.Add(data.MaterialCode+""); + var bomlocates = dal.LocateBom(materials.Distinct().ToArray()); //匹配物料BOM + if (data != null && data.OrderPlan != null) + { + bomlocates = bomlocates.Where(p => p.BOMCode == data.OrderPlan.PBOM_CODE).ToList(); + } + if (bomlocates.Count > 0) //如果存在匹配的BOM + { + ProcessRouteDAL prdal = new ProcessRouteDAL(); + foreach (var bom in bomlocates) + { + var route = prdal.LocateRoute(bom.BOMCode, data.WorkLocState.WORKCELL_CODE); //验证工艺路线与BOM的匹配关系 + if (route != null) + { + return new ValidateResult(true, ""); + } + } + return new ValidateResult(false,"此物料不应在当前工序使用!"); + } + else + { + return new ValidateResult(false,"当前产品配置不需要刚才扫描的零件,请确认产品BOM配置信息!"); + } + } + } +} diff --git a/.svn/pristine/a5/a53546e61ab458899203c0d231c56424d12ff8c4.svn-base b/.svn/pristine/a5/a53546e61ab458899203c0d231c56424d12ff8c4.svn-base new file mode 100644 index 0000000..76a74d8 --- /dev/null +++ b/.svn/pristine/a5/a53546e61ab458899203c0d231c56424d12ff8c4.svn-base @@ -0,0 +1,459 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Common; +using QMAPP.FJC.DAL.CompleteStatistics; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Common.Constants; +using QMAPP.FJC.Entity.CompleteStatistics; +using QMFrameWork.Data; +using QMFrameWork.Log; +using System.IO; + +namespace QMAPP.FJC.BLL.CompleteStatistics +{ + public class CompleteStatisticsBLL : BaseBLL + { + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(CompleteStatisticsEntity condition, DataPage page) + { + DataResult result = new DataResult() {IsSuccess = true}; + + try { + result.Result = new CompleteStatisticsDAL().GetList(condition, page); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo {ErrorInfo = ex, Tag = ex.StackTrace, Info = "获取统计信息列表错误!"}); + result.IsSuccess = false; + result.Msg = "获取统计信息列表错误!"; + } + return result; + } + + public int GenericCompleteStatistics(DateTime starTime, DateTime endTime) + { + try { + //插入需要的数据 + int count = new CompleteStatisticsDAL().GenericCompleteStatistics(starTime, endTime); + string isAutoExport = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_AUTO_EXPORT); //完工统计标识:1 自动,0 手动。 + if (isAutoExport.Equals("1")) { + //this.ExportCompleteStatistics(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") }); + this.ExportCompleteStatisticsSQL(new CompleteStatisticsEntity { SENDTIME = starTime.ToString("yyyy/MM/dd HH:mm:ss"), EENDTIME = endTime.ToString("yyyy/MM/dd HH:mm:ss") }); + + } + return count; + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "生成统计信息列表错误!" }); + throw; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 全部数据 + public List GetAllList(CompleteStatisticsEntity condition) + { + try { + return new CompleteStatisticsDAL().GetList(condition); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo {ErrorInfo = ex, Tag = ex.StackTrace, Info = "获取统计信息列表错误!"}); + throw; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public CompleteStatisticsEntity Get(CompleteStatisticsEntity model) + { + try { + return new CompleteStatisticsDAL().Get(model); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "取得统计信息异常!" }); + throw; + } + } + + /// + /// 获取信息 + /// + /// 主键 + /// 信息 + public CompleteStatisticsEntity GetById(string pid) + { + return this.Get(new CompleteStatisticsEntity { PID = pid }); + } + + /// + /// 获取完工统计周期 + /// + /// 周期(秒) + public int GetRunPeriod() + { + string value = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_PERIOD); + int period; + if (!Int32.TryParse(value, out period)) { + period = 24*60*60; + } + return period; + } + + /// + /// 获取上次统计时间 + /// + /// 周期(分) + public DateTime GetLastRunTime() + { + string value = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_LSTTIME); + DateTime lastRunTime; + if (!DateTime.TryParse(value, out lastRunTime)) { + lastRunTime = DateTime.Now; + } + return lastRunTime; + } + + /// + /// 获取信息 + /// + /// codeType + /// 信息 + public string GetSysConfigValue(string codeType) + { + try + { + SystemConfig systemConfig = new CompleteStatisticsDAL().GetSystemConfig(codeType); + return systemConfig.CODEVALUE; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "取得统计信息异常!" }); + throw; + } + } + + /// + /// 插入信息 + /// + /// 信息 + /// 插入行数 + public DataResult Insert(CompleteStatisticsEntity model) + { + DataResult result = new DataResult + { + IsSuccess = true, + Msg = Resource.MsgSuccess + }; + try { + //基本信息 + model.PID = Guid.NewGuid().ToString(); + model.CREATEUSER = this.LoginUser.UserID; + model.CREATETIME = DateTime.Now; + model.UPDATEUSER = this.LoginUser.UserID; + model.DELFLAG = "0"; + //if (this.ExistsMain(model)) { + // return -1; + //} + result.Result = new CompleteStatisticsDAL().Insert(model); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo {ErrorInfo = ex, Tag = ex.StackTrace, Info = "插入统计信息异常!"}); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + } + return result; + } + + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult Update(CompleteStatisticsEntity model) + { + DataResult result = new DataResult + { + IsSuccess = true, + Msg = Resource.MsgSuccess + }; + try { + model.UPDATEUSER = this.LoginUser.UserID; + result.Result = new CompleteStatisticsDAL().Update(model); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo {ErrorInfo = ex, Tag = ex.StackTrace, Info = "更新统计信息异常!"}); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + } + + return result; + } + + /// + /// 判断统计信息是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + protected bool ExistsMain(CompleteStatisticsEntity model) + { + try { + return new CompleteStatisticsDAL().ExistCompleteStatistics(model); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "判断统计信息是否存在异常!" }); + throw; + } + } + + public DataResult ExportExcelData(CompleteStatisticsEntity model) + { + DataResult result = new DataResult + { + IsSuccess = true, + Msg = Resource.MsgSuccess + }; + try + { + result.Result = new CompleteStatisticsDAL().ExportExcelData(model); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "完工数量统计Excel导出异常!" }); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + } + return result; + } + + /// + /// 插入信息 + /// + /// 信息 + /// 插入行数 + public DataResult ExportCompleteStatistics(CompleteStatisticsEntity model) + { + IDataSession session = null; + DataResult result = new DataResult + { + IsSuccess = true, + Msg = "导出成功!" + }; + try { + session = AppDataFactory.CreateMainSession(); + session.OpenTs(); + + string localfilePath = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_FILEPATH); //保存路径 + string remotefilePath = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_PATH); //远程路径 + + List completeStatisticsEntities = new CompleteStatisticsDAL().GetExportData(model, session); + //用生产线分组,然后用每条生产线生成一个txt文件 + var lineEntitiesGroup = completeStatisticsEntities.GroupBy(x => x.PRODUCTLINE); + if (lineEntitiesGroup.Count() > 0) + { + foreach (var lineName in lineEntitiesGroup) + { + //var lineName = lineEntity.PRODUCTLINE; + var lineEntities = completeStatisticsEntities.Where(x => x.PRODUCTLINE == lineName.Key); + //本地路径 + if (!string.IsNullOrEmpty(localfilePath)) + { + + if (Directory.Exists(localfilePath) == false) + { + Directory.CreateDirectory(localfilePath); + } + + if (lineEntities.Count() > 0) + { + var orderName = lineEntities.ToList()[0].ORDERNO.Substring(0, 4); + var lineTxt = lineEntities.Select(t => t.ToString()).ToList(); + string txtName = string.Format("{0}bkfl{1}{3}{2}.txt", "", DateTime.Now.ToString("yyyyMMddHHmmss"), model.ENDTIME.ToString("MMdd"), orderName); + + new FileHelper(string.Format("{0}{1}", localfilePath, txtName)).InsertLines(lineTxt); + } + + } + //远程路径 + if (!string.IsNullOrEmpty(remotefilePath)) + { + string user = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_USER); + string domain = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_DOMAIN); + string password = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_PWD); + //模拟远程登陆 + using (var id = new IdentityScope(user, domain, password)) + { + //new FileHelper(string.Format("{0}{1}", remotefilePath, filename)).InsertLines(lines); + if (lineEntities.Count() > 0) + { + var orderName = lineEntities.ToList()[0].ORDERNO.Substring(0, 4); + var lineTxt = lineEntities.Select(t => t.ToString()).ToList(); + string txtName = string.Format("{0}bkfl{1}{3}{2}.txt", "", DateTime.Now.ToString("yyyyMMddHHmmss"), model.ENDTIME.ToString("MMdd"), orderName); + + new FileHelper(string.Format("{0}{1}", remotefilePath, txtName)).InsertLines(lineTxt); + } + + } + } + } + } + + session.CommitTs(); + } + catch (Exception ex) { + LogManager.LogHelper.Error(new LogInfo {ErrorInfo = ex, Tag = ex.StackTrace, Info = "导出统计信息异常!"}); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + if (session != null) { + session.RollbackTs(); + } + } + return result; + } + + //public DataResult ExportCompleteStatistics(CompleteStatisticsEntity model) + //{ + // IDataSession session = null; + // DataResult result = new DataResult + // { + // IsSuccess = true, + // Msg = "导出成功!" + // }; + // try + // { + // session = AppDataFactory.CreateMainSession(); + // session.OpenTs(); + // List completeStatisticsEntities = new CompleteStatisticsDAL().GetExportData(model, session); + // var lines = completeStatisticsEntities.Select(t => t.ToString()).ToList(); + // string localfilePath = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_FILEPATH); + // string filename = string.Format("{0}bkfl{1}{3}{2}.txt", "", DateTime.Now.ToString("yyyyMMddHHmmss"), model.ENDTIME.ToString("MMdd"), this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_ORDER)); + // if (!string.IsNullOrEmpty(localfilePath)) //本地路径 + // { + // new FileHelper(string.Format("{0}{1}", localfilePath, filename)).InsertLines(lines); + // } + + // string remotefilePath = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_PATH); + // if (!string.IsNullOrEmpty(remotefilePath)) //远程路径 + // { + // string user = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_USER); + // string domain = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_DOMAIN); + // string password = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_REMOTE_PWD); + // //模拟远程登陆 + // using (var id = new IdentityScope(user, domain, password)) + // { + // new FileHelper(string.Format("{0}{1}", remotefilePath, filename)).InsertLines(lines); + // } + // } + // session.CommitTs(); + // } + // catch (Exception ex) + // { + // LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "导出统计信息异常!" }); + // result.IsSuccess = false; + // result.Msg = Resource.SystemException; + // if (session != null) + // { + // session.RollbackTs(); + // } + // } + // return result; + //} + + //执行task服务 + + /// + /// 导出EE SQL + /// + /// 信息 + /// 插入行数 + public DataResult ExportCompleteStatisticsSQL(CompleteStatisticsEntity model) + { + IDataSession session = null; + DataResult result = new DataResult + { + IsSuccess = true, + Msg = "导出成功!" + }; + try + { + session = AppDataFactory.CreateMainSession(); + session.OpenTs(); + + //if (string.IsNullOrEmpty(model.PIDList) == false) + //{ + // model.PIDList = "'" + model.PIDList.Replace(":", "','") + "'"; + //} + //导出数据信息 + List completeStatisticsEntities = new CompleteStatisticsDAL().GetExportData(model, session); + var sqls = completeStatisticsEntities.Select(t => t.ToSQL()).ToList(); + var lines = new List(); + System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(); + conn.ConnectionString = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_EE_CONNSTR); + conn.Open(); + foreach (var sql in sqls) + { + try + { + System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(sql, conn); + cmd.ExecuteNonQuery(); + lines.Add(string.Format("--{0}--{1}", sql, "Success")); + } + catch (Exception e) + { + lines.Add(string.Format("--{0}--{1}\r\n/*{2}*/", sql, "Failed", e.Message)); + } + } + conn.Close(); + string localfilePath = this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_FILEPATH); + string filename = string.Format("{0}bkfl{1}{3}{2}.sql", "", DateTime.Now.ToString("yyyyMMddHHmmss"), model.ENDTIME.ToString("MMdd"), this.GetSysConfigValue(CompleteStatisticsConstants.COMP_STATIS_ORDER)); + if (!string.IsNullOrEmpty(localfilePath)) //本地路径 + { + new FileHelper(string.Format("{0}{1}", localfilePath, filename)).InsertLines(lines); + } + session.CommitTs(); + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo { ErrorInfo = ex, Tag = ex.StackTrace, Info = "导出统计信息异常!" }); + result.IsSuccess = false; + result.Msg = Resource.SystemException; + if (session != null) + { + session.RollbackTs(); + } + } + return result; + } + + public void GenericMFG() + { + + //int interval = 30; + //DateTime lastRunTime = GetLastRunTime(); + int interval = 24; + DateTime lastRunTime = GetLastRunTime(); + DateTime judgementTime = lastRunTime.AddHours(interval); + if (judgementTime < DateTime.Now) + { + QMFrameWork.Log.LogManager.LogHelper.Info( + new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "完工数量统计开始" }); + GenericCompleteStatistics(lastRunTime, judgementTime); + QMFrameWork.Log.LogManager.LogHelper.Info( + new QMFrameWork.Log.LogInfo { ClientIP = "localhost", UserName = "admin", Info = "完工数量统计结束" }); + } + } + } +} diff --git a/.svn/pristine/a5/a57c9f6dce9248c3a34d713d0d97097131383efa.svn-base b/.svn/pristine/a5/a57c9f6dce9248c3a34d713d0d97097131383efa.svn-base new file mode 100644 index 0000000..a6c0879 --- /dev/null +++ b/.svn/pristine/a5/a57c9f6dce9248c3a34d713d0d97097131383efa.svn-base @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMFrameWork.Data.Attributes; +using QMAPP.Entity; +using System.ComponentModel; +using System.Data; + +namespace QMAPP.FJC.Entity.BZD +{ + /// + /// 模块名称:条码补打记录 + /// 作 者:张松男 + /// 编写日期:2021年05月21日 + /// + [DBTable(TableName = "T_AW_BarCode_Replacement")] + public class BarCodeReplacement : BaseEntity + { + /// + /// 主键 + /// + [DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] + public string PID { get; set; } + + /// + /// 类型 + /// + [DBColumn(ColumnName = "Type", DataType = DbType.String)] + public string Type { get; set; } + + /// + /// 条码号 + /// + [DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] + public string ProductCode { get; set; } + + /// + /// 新增时间 + /// + [DBColumn(ColumnName = "CreateTime", DataType = DbType.DateTime)] + public DateTime CreateTime { get; set; } + public DateTime BeginTime { get; set; } + public DateTime EndTime { get; set; } + + /// + /// 新增用户 + /// + [DBColumn(ColumnName = "CreateUser", DataType = DbType.String)] + public string CreateUser { get; set; } + + } + + +} diff --git a/.svn/pristine/a5/a581e0be52ae4d2b8944f397ad164e404c65c6d6.svn-base b/.svn/pristine/a5/a581e0be52ae4d2b8944f397ad164e404c65c6d6.svn-base new file mode 100644 index 0000000..3fe87a0 Binary files /dev/null and b/.svn/pristine/a5/a581e0be52ae4d2b8944f397ad164e404c65c6d6.svn-base differ diff --git a/.svn/pristine/a5/a58f0b0256c9b9ae1cd9480aaed6084115133fb8.svn-base b/.svn/pristine/a5/a58f0b0256c9b9ae1cd9480aaed6084115133fb8.svn-base new file mode 100644 index 0000000..2a9d920 Binary files /dev/null and b/.svn/pristine/a5/a58f0b0256c9b9ae1cd9480aaed6084115133fb8.svn-base differ diff --git a/.svn/pristine/a5/a5f3e4a82390240b5cb98be80fb69364e9f286f9.svn-base b/.svn/pristine/a5/a5f3e4a82390240b5cb98be80fb69364e9f286f9.svn-base new file mode 100644 index 0000000..0b088d1 --- /dev/null +++ b/.svn/pristine/a5/a5f3e4a82390240b5cb98be80fb69364e9f286f9.svn-base @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace Stone.WinModuleTransWare +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/.svn/pristine/a6/a66d497ea3a67d3af779be250b0a14784b6e31c8.svn-base b/.svn/pristine/a6/a66d497ea3a67d3af779be250b0a14784b6e31c8.svn-base new file mode 100644 index 0000000..2f46dc0 --- /dev/null +++ b/.svn/pristine/a6/a66d497ea3a67d3af779be250b0a14784b6e31c8.svn-base @@ -0,0 +1,313 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Injection; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.MD.Entity; +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M12-1 + /// 作 用:投料记录 + /// 作 者:王庆男 + /// 编写日期:2015年06月08日 + /// + public partial class InjectionMoldingEditForm : Form + { + InjectionRecorder recorder = new InjectionRecorder();//编辑保存实体 + + /// + /// 新建 + /// + public InjectionMoldingEditForm() + { + InitializeComponent(); + + } + + /// + /// 编辑 + /// + /// + public InjectionMoldingEditForm(string pid) + { + recorder.PID = pid; + InitializeComponent(); + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + new KeyEvent().SetKeyToTxt(this); + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + //加载是否有条码列表 + + //加载注塑设备列表 + this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType_M.Injection.GetHashCode().ToString()}, false); + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + if (ClientContext.MachineInfo != null) + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE;//默认当前设备 + //加载物料列表 + this.comMaterialCode.DataSource = basicData.GetMaterielInfoList("RAW_INJECT", true); + this.comMaterialCode.DisplayMember = "MATERIAL_NAME"; + this.comMaterialCode.ValueMember = "MATERIAL_CODE"; + + //加载物料类别列表 + this.comMaterialType.DataSource = basicData.GetMaterialTypeList(new MD.Entity.MaterialClass { UpTypeCodes = "('IP_PLASTICPART','DP_PLASTICPART')" }, false); + this.comMaterialType.DisplayMember = "MATERIAL_TYPE_NAME"; + this.comMaterialType.ValueMember = "MATERIAL_TYPE_CODE"; + + //加载产品列表 + this.cbProject.DataSource = basicData.GetProjectList(false); + this.cbProject.DisplayMember = "PROJECT_NAME"; + this.cbProject.ValueMember = "PROJECT_CODE"; + #endregion + + #region 加载编辑 + //判断是否为编辑加载编辑数据 + if (string.IsNullOrEmpty(recorder.PID) == false) + { + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + recorder = agent.InvokeServiceFunction(B9BasicService.InjectionRecorderBLL_Get.ToString(), recorder); + //一定是存在的物料 + //this.comIsHadNo.SelectedIndex = 1; + //this.txtMaterialCode.Visible = false; + this.comMaterialCode.Visible = true; + //this.txtMaterialCode.Text = ""; + + this.comMaterialCode.SelectedValue = recorder.MATERIALCODE; + + //this.comMaterialType.SelectedValue = recorder.MATERIALTYPE; + this.txtMeterialWeight.Text = recorder.METERIALWEIGHT.ToString("0"); + this.comOpreator.SelectedValue = recorder.CREATEUSER.Trim(); + this.txtMaterialBatch.Text = recorder.MATERIALBATCH; + + foreach (var m in (recorder.MACHINECODDE + "").Split(',')) + { + var machinelist = comMachineCode.Items.Cast(); + var machine = machinelist.FirstOrDefault(p => p.MACHINECODDE == m); + var index = comMachineCode.Items.IndexOf(machine); + if (index >= 0) + { + this.comMachineCode.SetItemChecked(index, true); + } + } + var project_A_mtypes = (recorder.MATERIALTYPE + "").Split(';'); + if (project_A_mtypes.Length == 2) + { + foreach (var p in project_A_mtypes[0].Split(',')) + { + var projectlist = cbProject.Items.Cast(); + var project = projectlist.FirstOrDefault(o => o.PROJECT_CODE == p); + var index = cbProject.Items.IndexOf(project); + if (index >= 0) + { + this.cbProject.SetItemChecked(index, true); + } + } + + foreach (var t in project_A_mtypes[1].Split(',')) + { + var typelist = comMaterialType.Items.Cast(); + var mtype = typelist.FirstOrDefault(o => o.MATERIAL_TYPE_NAME == t); + var index = comMaterialType.Items.IndexOf(mtype); + if (index >= 0) + { + this.comMaterialType.SetItemChecked(index, true); + } + } + } + + } + #endregion + } + + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + #region 加载保存信息 + //判断是否有物料号 + + recorder.MATERIALCODE = this.comMaterialCode.SelectedValue.ToString(); + + //原材料信息 + var mateial = (this.comMaterialCode.DataSource as List).Where(m => m.MATERIAL_CODE == recorder.MATERIALCODE); + if (mateial.Count() > 0) + { + MD.Entity.Material materielInfo = mateial.First(); + recorder.MATERIALNAME = materielInfo.MATERIAL_NAME; + + } + + string projects = string.Join(",", cbProject.CheckedItems.Cast().Select(p => p.PROJECT_CODE).ToArray()); + string materialtypes = string.Join(",", comMaterialType.CheckedItems.Cast().Select(p => p.MATERIAL_TYPE_NAME).ToArray()); + recorder.MATERIALTYPE = projects + ";" + materialtypes; + //获取设备信息 + var selectmachines = this.comMachineCode.CheckedItems.Cast(); + recorder.MACHINECODDE = string.Join(",", selectmachines.Select(p => p.MACHINECODDE)); + recorder.MACHINENAME = string.Join(",", selectmachines.Select(p => p.MACHINENAME_SHORT)); + recorder.MACHINETYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); + //工序类别 + recorder.PROCESSTYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); + //投料信息 + //recorder.MATERIALTYPE = this.comMaterialType.SelectedValue.ToString(); + //重量 + recorder.METERIALWEIGHT = Convert.ToInt32(this.txtMeterialWeight.Text); + //批次 + recorder.MATERIALBATCH = this.txtMaterialBatch.Text; + recorder.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //操作人 + recorder.CREATEUSER = this.comOpreator.SelectedValue.ToString().Trim(); + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME;//班组 + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE;//班组 + #endregion + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult result;//判断是否成功 + if (string.IsNullOrEmpty(recorder.PID) == true) + { + result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Insert.ToString(), recorder); + } + else + { + result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Update.ToString(), recorder); + } + //保存成功 + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + #endregion + } + + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + + + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region 校验 + string strMessage = ""; + + + //物料号 + if (this.comMaterialCode.SelectedValue == null || this.comMaterialCode.SelectedValue == string.Empty) + { + strMessage += Resource1.MaterialCodeNullValidate + "\r\n"; + } + + //设备 + if (this.comMachineCode.CheckedItems.Count <= 0) + { + strMessage += Resource1.InjectionMachineNullValidate + "\r\n"; + } + //物料类别 + if (this.comMaterialType.CheckedItems.Count <= 0) + { + strMessage += "零件类别不能为空!" + "\r\n"; + } + //产品 + if (this.cbProject.CheckedItems.Count <= 0) + { + strMessage += "请选择产品!" + "\r\n"; + } + //重量 + if (this.txtMeterialWeight.Text == string.Empty) + { + strMessage += Resource1.NumNullValidate + "\r\n"; + } + else + { + if (SysValidate.IsInt(txtMeterialWeight.Text.Trim()) == false) + { + strMessage += Resource1.NumFormatValidate + "\r\n"; + } + } + //操作人 + if (this.comOpreator.SelectedValue == null || this.comOpreator.SelectedValue == string.Empty) + { + strMessage += Resource1.OpreatorNullValidate + "\r\n"; + } + //批次 + if (this.txtMaterialBatch.Text == string.Empty) + { + strMessage += Resource1.MaterialBatchNullValidate + "\r\n"; + } + + + + + return strMessage; + #endregion + } + + private void comMaterialCode_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.comMaterialCode.SelectedValue != null && this.comMaterialCode.SelectedValue != string.Empty) + { + this.txtMeterialWeight.Text = (this.comMaterialCode.SelectedItem as MD.Entity.Material).WEIGHT.ToString(); + } + } + + private void comMaterialType_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.comMaterialType.SelectedValue != null && this.comMaterialType.SelectedValue.Equals(EnumGeter.MATERIALTYPE.jinshuzhijia.GetHashCode().ToString())) + { + //this.comIsHadNo.SelectedIndex = 0; + //this.comIsHadNo.Enabled = false; + this.label13.Visible = false; + this.txtMaterialBatch.Visible = false; + this.label9.Text = "数量(个):"; + this.label12.Visible = false; + } + else + { + //this.comIsHadNo.Enabled = true; + this.label13.Visible = true; + this.txtMaterialBatch.Visible = true; + this.label9.Text = "重量(KG):"; + this.label12.Visible = true; + } + } + } +} diff --git a/.svn/pristine/a7/a7f2fd18777d6ed437c07e312459b9729667571c.svn-base b/.svn/pristine/a7/a7f2fd18777d6ed437c07e312459b9729667571c.svn-base new file mode 100644 index 0000000..0998e4a Binary files /dev/null and b/.svn/pristine/a7/a7f2fd18777d6ed437c07e312459b9729667571c.svn-base differ diff --git a/.svn/pristine/a8/a8f7e9e77e278c431a25e578cd3fa565c0b2fd9a.svn-base b/.svn/pristine/a8/a8f7e9e77e278c431a25e578cd3fa565c0b2fd9a.svn-base new file mode 100644 index 0000000..e8e6945 --- /dev/null +++ b/.svn/pristine/a8/a8f7e9e77e278c431a25e578cd3fa565c0b2fd9a.svn-base @@ -0,0 +1,464 @@ +namespace QMAPP.WinForm.Forms.Operation +{ + partial class MainOperationCompleteForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainOperationCompleteForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.panelSearch = new System.Windows.Forms.Panel(); + this.comMinuteEnd = new System.Windows.Forms.ComboBox(); + this.comHourEnd = new System.Windows.Forms.ComboBox(); + this.comMinuteStart = new System.Windows.Forms.ComboBox(); + this.comHourStart = new System.Windows.Forms.ComboBox(); + this.dpOpeEnd = new System.Windows.Forms.DateTimePicker(); + this.dpOpeStart = new System.Windows.Forms.DateTimePicker(); + this.label1 = new System.Windows.Forms.Label(); + this.lblOperateDate = new System.Windows.Forms.Label(); + this.lblSearchTitle = new System.Windows.Forms.Label(); + this.panelSearchTitle = new System.Windows.Forms.Panel(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSearch = new System.Windows.Forms.ToolStripButton(); + this.tbtnSearch = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.DGData = new System.Windows.Forms.DataGridView(); + this.panel3 = new System.Windows.Forms.Panel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.materialName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.materialCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.color = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panelSearch.SuspendLayout(); + this.panelSearchTitle.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGData)).BeginInit(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.SuspendLayout(); + // + // panelSearch + // + this.panelSearch.BackColor = System.Drawing.SystemColors.InactiveBorder; + this.panelSearch.Controls.Add(this.comMinuteEnd); + this.panelSearch.Controls.Add(this.comHourEnd); + this.panelSearch.Controls.Add(this.comMinuteStart); + this.panelSearch.Controls.Add(this.comHourStart); + this.panelSearch.Controls.Add(this.dpOpeEnd); + this.panelSearch.Controls.Add(this.dpOpeStart); + this.panelSearch.Controls.Add(this.label1); + this.panelSearch.Controls.Add(this.lblOperateDate); + this.panelSearch.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearch.Location = new System.Drawing.Point(0, 105); + this.panelSearch.Name = "panelSearch"; + this.panelSearch.Size = new System.Drawing.Size(964, 60); + this.panelSearch.TabIndex = 9; + // + // comMinuteEnd + // + this.comMinuteEnd.FormattingEnabled = true; + this.comMinuteEnd.Items.AddRange(new object[] { + "0", + "5", + "10", + "15", + "20", + "25", + "30", + "35", + "40", + "45", + "50", + "55"}); + this.comMinuteEnd.Location = new System.Drawing.Point(502, 16); + this.comMinuteEnd.Name = "comMinuteEnd"; + this.comMinuteEnd.Size = new System.Drawing.Size(40, 25); + this.comMinuteEnd.TabIndex = 9; + // + // comHourEnd + // + this.comHourEnd.FormattingEnabled = true; + this.comHourEnd.Items.AddRange(new object[] { + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23"}); + this.comHourEnd.Location = new System.Drawing.Point(459, 16); + this.comHourEnd.Name = "comHourEnd"; + this.comHourEnd.Size = new System.Drawing.Size(40, 25); + this.comHourEnd.TabIndex = 8; + // + // comMinuteStart + // + this.comMinuteStart.FormattingEnabled = true; + this.comMinuteStart.Items.AddRange(new object[] { + "0", + "5", + "10", + "15", + "20", + "25", + "30", + "35", + "40", + "45", + "50", + "55"}); + this.comMinuteStart.Location = new System.Drawing.Point(259, 16); + this.comMinuteStart.Name = "comMinuteStart"; + this.comMinuteStart.Size = new System.Drawing.Size(40, 25); + this.comMinuteStart.TabIndex = 7; + // + // comHourStart + // + this.comHourStart.FormattingEnabled = true; + this.comHourStart.Items.AddRange(new object[] { + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23"}); + this.comHourStart.Location = new System.Drawing.Point(216, 16); + this.comHourStart.Name = "comHourStart"; + this.comHourStart.Size = new System.Drawing.Size(40, 25); + this.comHourStart.TabIndex = 6; + // + // dpOpeEnd + // + this.dpOpeEnd.CalendarFont = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dpOpeEnd.Location = new System.Drawing.Point(334, 17); + this.dpOpeEnd.Name = "dpOpeEnd"; + this.dpOpeEnd.Size = new System.Drawing.Size(120, 23); + this.dpOpeEnd.TabIndex = 5; + // + // dpOpeStart + // + this.dpOpeStart.CalendarFont = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dpOpeStart.Location = new System.Drawing.Point(85, 17); + this.dpOpeStart.Name = "dpOpeStart"; + this.dpOpeStart.Size = new System.Drawing.Size(125, 23); + this.dpOpeStart.TabIndex = 4; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(304, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(24, 20); + this.label1.TabIndex = 0; + this.label1.Text = "至"; + // + // lblOperateDate + // + this.lblOperateDate.AutoSize = true; + this.lblOperateDate.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblOperateDate.Location = new System.Drawing.Point(15, 18); + this.lblOperateDate.Name = "lblOperateDate"; + this.lblOperateDate.Size = new System.Drawing.Size(69, 20); + this.lblOperateDate.TabIndex = 0; + this.lblOperateDate.Text = "操作时间"; + // + // lblSearchTitle + // + this.lblSearchTitle.AutoSize = true; + this.lblSearchTitle.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSearchTitle.Location = new System.Drawing.Point(15, 7); + this.lblSearchTitle.Name = "lblSearchTitle"; + this.lblSearchTitle.Size = new System.Drawing.Size(69, 20); + this.lblSearchTitle.TabIndex = 0; + this.lblSearchTitle.Text = "查询条件"; + // + // panelSearchTitle + // + this.panelSearchTitle.BackColor = System.Drawing.SystemColors.ScrollBar; + this.panelSearchTitle.Controls.Add(this.lblSearchTitle); + this.panelSearchTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearchTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearchTitle.Location = new System.Drawing.Point(0, 70); + this.panelSearchTitle.Name = "panelSearchTitle"; + this.panelSearchTitle.Size = new System.Drawing.Size(964, 35); + this.panelSearchTitle.TabIndex = 8; + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Font = new System.Drawing.Font("宋体", 9F); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSearch, + this.tbtnSearch, + this.toolStripButton1}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0); + this.toolStrip1.Size = new System.Drawing.Size(964, 70); + this.toolStrip1.TabIndex = 7; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSearch + // + this.tsbSearch.AutoSize = false; + this.tsbSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSearch.Image = ((System.Drawing.Image)(resources.GetObject("tsbSearch.Image"))); + this.tsbSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSearch.Name = "tsbSearch"; + this.tsbSearch.Size = new System.Drawing.Size(100, 60); + this.tsbSearch.Text = "查询"; + this.tsbSearch.Click += new System.EventHandler(this.tsbSearch_Click); + // + // tbtnSearch + // + this.tbtnSearch.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tbtnSearch.AutoSize = false; + this.tbtnSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tbtnSearch.Image = ((System.Drawing.Image)(resources.GetObject("tbtnSearch.Image"))); + this.tbtnSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tbtnSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tbtnSearch.Name = "tbtnSearch"; + this.tbtnSearch.Size = new System.Drawing.Size(140, 60); + this.tbtnSearch.Text = "返回加工"; + this.tbtnSearch.Visible = false; + this.tbtnSearch.Click += new System.EventHandler(this.tbtnSearch_Click); + // + // toolStripButton1 + // + this.toolStripButton1.AutoSize = false; + this.toolStripButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.toolStripButton1.Image = global::QMAPP.WinForm.Resource1.cancle; + this.toolStripButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(100, 60); + this.toolStripButton1.Text = "关闭"; + this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); + // + // DGData + // + this.DGData.AllowUserToAddRows = false; + this.DGData.AllowUserToDeleteRows = false; + this.DGData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.DGData.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.DGData.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.materialName, + this.materialCode, + this.color, + this.count}); + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.DefaultCellStyle = dataGridViewCellStyle6; + this.DGData.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGData.Location = new System.Drawing.Point(0, 0); + this.DGData.Name = "DGData"; + this.DGData.ReadOnly = true; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGData.RowHeadersDefaultCellStyle = dataGridViewCellStyle7; + this.DGData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; + this.DGData.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.RowTemplate.Height = 23; + this.DGData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGData.Size = new System.Drawing.Size(964, 229); + this.DGData.TabIndex = 11; + this.DGData.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.DGData_RowPostPaint); + // + // panel3 + // + this.panel3.Controls.Add(this.DGData); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 165); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(964, 229); + this.panel3.TabIndex = 14; + // + // materialName + // + this.materialName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.materialName.DataPropertyName = "零件名称"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.materialName.DefaultCellStyle = dataGridViewCellStyle2; + this.materialName.FillWeight = 104.0609F; + this.materialName.HeaderText = "零件名称"; + this.materialName.Name = "materialName"; + this.materialName.ReadOnly = true; + this.materialName.Width = 101; + // + // materialCode + // + this.materialCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.materialCode.DataPropertyName = "零件号"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.materialCode.DefaultCellStyle = dataGridViewCellStyle3; + this.materialCode.FillWeight = 136.4285F; + this.materialCode.HeaderText = "零件号"; + this.materialCode.Name = "materialCode"; + this.materialCode.ReadOnly = true; + // + // color + // + this.color.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.color.DataPropertyName = "颜色"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.color.DefaultCellStyle = dataGridViewCellStyle4; + this.color.FillWeight = 72.74867F; + this.color.HeaderText = "颜色"; + this.color.Name = "color"; + this.color.ReadOnly = true; + // + // count + // + this.count.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.count.DataPropertyName = "加工数量"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.count.DefaultCellStyle = dataGridViewCellStyle5; + this.count.FillWeight = 76.52604F; + this.count.HeaderText = "数量"; + this.count.Name = "count"; + this.count.ReadOnly = true; + // + // MainOperationCompleteForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.ClientSize = new System.Drawing.Size(964, 394); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panelSearch); + this.Controls.Add(this.panelSearchTitle); + this.Controls.Add(this.toolStrip1); + this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.Name = "MainOperationCompleteForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "回冲统计"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.MainOperationStaticForm_Load); + this.panelSearch.ResumeLayout(false); + this.panelSearch.PerformLayout(); + this.panelSearchTitle.ResumeLayout(false); + this.panelSearchTitle.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGData)).EndInit(); + this.panel3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelSearch; + private System.Windows.Forms.Label lblSearchTitle; + private System.Windows.Forms.Panel panelSearchTitle; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tbtnSearch; + private System.Windows.Forms.Label lblOperateDate; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ToolStripButton tsbSearch; + private System.Windows.Forms.DataGridView DGData; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.DateTimePicker dpOpeStart; + private System.Windows.Forms.BindingSource bindingSource1; + private System.Windows.Forms.DateTimePicker dpOpeEnd; + private System.Windows.Forms.ComboBox comMinuteEnd; + private System.Windows.Forms.ComboBox comHourEnd; + private System.Windows.Forms.ComboBox comMinuteStart; + private System.Windows.Forms.ComboBox comHourStart; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.DataGridViewTextBoxColumn materialName; + private System.Windows.Forms.DataGridViewTextBoxColumn materialCode; + private System.Windows.Forms.DataGridViewTextBoxColumn color; + private System.Windows.Forms.DataGridViewTextBoxColumn count; + } +} \ No newline at end of file diff --git a/.svn/pristine/a9/a96553bcdd7e700f10dd484fc7b29f53fb6bc1ca.svn-base b/.svn/pristine/a9/a96553bcdd7e700f10dd484fc7b29f53fb6bc1ca.svn-base new file mode 100644 index 0000000..529530f --- /dev/null +++ b/.svn/pristine/a9/a96553bcdd7e700f10dd484fc7b29f53fb6bc1ca.svn-base @@ -0,0 +1,161 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {87D7693E-EBF5-42FF-994A-C0B325E7B529} + WinExe + Properties + CompleteStatisticsService + CompleteStatisticsService + v4.0 + + + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\DLL\log4net.dll + + + ..\..\..\DLL\MySql.Data.dll + + + ..\..\..\DLL\Newtonsoft.Json.dll + + + ..\..\..\packages\NSoup.0.8.0\lib\net40\NSoup.dll + + + ..\..\..\packages\Oracle.DataAccess.x86.4.4.112.3\lib\Oracle.DataAccess.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Common.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + Component + + + CompleteStatisticsService.cs + + + + + + + + + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} + QMAPP.FJC.Web + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + + + False + Microsoft .NET Framework 4 Client Profile %28x86 和 x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/aa/aa40a8aa6d16699107db6f0401c129bcbf472a91.svn-base b/.svn/pristine/aa/aa40a8aa6d16699107db6f0401c129bcbf472a91.svn-base new file mode 100644 index 0000000..9951bbf --- /dev/null +++ b/.svn/pristine/aa/aa40a8aa6d16699107db6f0401c129bcbf472a91.svn-base @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models +{ + /// + /// 模块名称 生产配置 + /// 作 者 张松男 + /// 编写日期 2021年09月06日 + /// + public class AppConfigModel : QDGModel + { + /// + /// 条码格式规则主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string ID { get; set; } + + /// + /// 唯一编码 + /// + [Description("唯一编码")] + [HTMLInput(UpdateRead = true, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string Code { get; set; } + + /// + /// 名称 + /// + [Description("名称")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 300)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string Name { get; set; } + + /// + /// 值 + /// + [Description("值")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 50)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 300, DataAlign = DataAlign.center)] + public string Value { get; set; } + + /// + /// 描述 + /// + [Description("描述")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 100)] + [InputType(inputType.textArea)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 300, DataAlign = DataAlign.center)] + public string Remark { get; set; } + + + } + +} diff --git a/.svn/pristine/aa/aa70f46dbd2b87e8803f61b381c807cda4799348.svn-base b/.svn/pristine/aa/aa70f46dbd2b87e8803f61b381c807cda4799348.svn-base new file mode 100644 index 0000000..76666cb --- /dev/null +++ b/.svn/pristine/aa/aa70f46dbd2b87e8803f61b381c807cda4799348.svn-base @@ -0,0 +1,567 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class SlushMoldingPrintForOldNewForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.lblLock = new System.Windows.Forms.LinkLabel(); + this.label12 = new System.Windows.Forms.Label(); + this.comMouldNumber = new System.Windows.Forms.ComboBox(); + this.label13 = new System.Windows.Forms.Label(); + this.cbM = new System.Windows.Forms.CheckBox(); + this.cBoxModelCode = new System.Windows.Forms.ComboBox(); + this.comMachineCode = new System.Windows.Forms.ComboBox(); + this.dtpDate = new DateTimePickerA(); + this.label14 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.comPosition = new System.Windows.Forms.ComboBox(); + this.comColor = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.ErrorMessage = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MAINCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.COLOR = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PRODUCTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tsbSave = new System.Windows.Forms.Button(); + this.btnCommSend = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.TBRCV = new System.Windows.Forms.RichTextBox(); + this.textBox1 = new System.Windows.Forms.ComboBox(); + this.TBSEND = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox1.Controls.Add(this.lblLock); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.comMouldNumber); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.cbM); + this.groupBox1.Controls.Add(this.cBoxModelCode); + this.groupBox1.Controls.Add(this.comMachineCode); + this.groupBox1.Controls.Add(this.dtpDate); + this.groupBox1.Controls.Add(this.label14); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.comPosition); + this.groupBox1.Controls.Add(this.comColor); + this.groupBox1.Controls.Add(this.label11); + this.groupBox1.Controls.Add(this.label15); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(720, 2); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(499, 368); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "信息录入"; + // + // lblLock + // + this.lblLock.AutoSize = true; + this.lblLock.Font = new System.Drawing.Font("新宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblLock.Location = new System.Drawing.Point(68, 64); + this.lblLock.Name = "lblLock"; + this.lblLock.Size = new System.Drawing.Size(89, 19); + this.lblLock.TabIndex = 20; + this.lblLock.TabStop = true; + this.lblLock.Tag = "0"; + this.lblLock.Text = "锁定工位"; + this.lblLock.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblLock_LinkClicked); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(68, 221); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(21, 25); + this.label12.TabIndex = 18; + this.label12.Text = "*"; + // + // comMouldNumber + // + this.comMouldNumber.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMouldNumber.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMouldNumber.FormattingEnabled = true; + this.comMouldNumber.Location = new System.Drawing.Point(166, 216); + this.comMouldNumber.Name = "comMouldNumber"; + this.comMouldNumber.Size = new System.Drawing.Size(247, 32); + this.comMouldNumber.TabIndex = 16; + this.comMouldNumber.SelectedIndexChanged += new System.EventHandler(this.comMouldNumber_SelectedIndexChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label13.Location = new System.Drawing.Point(88, 221); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(76, 16); + this.label13.TabIndex = 17; + this.label13.Text = "模架号:"; + // + // cbM + // + this.cbM.AutoSize = true; + this.cbM.Checked = true; + this.cbM.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbM.Enabled = false; + this.cbM.Location = new System.Drawing.Point(427, 44); + this.cbM.Name = "cbM"; + this.cbM.Size = new System.Drawing.Size(69, 29); + this.cbM.TabIndex = 15; + this.cbM.Text = "扣料"; + this.cbM.UseVisualStyleBackColor = true; + // + // cBoxModelCode + // + this.cBoxModelCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cBoxModelCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cBoxModelCode.FormattingEnabled = true; + this.cBoxModelCode.Location = new System.Drawing.Point(166, 273); + this.cBoxModelCode.Name = "cBoxModelCode"; + this.cBoxModelCode.Size = new System.Drawing.Size(247, 32); + this.cBoxModelCode.TabIndex = 12; + // + // comMachineCode + // + this.comMachineCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMachineCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMachineCode.FormattingEnabled = true; + this.comMachineCode.Items.AddRange(new object[] { + "否", + "是"}); + this.comMachineCode.Location = new System.Drawing.Point(166, 41); + this.comMachineCode.Name = "comMachineCode"; + this.comMachineCode.Size = new System.Drawing.Size(247, 32); + this.comMachineCode.TabIndex = 11; + // + // dtpDate + // + this.dtpDate.CustomFormat = " "; + this.dtpDate.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dtpDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.FormatString = "yyyy年MM月dd日"; + this.dtpDate.Location = new System.Drawing.Point(166, 329); + this.dtpDate.Name = "dtpDate"; + this.dtpDate.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpDate.Size = new System.Drawing.Size(249, 35); + this.dtpDate.TabIndex = 10; + this.dtpDate.ValueX = null; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.Color.Red; + this.label14.Location = new System.Drawing.Point(99, 163); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(21, 25); + this.label14.TabIndex = 9; + this.label14.Text = "*"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(68, 270); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(21, 25); + this.label10.TabIndex = 9; + this.label10.Text = "*"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(45, 42); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(21, 25); + this.label6.TabIndex = 9; + this.label6.Text = "*"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Red; + this.label4.Location = new System.Drawing.Point(78, 105); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(21, 25); + this.label4.TabIndex = 9; + this.label4.Text = "*"; + // + // comPosition + // + this.comPosition.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comPosition.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comPosition.FormattingEnabled = true; + this.comPosition.Items.AddRange(new object[] { + "A+B"}); + this.comPosition.Location = new System.Drawing.Point(166, 160); + this.comPosition.Name = "comPosition"; + this.comPosition.Size = new System.Drawing.Size(247, 32); + this.comPosition.TabIndex = 5; + // + // comColor + // + this.comColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comColor.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comColor.FormattingEnabled = true; + this.comColor.Location = new System.Drawing.Point(166, 99); + this.comColor.Name = "comColor"; + this.comColor.Size = new System.Drawing.Size(247, 32); + this.comColor.TabIndex = 3; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label11.Location = new System.Drawing.Point(118, 163); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(42, 16); + this.label11.TabIndex = 6; + this.label11.Text = "腔:"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label15.Location = new System.Drawing.Point(70, 333); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(93, 16); + this.label15.TabIndex = 6; + this.label15.Text = "加工时间:"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(86, 278); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(76, 16); + this.label9.TabIndex = 6; + this.label9.Text = "模腔号:"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label5.Location = new System.Drawing.Point(70, 44); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(93, 16); + this.label5.TabIndex = 6; + this.label5.Text = "搪塑设备:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(101, 107); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(59, 16); + this.label3.TabIndex = 6; + this.label3.Text = "颜色:"; + // + // ErrorMessage + // + this.ErrorMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.ErrorMessage.AutoSize = true; + this.ErrorMessage.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ErrorMessage.ForeColor = System.Drawing.Color.Red; + this.ErrorMessage.Location = new System.Drawing.Point(741, 649); + this.ErrorMessage.Name = "ErrorMessage"; + this.ErrorMessage.Size = new System.Drawing.Size(0, 25); + this.ErrorMessage.TabIndex = 19; + // + // groupBox2 + // + this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox2.Controls.Add(this.DGView); + this.groupBox2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox2.Location = new System.Drawing.Point(2, 2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(714, 794); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "打印记录"; + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MAINCODE, + this.COLOR, + this.PRODUCTCODE, + this.CREATETIME}); + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(3, 29); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(708, 762); + this.DGView.TabIndex = 39; + // + // MAINCODE + // + this.MAINCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MAINCODE.DataPropertyName = "MAINCODE"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F); + this.MAINCODE.DefaultCellStyle = dataGridViewCellStyle2; + this.MAINCODE.FillWeight = 48.95314F; + this.MAINCODE.HeaderText = "条码信息"; + this.MAINCODE.Name = "MAINCODE"; + this.MAINCODE.ReadOnly = true; + this.MAINCODE.Width = 240; + // + // COLOR + // + this.COLOR.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.COLOR.DataPropertyName = "MATERIAL_NAME"; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F); + this.COLOR.DefaultCellStyle = dataGridViewCellStyle3; + this.COLOR.FillWeight = 99.90437F; + this.COLOR.HeaderText = "表皮颜色"; + this.COLOR.Name = "COLOR"; + this.COLOR.ReadOnly = true; + this.COLOR.Width = 150; + // + // PRODUCTCODE + // + this.PRODUCTCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.PRODUCTCODE.DataPropertyName = "PRODUCTCODE"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PRODUCTCODE.DefaultCellStyle = dataGridViewCellStyle4; + this.PRODUCTCODE.FillWeight = 48.95314F; + this.PRODUCTCODE.HeaderText = "零件号"; + this.PRODUCTCODE.Name = "PRODUCTCODE"; + this.PRODUCTCODE.ReadOnly = true; + this.PRODUCTCODE.Width = 240; + // + // CREATETIME + // + this.CREATETIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.CREATETIME.DataPropertyName = "CREATETIME"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle5.Format = "f"; + dataGridViewCellStyle5.NullValue = null; + this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle5; + this.CREATETIME.FillWeight = 48.95314F; + this.CREATETIME.HeaderText = "操作时间"; + this.CREATETIME.Name = "CREATETIME"; + this.CREATETIME.ReadOnly = true; + this.CREATETIME.Width = 250; + // + // tsbSave + // + this.tsbSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.Location = new System.Drawing.Point(877, 624); + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(232, 137); + this.tsbSave.TabIndex = 35; + this.tsbSave.Text = "打印"; + this.tsbSave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.tsbSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.tsbSave.UseVisualStyleBackColor = true; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // btnCommSend + // + this.btnCommSend.Enabled = false; + this.btnCommSend.Location = new System.Drawing.Point(780, 385); + this.btnCommSend.Name = "btnCommSend"; + this.btnCommSend.Size = new System.Drawing.Size(80, 32); + this.btnCommSend.TabIndex = 52; + this.btnCommSend.Text = "连接设备"; + this.btnCommSend.UseVisualStyleBackColor = true; + this.btnCommSend.Click += new System.EventHandler(this.btnCom_Click); + // + // groupBox3 + // + this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox3.Controls.Add(this.TBRCV); + this.groupBox3.Location = new System.Drawing.Point(791, 469); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(365, 62); + this.groupBox3.TabIndex = 53; + this.groupBox3.TabStop = false; + // + // TBRCV + // + this.TBRCV.Dock = System.Windows.Forms.DockStyle.Fill; + this.TBRCV.Location = new System.Drawing.Point(3, 17); + this.TBRCV.Name = "TBRCV"; + this.TBRCV.Size = new System.Drawing.Size(359, 42); + this.TBRCV.TabIndex = 0; + this.TBRCV.Text = ""; + // + // textBox1 + // + this.textBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.textBox1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textBox1.FormattingEnabled = true; + this.textBox1.Location = new System.Drawing.Point(876, 386); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(280, 32); + this.textBox1.TabIndex = 21; + // + // TBSEND + // + this.TBSEND.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.TBSEND.Location = new System.Drawing.Point(876, 433); + this.TBSEND.Multiline = true; + this.TBSEND.Name = "TBSEND"; + this.TBSEND.Size = new System.Drawing.Size(279, 38); + this.TBSEND.TabIndex = 54; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label1.Location = new System.Drawing.Point(777, 444); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(93, 16); + this.label1.TabIndex = 21; + this.label1.Text = "连接编码:"; + // + // SlushMoldingPrintForOldNewForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1223, 798); + this.Controls.Add(this.label1); + this.Controls.Add(this.TBSEND); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.btnCommSend); + this.Controls.Add(this.tsbSave); + this.Controls.Add(this.ErrorMessage); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Name = "SlushMoldingPrintForOldNewForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "单色搪塑机条码打印"; + this.Load += new System.EventHandler(this.Form_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.groupBox3.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox comPosition; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox comColor; + private System.Windows.Forms.Label label15; + private DateTimePickerA dtpDate; + private System.Windows.Forms.ComboBox cBoxModelCode; + private System.Windows.Forms.ComboBox comMachineCode; + private System.Windows.Forms.CheckBox cbM; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ComboBox comMouldNumber; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label ErrorMessage; + private System.Windows.Forms.LinkLabel lblLock; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.Button tsbSave; + private System.Windows.Forms.DataGridViewTextBoxColumn MAINCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn COLOR; + private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME; + private System.Windows.Forms.Button btnCommSend; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.RichTextBox TBRCV; + private System.Windows.Forms.ComboBox textBox1; + private System.Windows.Forms.TextBox TBSEND; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/.svn/pristine/aa/aac55adfe097352fed81c4945cc2f7988410c08e.svn-base b/.svn/pristine/aa/aac55adfe097352fed81c4945cc2f7988410c08e.svn-base new file mode 100644 index 0000000..39c7987 --- /dev/null +++ b/.svn/pristine/aa/aac55adfe097352fed81c4945cc2f7988410c08e.svn-base @@ -0,0 +1,205 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Windows.Forms; +using QMAPP.FJC.Entity.Injection; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.BZD; +using DCS.Common; +using QMAPP.FJC.Entity.Basic; +using QMAPP.WinForm.Common; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// + /// + public partial class InjectPrintForm : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + List _bzdConfig = null; + //string txtMaterialCode = ""; + //string textMaterialName = ""; + + //Product _CurrentProduct = null; + private InjectPasswordForm _InjectPasswordForm; + + /// + /// + /// + public InjectPrintForm(InjectPasswordForm InjectPasswordForm) + { + InitializeComponent(); + LoadMachineList(); + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + _InjectPasswordForm = InjectPasswordForm; + } + + #region 打印按钮 + + /// + /// 打印按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + if (string.IsNullOrEmpty(txtProductCode.Text)) + { + infolabel.Text = "请扫描或填写装配码!"; + + txtProductCode.Focus(); + return; + } + + //***************************** + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtProductCode.Text,Type="注塑条码补打" }); + + Print(txtProductCode.Text,true); + + txtProductCode.Text = ""; + //txtMaterialCode = ""; + //textMaterialName = ""; + } + catch (Exception exception) + { + txtProductCode.Text = ""; + MessageBox.Show("打印失败!"); + throw; + } + } + + #endregion + + private void Print(string code, bool IsManual) + { + var MachineCode = ""; + List labels = new List(); + string shiftCode = ClientContext.produceShift.PRODUCESHIFTTCODE; + var selectmachine = comMachine.SelectedItem as MachineInfo; + if (selectmachine != null && !string.IsNullOrEmpty(selectmachine.PID)) + { + MachineCode = selectmachine.MACHINECODDE; + + } + //打印条码 + string typeTem = "InjectLabel100x30"; + PrintTemplate.InjectLabel label = new PrintTemplate.InjectLabel + { + CreateDate = DateTime.Now, + MachineCode = MachineCode, + MaterialCode = textMaterialName.Text.ToString(), + MaterialName = txtMaterialCode.Text.ToString(), + ModelCode = cbMould.SelectedValue.ToString(), + SerialNumber = code, + ShiftCode = shiftCode, + IsManualPrint = IsManual + }; + labels.Add(label); + string path = System.Configuration.ConfigurationManager.AppSettings["Template_Local_Path"]; + if (!System.IO.Directory.Exists(path)) + { + System.IO.Directory.CreateDirectory(path); + } + FastReport.Report fr = new FastReport.Report(); + fr.RegisterData(labels, "Labels"); + if (!System.IO.File.Exists(string.Format("{0}\\{1}.frx", path, typeTem))) + { + if (System.IO.File.Exists(string.Format("PrintTemplate\\{1}.frx", path, typeTem))) + { + System.IO.File.Copy(string.Format("PrintTemplate\\{1}.frx", path, typeTem) + , string.Format("{0}\\{1}.frx", path, typeTem)); + } + else + { + fr.FileName = string.Format("{0}\\{1}.frx", path, typeTem); + fr.Design(true); + fr.Save(string.Format("{0}\\{1}.frx", path, typeTem)); + } + } + fr.Load(string.Format("{0}\\{1}.frx", path, typeTem)); + + fr.Design(true); + + //fr.PrintSettings.ShowDialog = false; + //fr.Print(); + + fr.Dispose(); + + //QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeTem + "temPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings[typeData + "dataPath"].ToString + // ()); + } + + #region 点击选择零件信息 + /// + /// 点击选择零件信息 + /// + /// + /// + private void btnChoiceMaterial_Click(object sender, EventArgs e) + { + MaterialTreeForm materialForm = new MaterialTreeForm(); + var ret = materialForm.ShowDialog(); + if (ret == DialogResult.OK) + { + this.txtMaterialCode.Text = materialForm.MaterialCode; + this.textMaterialName.Text = materialForm.MaterialName; + //bool maintype = materialForm.MainType; + //if (maintype) + //{ + // this.groupBox3.Enabled = true; + //} + //else + //{ + // this.groupBox3.Enabled = false; + //} + } + } + + + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist = basicData.GetMachineInfoAndModelList(new string[] { "1" }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + comMachine_SelectedIndexChanged(null, null); + #endregion + } + #endregion + + private void comMachine_SelectedIndexChanged(object sender, EventArgs e) + { + var selectmachine = comMachine.SelectedItem as MachineInfo; + if (selectmachine != null && !string.IsNullOrEmpty(selectmachine.PID)) + { + var mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = "INJ_MODEL" }); + mouldList.Insert(0, new MachineInfoModels { }); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList; + + } + + } + + } +} \ No newline at end of file diff --git a/.svn/pristine/ad/ad4e4829253c4f7892ce0adfb73527d71bfe8e50.svn-base b/.svn/pristine/ad/ad4e4829253c4f7892ce0adfb73527d71bfe8e50.svn-base new file mode 100644 index 0000000..475c697 --- /dev/null +++ b/.svn/pristine/ad/ad4e4829253c4f7892ce0adfb73527d71bfe8e50.svn-base @@ -0,0 +1,1981 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628} + WinExe + Properties + QMAPP.WinForm + QMAPP.WinForm + v4.0 + + + 512 + SAK + SAK + SAK + SAK + true + E:\Deploy\CDMES\Winform\ + true + Web + true + Foreground + 7 + Days + true + true + true + http://10.111.144.97:8088/ + http://10.111.144.97:8088/ + Trace System + ADIENT + 1.0.0.0 + true + Default.htm + true + 35 + 1.0.1.%2a + false + true + true + true + Relative + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\QMAPP.WinForm.XML + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + D7B0D251F30AE957B8EE42D7C0AD873E0F75B094 + + + + + + + true + + + false + + + cfaa-mes.ico + + + + false + + + QMSetupKey.pfx + + + + True + + + ..\..\DLL\BarcodeLib.dll + + + + + + False + ..\..\DLL\FastReport\FastReport.dll + + + ..\..\packages\HZH_Controls.1.0.11\lib\net40\HZH_Controls.dll + + + ..\..\DLL\Interop.gregn6Lib.dll + True + + + ..\..\DLL\Interop.grproLib.dll + True + + + False + True + bin\Debug\Interop.Microsoft.Office.Core.dll + + + False + True + bin\Debug\Interop.Microsoft.Office.Interop.Excel.dll + + + ..\..\DLL\interop.speechlib.dll + True + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + False + ..\..\DLL\PlaySound.dll + + + False + ..\..\DLL\QMCommon.dll + + + False + ..\..\DLL\QMConfig.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + False + ..\..\DLL\QMWinCommon.dll + + + + + + + + + + + + + + + + + + + + ..\..\DLL\ThoughtWorks.QRCode.dll + + + + + + + + + Component + + + UserControl + + + Pager.cs + + + + + + + + + + + + + + + + + + + + + + Form + + + CallManageForm.cs + + + + Form + + + frmAlertConfirm.cs + + + Form + + + LeakInspection.cs + + + Form + + + DefaultDataSetNum.cs + + + + Form + + + FrmCarCardDetail.cs + + + Form + + + FrmCarCardPrintShow.cs + + + Form + + + FrmItemList.cs + + + Form + + + frmLineSetting.cs + + + Form + + + FrmPlace.cs + + + True + True + PastCard.rpt + Component + + + + + Form + + + ResetSendIndexForm.cs + + + Form + + + DPShipment.cs + + + Form + + + InjectionMoldingPasswordForm.cs + + + Form + + + InjectionMoldingNEWEditForm1.cs + + + Form + + + InjectionMoldingNEWForm.cs + + + Form + + + InjectPasswordForm.cs + + + Form + + + InjectPrintForm.cs + + + Form + + + InjectionCodePrint.cs + + + Form + + + MaterialTreeForm.cs + + + Form + + + InjectionMoldingNEWEditForm.cs + + + Form + + + SlushMoldingPrintForOldNewForm.cs + + + + Form + + + DPLabelRegenerate.cs + + + Form + + + InjectIntoBarcode.cs + + + Form + + + InjectPlat.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + MainCodeChangeEditForm.cs + + + Form + + + MainCodeChangeForm.cs + + + Form + + + MendReasonSubDefects.cs + + + Form + + + MendRecorderWasteForm.cs + + + Form + + + ProductCheckAddForm.cs + + + Form + + + ProductCheckDetailForm.cs + + + Form + + + ProductCheckForm.cs + + + Form + + + ProductCheckValuesFrom.cs + + + Form + + + ReplaceForm.cs + + + Form + + + MendRecorderReasonForm.cs + + + Form + + + BZDPasswordForm.cs + + + Form + + + BZDRePrintForm.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + frmInspectSkipping.cs + + + Form + + + PrintPlanLabel.cs + + + Form + + + frmFISBreakConfirm.cs + + + Form + + + ProductInForm.cs + + + Form + + + ProductInSendCodeForm.cs + + + Form + + + ProductInfo.cs + + + Form + + + DPAssemblyCodePrintForm.cs + + + Form + + + DoorFrameForm.cs + + + Form + + + EquipmentAlarmForm.cs + + + Form + + + FisM100ListForm.cs + + + Form + + + CastCounterSet.cs + + + Form + + + InjectionCheckForm.cs + + + Form + + + InjectionCheckListForm.cs + + + Form + + + InjectionScarpForm.cs + + + Form + + + SingleSlushMoldConfig.cs + + + Form + + + SingleSlushMoldConfigEdit.cs + + + Form + + + SlushMoldingEditForm.cs + + + Form + + + SlushMoldingForm.cs + + + Form + + + SlushMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForm.cs + + + Form + + + EquipmentMaintainEditForm.cs + + + Form + + + EquipmentMaintainForm.cs + + + Form + + + InjectionMoldingEditForm.cs + + + Form + + + InjectionMoldingForm.cs + + + Form + + + InjectionMoldingPrintForm.cs + + + Form + + + ProductBundleForm.cs + + + Form + + + InjectionMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForOldForm.cs + + + Form + + + PouringMoldingEditForm.cs + + + Form + + + PouringMoldingForm.cs + + + Form + + + SlushMoldingPrintLotForm.cs + + + Form + + + InjectionMoldingPrintLotForm.cs + + + Form + + + SlushMoldSet.cs + + + Form + + + SlushScarpForm.cs + + + Form + + + MachineCheckEditForm.cs + + + Form + + + MachineCheckForm.cs + + + Form + + + ItemForm.cs + + + Form + + + MendRecorderForm.cs + + + Form + + + MendRecorderCreateForm.cs + + + Form + + + MendRecorderFinishForm.cs + + + Form + + + MendStaticForm.cs + + + Form + + + SpecifyForm.cs + + + Form + + + TestForm.cs + + + Form + + + VideoTypeEditForm.cs + + + Form + + + MediaPlayerForm.cs + + + Form + + + MediaPlayerSubForm.cs + + + Form + + + MediaPlayerEditForm.cs + + + Form + + + VideoTypeForm.cs + + + Form + + + MainOperationSearchForm.cs + + + Form + + + PrintForm.cs + + + + Form + + + ProductAddForm.cs + + + Form + + + RepairForm.cs + + + Form + + + OperationForm.cs + + + Form + + + SetProcessPassForm.cs + + + Form + + + SPCControlForm.cs + + + Form + + + MainOperationStaticForm.cs + + + Form + + + SlushPlanEditForm.cs + + + Form + + + SlushPlanForm.cs + + + Form + + + ReprintForm.cs + + + Form + + + OutWarehouseForm.cs + + + Form + + + SendPlanSearchEditForm.cs + + + Form + + + SendPlanSearchForm.cs + + + Form + + + SendPlanPrintForm.cs + + + Form + + + EditUserForm.cs + + + Form + + + ManageUserForm.cs + + + Form + + + InWarehouseForm.cs + + + Form + + + SendCodeForm.cs + + + Form + + + SendFinalForm.cs + + + Form + + + MainForm.cs + + + Form + + + LoginForm.cs + + + + + + + + + + + + + + + True + True + Resource1.resx + + + Form + + + ServerSwitch.cs + + + True + True + Reference.svcmap + + + UserControl + + + BaseHole.cs + + + UserControl + + + DetailHole.cs + + + + + Form + + + FormFoundUpdate.cs + + + Form + + + FormSplash.cs + + + + + + + + + + + + + + + Pager.cs + + + CallManageForm.cs + + + frmAlertConfirm.cs + + + LeakInspection.cs + + + DefaultDataSetNum.cs + + + FrmCarCardDetail.cs + + + FrmCarCardPrintShow.cs + + + FrmItemList.cs + + + frmLineSetting.cs + + + FrmPlace.cs + + + CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator + PastCard.cs + + + ResetSendIndexForm.cs + + + DPShipment.cs + + + InjectionMoldingPasswordForm.cs + + + InjectionMoldingNEWEditForm1.cs + + + InjectionMoldingNEWForm.cs + + + InjectPasswordForm.cs + + + InjectPrintForm.cs + + + InjectIntoBarcode.cs + + + InjectionCodePrint.cs + + + MaterialTreeForm.cs + + + InjectionMoldingNEWEditForm.cs + + + SlushMoldingPrintForOldNewForm.cs + + + DPLabelRegenerate.cs + + + InjectPlat.cs + + + DPLabelReplace.cs + + + MainCodeChangeEditForm.cs + + + MainCodeChangeForm.cs + + + MendReasonSubDefects.cs + + + MendRecorderWasteForm.cs + + + ProductCheckAddForm.cs + + + ProductCheckDetailForm.cs + + + ProductCheckForm.cs + + + ProductCheckValuesFrom.cs + + + ReplaceForm.cs + + + MendRecorderReasonForm.cs + + + BZDPasswordForm.cs + + + BZDRePrintForm.cs + + + DPLabelReplace.cs + + + frmInspectSkipping.cs + + + PrintPlanLabel.cs + + + frmFISBreakConfirm.cs + + + ProductInForm.cs + Designer + + + ProductInSendCodeForm.cs + + + ProductInfo.cs + + + DPAssemblyCodePrintForm.cs + + + DoorFrameForm.cs + + + EquipmentAlarmForm.cs + + + FisM100ListForm.cs + + + CastCounterSet.cs + + + InjectionCheckForm.cs + + + InjectionCheckListForm.cs + + + InjectionScarpForm.cs + + + SingleSlushMoldConfig.cs + + + SingleSlushMoldConfigEdit.cs + + + SlushMoldingEditForm.cs + + + SlushMoldingForm.cs + + + SlushMoldingPrintEditForm.cs + + + SlushMoldingPrintForm.cs + + + EquipmentMaintainEditForm.cs + + + EquipmentMaintainForm.cs + + + InjectionMoldingEditForm.cs + + + InjectionMoldingForm.cs + + + InjectionMoldingPrintForm.cs + Designer + + + ProductBundleForm.cs + + + InjectionMoldingPrintEditForm.cs + + + SlushMoldingPrintForOldForm.cs + + + PouringMoldingEditForm.cs + + + PouringMoldingForm.cs + + + SlushMoldingPrintLotForm.cs + + + InjectionMoldingPrintLotForm.cs + + + SlushMoldSet.cs + + + SlushScarpForm.cs + + + MachineCheckEditForm.cs + + + MachineCheckForm.cs + + + ItemForm.cs + + + MendRecorderForm.cs + + + MendRecorderCreateForm.cs + + + MendRecorderFinishForm.cs + + + MendStaticForm.cs + + + SpecifyForm.cs + + + TestForm.cs + + + VideoTypeEditForm.cs + + + MediaPlayerForm.cs + + + MediaPlayerSubForm.cs + + + MediaPlayerEditForm.cs + + + VideoTypeForm.cs + + + MainOperationSearchForm.cs + + + PrintForm.cs + + + ProductAddForm.cs + + + RepairForm.cs + + + OperationForm.cs + Designer + + + SetProcessPassForm.cs + + + SPCControlForm.cs + + + MainOperationStaticForm.cs + + + SlushPlanEditForm.cs + + + SlushPlanForm.cs + + + ReprintForm.cs + + + OutWarehouseForm.cs + Designer + + + SendPlanSearchEditForm.cs + + + SendPlanSearchForm.cs + + + SendPlanPrintForm.cs + + + EditUserForm.cs + + + ManageUserForm.cs + + + InWarehouseForm.cs + Designer + + + SendCodeForm.cs + + + SendFinalForm.cs + + + LoginForm.cs + + + MainForm.cs + + + PublicResXFileCodeGenerator + Designer + Resource1.Designer.cs + + + ServerSwitch.cs + + + BaseHole.cs + + + DetailHole.cs + + + FormFoundUpdate.cs + + + FormSplash.cs + + + Designer + + + + PreserveNewest + + + + + PreserveNewest + + + Always + + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {706750E7-6D42-4FE2-95BF-99E90F84BE07} + QMAPP.FJC.TRACING + + + {3AECE013-AC67-4F6F-9DB4-36577345F428} + Stone.WinModuleTransWare + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + Always + Designer + + + Always + + + Always + + + Always + + + + + WCF Proxy Generator + Reference.cs + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + Always + + + Designer + + + Always + Designer + + + Always + + + Always + + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + + + + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + aximp + False + + + {F5078F18-C551-11D3-89B9-0000F81FE221} + 3 + 0 + 0 + tlbimp + False + True + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + tlbimp + False + True + + + + + False + 追溯系统 + 1 + cfaa-mes.ico + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/ad/adbc809f795ba25a9d26b7de49f31554bbd1b198.svn-base b/.svn/pristine/ad/adbc809f795ba25a9d26b7de49f31554bbd1b198.svn-base new file mode 100644 index 0000000..83f57be --- /dev/null +++ b/.svn/pristine/ad/adbc809f795ba25a9d26b7de49f31554bbd1b198.svn-base @@ -0,0 +1,286 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + Library + Properties + QMAPP.FJC.BLL + QMAPP.FJC.BLL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\DLL\BarcodeLib.dll + + + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\XGate\Ptl.Device.dll + + + ..\..\DLL\XGate\Ptl.Device.XmlSerializers.dll + + + ..\..\QMFrameWork\QMFrameWork.Cache.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {25F672F4-55A6-41B3-82DA-84233786D991} + QMAPP.MD.DAL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {8A50A215-C033-42DC-A656-BC1F117DA6BA} + QM.Exchange.Adapters + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + Always + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/ae/aec88aa66b2e957ffabb296d1c0f2362c5772776.svn-base b/.svn/pristine/ae/aec88aa66b2e957ffabb296d1c0f2362c5772776.svn-base new file mode 100644 index 0000000..6859e51 --- /dev/null +++ b/.svn/pristine/ae/aec88aa66b2e957ffabb296d1c0f2362c5772776.svn-base @@ -0,0 +1,278 @@ +using System; +using System.Collections.Generic; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.DAL.ProduceManage; +using QMAPP.FJC.Entity.ProduceManage; +using QMFrameWork.Data; +using QMFrameWork.Log; +using QMAPP.FJC.Entity; +using QMAPP.MD.Entity.Bucket; +using QMAPP.FJC.DAL.Bucket; + +namespace QMAPP.FJC.BLL.Bucket +{ + /// + /// 模块名称:注塑投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialBLL : BaseBLL + { + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(RawMaterial model) + { + DataResult result = new DataResult(); + try + { + result.Result = new RawMaterialDAL().Get(model); + result.IsSuccess = true; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取异常"; + } + + return result; + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(RawMaterial condition, DataPage page) + { + //DataPage result = new DataPage(); + + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + result.Result = new RawMaterialDAL().GetList(condition, page); + + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + result.IsSuccess = false; + result.Msg = "获取数据异常"; + } + + return result; + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListTo(RawMaterial condition) + { + try + { + return new RawMaterialDAL().GetListTo(condition); + + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + } + + return new List(); + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListRaw(RawMaterial condition) + { + try + { + return new RawMaterialDAL().GetListRaw(condition); + + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + } + + return new List(); + } + + /// + /// 获取列表 + /// + /// 条件 + /// 全部集合 + public DataPage GetAllList(RawMaterial condition,DataPage page) + { + try + { + //获取信息列表 + DataPage list = new RawMaterialDAL().GetList(condition, page); + return list; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + throw ex; + } + } + + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(RawMaterial info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = info.CREATEUSER; + info.UPDATEDATE = info.CREATEDATE; + info.IsCheck = "0"; + RawMaterialDAL cmdDAL = new RawMaterialDAL(); + result.Result = cmdDAL.Insert(info); + result.IsSuccess = true; + result.Msg = "保存成功"; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult Update(RawMaterial model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + result.Msg = "更新成功!"; + try + { + RawMaterial info = new RawMaterialDAL().Get(model); + + //基本信息 + info.IsCheck = model.IsCheck; + info.BucketCode = model.BucketCode; + info.BatchCode = model.BatchCode; + info.PartCode = model.PartCode; + info.SerialCode = model.SerialCode; + info.CREATEUSER = model.CREATEUSER; + info.CREATEDATE = model.CREATEDATE; + info.UPDATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = this.LoginUser.UserID; + int temp = new RawMaterialDAL().Update(info); + + if (temp == 0) + { + result.IsSuccess = false; + result.Msg = "更新失败!"; + return result; + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "更新异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "更新异常"; + } + return result; + } + #endregion + + #region 删除 + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int Delete(string model) + { + int count = 0; + try + { + count = new RawMaterialRecordDAL().GetMaterialCodeCount(model); + if (count <= 0) + { + count = new RawMaterialDAL().Delete(model); + return count; + } + else + + return 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/b0/b0eef475a1df530e28c3fd228b87167e22961335.svn-base b/.svn/pristine/b0/b0eef475a1df530e28c3fd228b87167e22961335.svn-base new file mode 100644 index 0000000..da8ac7e --- /dev/null +++ b/.svn/pristine/b0/b0eef475a1df530e28c3fd228b87167e22961335.svn-base @@ -0,0 +1,906 @@ + + + + EpidermisBLL + 表皮查询 + QMAPP.FJC.BLL.FeedInManage.EpidermisBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialCodeBLL + 物料号查询 + QMAPP.FJC.BLL.Operation.MaterialCodeBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.DLL + + + + + + FISOrderBLL + FIS计划查询 + QMAPP.FJC.BLL.FIS.FISOrderBLL + QMAPP.FJC.BLL.DLL + + + + + + OrderPlanBLL + 注塑管理计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + DashBoardPlanBLL + 仪表板计划 + QMAPP.FJC.BLL.FIS.DashBoardPlanBLL + QMAPP.FJC.BLL.DLL + + + + + DoorPlankPlanBLL + 门板计划 + QMAPP.FJC.BLL.FIS.DoorPlankPlanBLL + QMAPP.FJC.BLL.DLL + + + + + FrmPlaceBLL + 发运模块 + QMAPP.FJC.BLL.FrmPlace.FrmPlaceBLL + QMAPP.FJC.BLL.DLL + + + + StocktakingBLL + 库存盘点 + QMAPP.FJC.BLL.Stocktaking.StocktakingBLL + QMAPP.FJC.BLL.DLL + + + + + FISOrderSendBLL + FIS订单发货信息 + QMAPP.FJC.BLL.FIS.FISOrderSendBLL + QMAPP.FJC.BLL.DLL + + + + + OrderPlanBLL + 订单生产计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + + + + + + + + + + UnQualityProductBLL + 不合格品数量 + QMAPP.FJC.BLL.Basic.UnQualityProductBLL + QMAPP.FJC.BLL.DLL + + + + WorkCenterBLL + 工作中心信息 + QMAPP.FJC.BLL.Basic.WorkCenterBLL + QMAPP.FJC.BLL.DLL + + + + CapacityBLL + 班次产能 + QMAPP.FJC.BLL.Basic.CapacityBLL + QMAPP.FJC.BLL.DLL + + + + + ProcessRouteBLL + 工艺路线 + QMAPP.FJC.BLL.Basic.ProcessRouteBLL + QMAPP.FJC.BLL.DLL + + + + BomHdrBLL + Bom信息维护 + QMAPP.FJC.BLL.Basic.BomHdrBLL + QMAPP.FJC.BLL.DLL + + + + MaterielBLL + 物料号信息 + QMAPP.FJC.BLL.Basic.MaterielBLL + QMAPP.FJC.BLL.DLL + + + + + MaterielVersionBLL + 物料类型信息 + QMAPP.FJC.BLL.Basic.MaterielVersionBLL + QMAPP.FJC.BLL.DLL + + + + + MachineInfoBLL + 设备信息 + QMAPP.FJC.BLL.Basic.MachineInfoBLL + QMAPP.FJC.BLL.DLL + + + + MachineInfoModelBLL + 设备模具信息 + QMAPP.FJC.BLL.Basic.MachineInfoModelBLL + QMAPP.FJC.BLL.DLL + + + + MouldBLL + 模具信息 + QMAPP.FJC.BLL.Equipment.MouldBLL + QMAPP.FJC.BLL.DLL + + + + ProduceShiftBLL + 班次信息 + QMAPP.FJC.BLL.Basic.ProduceShiftBLL + QMAPP.FJC.BLL.DLL + + + + ProductCodeIdentityBLL + 零件条码标识 + QMAPP.FJC.BLL.Basic.ProductCodeIdentityBLL + QMAPP.FJC.BLL.DLL + + + + OperatorInfoBLL + 操作员 + QMAPP.FJC.BLL.Basic.OperatorInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessInfoBLL + 工序名称 + QMAPP.FJC.BLL.Basic.ProcessInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessSetBLL + 工序设置 + QMAPP.FJC.BLL.Basic.ProcessSetBLL + QMAPP.FJC.BLL.DLL + + + + ProcessRuleBLL + 工序先决条件 + QMAPP.FJC.BLL.Basic.ProcessRuleBLL + QMAPP.FJC.BLL.DLL + + + + ProcessParameterBLL + 加工参数标准值设定 + QMAPP.FJC.BLL.Basic.ProcessParameterBLL + QMAPP.FJC.BLL.DLL + + + + ProductMderuleBLL + 投料配置规则 + QMAPP.FJC.BLL.Basic.ProductMderuleBLL + QMAPP.FJC.BLL.DLL + + + + MaterialShelfTypeBLL + 物料架类型维护 + QMAPP.FJC.BLL.Basic.MaterialShelfTypeBLL + QMAPP.FJC.BLL.DLL + + + + + InjectionRecorderBLL + 注塑投料记录 + QMAPP.FJC.BLL.Injection.InjectionRecorderBLL + QMAPP.FJC.BLL.DLL + + + + SlushRecorderBLL + 搪塑投料记录 + QMAPP.FJC.BLL.Injection.SlushRecorderBLL + QMAPP.FJC.BLL.DLL + + + + PouringRecorderBLL + 浇注投料记录 + QMAPP.FJC.BLL.Injection.PouringRecorderBLL + QMAPP.FJC.BLL.DLL + + + + ProductBLL + 零件条码 + QMAPP.FJC.BLL.Operation.ProductBLL + QMAPP.FJC.BLL.DLL + + + + ProductBasicBLL + 零件类别 + QMAPP.FJC.BLL.Basic.ProductBasicBLL + QMAPP.FJC.BLL.DLL + + + + ProductInfoBLL + 零件号 + QMAPP.FJC.BLL.Basic.ProductInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProductAttributeBLL + 零件条码属性 + QMAPP.FJC.BLL.Operation.ProductAttributeBLL + QMAPP.FJC.BLL.DLL + + + + EquipmentMaintainBLL + 设备停机维护 + QMAPP.FJC.BLL.Equipment.EquipmentMaintainBLL + QMAPP.FJC.BLL.DLL + + + + + ProductInjectionBLL + 投料与零件关联 + QMAPP.FJC.BLL.Operation.ProductInjectionBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanInfoBLL + 贴车单记录 + QMAPP.FJC.BLL.SendPlan.SendPlanInfoBLL + QMAPP.FJC.BLL.DLL + + + + MainBLL + 加工本体 + QMAPP.FJC.BLL.Operation.MainBLL + QMAPP.FJC.BLL.DLL + + + + ProductEndBLL + 成品查询 + QMAPP.FJC.BLL.Operation.ProductEndBLL + QMAPP.FJC.BLL.DLL + + + + MainProductBLL + 主体与零件关联关系 + QMAPP.FJC.BLL.Operation.MainProductBLL + QMAPP.FJC.BLL.DLL + + + + SPCControlBLL + SPC监控 + QMAPP.FJC.BLL.IPC.SPCControlBLL + QMAPP.FJC.BLL.DLL + + + + ProducePlanBLL + 生产记录维护 + QMAPP.FJC.BLL.ProduceManage.ProducePlanBLL + QMAPP.FJC.BLL.DLL + + + + UnQualityBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.UnQualityBLL + QMAPP.FJC.BLL.DLL + + + + MainOperationBLL + 加工查询 + QMAPP.FJC.BLL.Operation.MainOperationBLL + QMAPP.FJC.BLL.DLL + + + + ProductArchivesBLL + 产品档案 + QMAPP.FJC.BLL.ProductPetrospect.ProductArchivesBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentAlarmBLL + 设备报警维护 + QMAPP.FJC.BLL.WarnManage.EquipMentAlarmBLL + QMAPP.FJC.BLL.DLL + + + + WarnManageBLL + 自动报警维护 + QMAPP.FJC.BLL.WarnManage.WarnManageBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentMaintainSearchBLL + 设备停机记录 + QMAPP.FJC.BLL.WarnManage.EquipMentMaintainSearchBLL + QMAPP.FJC.BLL.DLL + + + + StorageAlarmBLL + 低储报警信息 + QMAPP.FJC.BLL.WIPManage.StorageAlarmBLL + QMAPP.FJC.BLL.DLL + + + + DetentionBLL + 滞留品查询 + QMAPP.FJC.BLL.WIPManage.DetentionBLL + QMAPP.FJC.BLL.DLL + + + + + + MendRecorderBLL + 返修记录 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + + MainProductCountBLL + 成品数量查询 + QMAPP.FJC.BLL.Operation.MainProductCountBLL + QMAPP.FJC.BLL.dll + + + + WIPInventoryBLL + 在制品库存 + QMAPP.FJC.BLL.WIPManage.WIPInventoryBLL + QMAPP.FJC.BLL.DLL + + + WIPInRecorderBLL + 在制品入库信息 + QMAPP.FJC.BLL.WIPManage.WIPInRecorderBLL + QMAPP.FJC.BLL.DLL + + + WIPOutRecorderBLL + 在制品出库信息 + QMAPP.FJC.BLL.WIPManage.WIPOutRecorderBLL + QMAPP.FJC.BLL.DLL + + + + WIPProductCountBLL + 在制品数量查询 + QMAPP.FJC.BLL.WIPManage.WIPProductCountBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanRecordBLL + 贴车单查询 + QMAPP.FJC.BLL.SendManage.SendPlanRecordBLL + QMAPP.FJC.BLL.DLL + + + FISInfoBLL + FIS M100生产信息查询 + QMAPP.FJC.BLL.FIS.FISInfoBLL + QMAPP.FJC.BLL.DLL + + + CheckWipBLL + 定时查询在制品库存 + QMAPP.FJC.BLL.WipService.CheckWipBLL + QMAPP.FJC.BLL.DLL + + + + FisBLL + 返修记录 + QMAPP.FJC.BLL.FIS.FisBLL + QMAPP.FJC.BLL.DLL + + + + + ScrapRecordBLL + 报废记录 + QMAPP.FJC.BLL.ProduceManage.ScrapRecordBLL + QMAPP.FJC.BLL.DLL + + + + OutWarehouseBLL + FISM100接口 + QMAPP.FJC.BLL.WarehouseManage.OutWarehouseBLL + QMAPP.FJC.BLL.DLL + + + InWarehouseBLL + 入库操作 + QMAPP.FJC.BLL.WarehouseManage.InWarehouseBLL + QMAPP.FJC.BLL.DLL + + + + FileCopyRecordBLL + 文件复制 + QMAPP.FJC.BLL.FileCopy.FileCopyRecordBLL + QMAPP.FJC.BLL.DLL + + + + MoldConfigBLL + 模具配置信息 + QMAPP.FJC.BLL.Basic.MoldConfigBLL + QMAPP.FJC.BLL.DLL + + + + MoldSetBLL + 模腔配置信息 + QMAPP.FJC.BLL.Basic.MoldSetBLL + QMAPP.FJC.BLL.DLL + + + + CastCounterBLL + 模腔配置信息 + QMAPP.FJC.BLL.Operation.CastCounterBLL + QMAPP.FJC.BLL.DLL + + + + InjectionCheckBLL + 注塑查验信息 + QMAPP.FJC.BLL.Operation.InjectionCheckBLL + QMAPP.FJC.BLL.DLL + + + + DefectTypeBLL + 缺陷类型 + QMAPP.FJC.BLL.ProduceManage.DefectTypeBLL + QMAPP.FJC.BLL.DLL + + + + PrintModelCopyBLL + 获取打印模板 + QMAPP.FJC.BLL.Basic.PrintModelCopyBLL + QMAPP.FJC.BLL.DLL + + + + CompleteStatisticsBLL + 完工统计Business + QMAPP.FJC.BLL.CompleteStatistics.CompleteStatisticsBLL + QMAPP.FJC.BLL.DLL + + + + ShipmentMonitorBLL + 发运看板 + QMAPP.FJC.BLL.Monitor.ShipmentMonitorBLL + QMAPP.FJC.BLL.DLL + + + + LineDWQTYCountBLL + 生产日报 + QMAPP.MESReport.BLL.LineQTY.LineDWQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + LineShiftQTYCountBLL + 班次对比分析 + QMAPP.MESReport.BLL.LineQTY.LineShiftQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + ShipmentCountBLL + 生产发运统计 + QMAPP.MESReport.BLL.LineQTY.ShipmentCountBLL + QMAPP.MESReport.BLL.DLL + + + + StandardRateCountBLL + 合格率分析 + QMAPP.MESReport.BLL.LineQTY.StandardRateCountBLL + QMAPP.MESReport.BLL.DLL + + + DAIBLL + 完工统计Business + QMAPP.FJC.BLL.QT.DAIBLL + QMAPP.FJC.BLL.DLL + + + BarcodeRulesBLL + 条码规则数据服务 + QMAPP.FJC.BLL.Basic.BarcodeRulesBLL + QMAPP.FJC.BLL.dll + + + DAI + 条码规则数据服务 + QMAPP.FJC.TRACING.DAHandler.DataAcquirer + QMAPP.FJC.TRACING.dll + + + DAICacheBLL + 采集缓存数据服务 + QMAPP.FJC.BLL.QT.DAICacheBLL + QMAPP.FJC.BLL.dll + + + DAIValidationBLL + 采集校验服务 + QMAPP.FJC.BLL.QT.DAIValidationBLL + QMAPP.FJC.BLL.dll + + + MeterReadingsBLL + 设备能耗统计 + QMAPP.FJC.BLL.EnergyManage.MeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + QTYInfoCountBLL + 生产统计 + QMAPP.MESReport.BLL.LineQTY.QTYInfoCountBLL + QMAPP.MESReport.BLL.DLL + + + + EmMeterReadingsBLL + 能源统计 + QMAPP.FJC.BLL.EM.EmMeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + MeterBLL + 能源表维护 + QMAPP.FJC.BLL.EnergyManage.MeterBLL + QMAPP.FJC.BLL.DLL + + + + mbM100BLL + 门板FIS数据获取 + QMAPP.FJC.BLL.QdFis.mbM100BLL + QMAPP.FJC.BLL.DLL + + + + ybbM100BLL + 仪表板FIS数据获取 + QMAPP.FJC.BLL.QdFis.ybbM100BLL + QMAPP.FJC.BLL.DLL + + + + QTYCompletionRateBLL + 生产完成率分析 + QMAPP.MESReport.BLL.LineQTY.QTYCompletionRateBLL + QMAPP.MESReport.BLL.DLL + + + + WorkOrderBLL + 派工单 + QMAPP.FJC.BLL.ProductionPlan.WorkOrderBLL + QMAPP.FJC.BLL.dll + + + + + WasteRateCountBLL + 废品率统计 + QMAPP.MESReport.BLL.LineQTY.WasteRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + ProduceCycleTimeBLL + 节拍统计 + QMAPP.MESReport.BLL.LineQTY.ProduceCycleTimeBLL + QMAPP.MESReport.BLL.DLL + + + + RepairRateCountBLL + 返修率统计 + QMAPP.MESReport.BLL.LineQTY.RepairRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + EquConsumeCountBLL + 设备用电分析 + QMAPP.MESReport.BLL.LineQTY.EquConsumeCountBLL + QMAPP.MESReport.BLL.DLL + + + + EqueUseCountBLL + 设备利用率分析 + QMAPP.MESReport.BLL.LineQTY.EqueUseCountBLL + QMAPP.MESReport.BLL.DLL + + + + AnDongCallBLL + 安东呼叫统计 + QMAPP.MESReport.BLL.LineQTY.AnDongCallBLL + QMAPP.MESReport.BLL.DLL + + + + + ProcessRecordBLL + 加工记录 + QMAPP.FJC.BLL.QT.ProcessRecordBLL + QMAPP.FJC.BLL.dll + + + + VideoInfoBLL + 视频播放 + QMAPP.FJC.BLL.ODS.VideoInfoBLL + QMAPP.FJC.BLL.DLL + + + + VideoTypeBLL + 视频类型 + QMAPP.FJC.BLL.ODS.VideoTypeBLL + QMAPP.FJC.BLL.DLL + + + + AndonCallBLL + 安东呼叫 + QMAPP.FJC.BLL.Andon.AndonCallBLL + QMAPP.FJC.BLL.DLL + + + + MachineCheckBLL + 设备点检 + QMAPP.FJC.BLL.MachineCheck.MachineCheckBLL + QMAPP.FJC.BLL.DLL + + + + UsageLogBLL + 模具统计 + QMAPP.FJC.BLL.Equipment.UsageLogBLL + QMAPP.FJC.BLL.DLL + + + + TempProductBLL + 模具资料获取 + QMAPP.FJC.BLL.Equipment.TempProductBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentRecordBLL + 设备维修记录 + QMAPP.FJC.BLL.Equipment.EquipMentRecordBLL + QMAPP.FJC.BLL.DLL + + + + ProductOutBLL + 出库 + QMAPP.FJC.BLL.Operation.ProductOutBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库查询 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.dll + + + + MaterialBindingBLL + 物料信息绑定关系 + QMAPP.FJC.BLL.QT.MaterialBindingBLL + QMAPP.FJC.BLL.dll + + + + AnalyzerBLL + 解析类别 + QMAPP.FJC.BLL.QT.AnalyzerBLL + QMAPP.FJC.BLL.dll + + + + + ProductCheckBLL + 抽检 + QMAPP.FJC.BLL.Operation.ProductCheckBLL + QMAPP.FJC.BLL.dll + + + + PackageBLL + 线边库存大屏显示 + QMAPP.FJC.BLL.Package.PackageBLL + QMAPP.FJC.BLL.dll + + + + MainCodeChangeBLL + 总成条码替换 + QMAPP.FJC.BLL.Operation.MainCodeChangeBLL + QMAPP.FJC.BLL.DLL + + + + MendRecorderBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + FISPhraseBLL + FIS短语字典 + QMAPP.FJC.BLL.FIS.FISPhraseBLL + QMAPP.FJC.BLL.DLL + + + LeakInspectRecordBLL + 漏装检测记录 + QMAPP.FJC.BLL.InterfaceData.LeakInspectRecordBLL + QMAPP.FJC.BLL.DLL + + + AppConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.AppConfigBLL + QMAPP.FJC.BLL.DLL + + + PbomItemBLL + BOM明细 + QMAPP.FJC.BLL.Operation.PbomItemBLL + QMAPP.FJC.BLL.DLL + + + ScanIPConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.ScanIPConfigBLL + QMAPP.FJC.BLL.DLL + + + aterialBomConfigBLLBLL + 配置表 + QMAPP.FJC.BLL.Basic.aterialBomConfigBLLBLL + QMAPP.FJC.BLL.DLL + + + + + BZDConfigBLL + BZD配置 + QMAPP.FJC.BLL.BZD.BZDConfigBLL + QMAPP.FJC.BLL.DLL + + + + BZDRecorderBLL + BZD记录 + QMAPP.FJC.BLL.BZD.BZDRecorderBLL + QMAPP.FJC.BLL.DLL + + + + BarCodeReplacementBLL + 补打记录 + QMAPP.FJC.BLL.BZD.BarCodeReplacementBLL + QMAPP.FJC.BLL.DLL + + + + CHECKTIMEBLL + 时间验证 + QMAPP.FJC.BLL.CheckTime.CHECKTIMEBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialBomConfigBLL + 时间验证 + QMAPP.FJC.BLL.Basic.MaterialBomConfigBLL + QMAPP.FJC.BLL.DLL + + + \ No newline at end of file diff --git a/.svn/pristine/b1/b161e0c1c23081cbe981ec3e18e5c162b7493b64.svn-base b/.svn/pristine/b1/b161e0c1c23081cbe981ec3e18e5c162b7493b64.svn-base new file mode 100644 index 0000000..0ba7df3 --- /dev/null +++ b/.svn/pristine/b1/b161e0c1c23081cbe981ec3e18e5c162b7493b64.svn-base @@ -0,0 +1,37 @@ +using System; +using System.Windows.Forms; + +//using Ionic.Zip; + + +namespace QMAPP.WinForm +{ + public partial class FormFoundUpdate : Form + { + + public FormFoundUpdate(string desc) + { + InitializeComponent(); + txtDesc.Text = desc; + } + + + + + private void btnCancel_Click(object sender, EventArgs e) + { + Close(); + } + + private void FormAutoUpdate_Load(object sender, EventArgs e) + { + + } + + private void btnOk_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + } +} diff --git a/.svn/pristine/b2/b2383132924c5cd8ca0b655bde66fd67457d9c8c.svn-base b/.svn/pristine/b2/b2383132924c5cd8ca0b655bde66fd67457d9c8c.svn-base new file mode 100644 index 0000000..c47359f --- /dev/null +++ b/.svn/pristine/b2/b2383132924c5cd8ca0b655bde66fd67457d9c8c.svn-base @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.Data; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace QMAPP.WinForm +{ + public class JsonHelper + { + + public static T ReadConfigFromFile(string fileName) where T : new() + { + var t = new T(); + var strData = FileHelper.ReadFile(fileName); + try + { + t = JsonConvert.DeserializeObject(strData); + } + catch (Exception ex) + { + MessageHelper.ShowError($"配置文件{fileName}错误,请重新配置!{Environment.NewLine}{ex.Message}"); + } + return t; + } + + public static void WriteConfigToFile(string fileName, T t) where T : new() + { + var strData = JsonConvert.SerializeObject(t, Formatting.Indented); + // MessageHelper.ShowInfo(strConfig); + FileHelper.WriteFile(fileName, strData); + + } + + private const string Format = "yyyy-MM-dd HH:mm:ss"; + public static string EntityToJsonSingle(T t) + { + var timeFormat = new IsoDateTimeConverter { DateTimeFormat = Format }; + var strJson = JsonConvert.SerializeObject(t, Formatting.None, timeFormat); + return strJson; + } + + public static string EntityToJson(T t) + { + + var list = new List { t }; + var strJson = ListToJson(list); + return strJson; + } + + public static T JsonToEntity(string strJson) + { + T t; + try + { + var list = JsonToList(strJson); + t = list[0]; + } + catch + { + t = JsonConvert.DeserializeObject(strJson); + } + return t; + } + + public static string ListToJson(List list) + { + var timeFormat = new IsoDateTimeConverter { DateTimeFormat = Format }; + var strJson = JsonConvert.SerializeObject(list, Formatting.None, timeFormat); + return strJson; + } + + public static List JsonToList(string strJson) + { + var list = JsonConvert.DeserializeObject>(strJson); + return list; + } + + public static string DataSetToJson(DataSet ds) + { + var strJson = ""; + + strJson = JsonConvert.SerializeObject(ds, Formatting.Indented); + + return strJson; + } + + public static DataSet JsonToDataSet(string strJson) + { + var ds = new DataSet(); + + ds = JsonConvert.DeserializeObject(strJson); + + return ds; + } + + } +} diff --git a/.svn/pristine/b2/b27db67faa4f3a69602b13631d054874f6003631.svn-base b/.svn/pristine/b2/b27db67faa4f3a69602b13631d054874f6003631.svn-base new file mode 100644 index 0000000..68bf50f --- /dev/null +++ b/.svn/pristine/b2/b27db67faa4f3a69602b13631d054874f6003631.svn-base @@ -0,0 +1,494 @@ +namespace QMAPP.WinForm.Forms.Operation +{ + partial class MainOperationStaticForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainOperationStaticForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.panelSearch = new System.Windows.Forms.Panel(); + this.comMinuteEnd = new System.Windows.Forms.ComboBox(); + this.comHourEnd = new System.Windows.Forms.ComboBox(); + this.comMinuteStart = new System.Windows.Forms.ComboBox(); + this.comHourStart = new System.Windows.Forms.ComboBox(); + this.dpOpeEnd = new System.Windows.Forms.DateTimePicker(); + this.dpOpeStart = new System.Windows.Forms.DateTimePicker(); + this.label1 = new System.Windows.Forms.Label(); + this.lblOperateDate = new System.Windows.Forms.Label(); + this.lblSearchTitle = new System.Windows.Forms.Label(); + this.panelSearchTitle = new System.Windows.Forms.Panel(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSearch = new System.Windows.Forms.ToolStripButton(); + this.tbtnSearch = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.DGData = new System.Windows.Forms.DataGridView(); + this.model = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.materialName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.materialCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.color = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panel3 = new System.Windows.Forms.Panel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.panelSearch.SuspendLayout(); + this.panelSearchTitle.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGData)).BeginInit(); + this.panel3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.SuspendLayout(); + // + // panelSearch + // + this.panelSearch.BackColor = System.Drawing.SystemColors.InactiveBorder; + this.panelSearch.Controls.Add(this.comMinuteEnd); + this.panelSearch.Controls.Add(this.comHourEnd); + this.panelSearch.Controls.Add(this.comMinuteStart); + this.panelSearch.Controls.Add(this.comHourStart); + this.panelSearch.Controls.Add(this.dpOpeEnd); + this.panelSearch.Controls.Add(this.dpOpeStart); + this.panelSearch.Controls.Add(this.label1); + this.panelSearch.Controls.Add(this.lblOperateDate); + this.panelSearch.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearch.Location = new System.Drawing.Point(0, 105); + this.panelSearch.Name = "panelSearch"; + this.panelSearch.Size = new System.Drawing.Size(964, 60); + this.panelSearch.TabIndex = 9; + // + // comMinuteEnd + // + this.comMinuteEnd.FormattingEnabled = true; + this.comMinuteEnd.Items.AddRange(new object[] { + "0", + "5", + "10", + "15", + "20", + "25", + "30", + "35", + "40", + "45", + "50", + "55"}); + this.comMinuteEnd.Location = new System.Drawing.Point(502, 16); + this.comMinuteEnd.Name = "comMinuteEnd"; + this.comMinuteEnd.Size = new System.Drawing.Size(40, 25); + this.comMinuteEnd.TabIndex = 9; + // + // comHourEnd + // + this.comHourEnd.FormattingEnabled = true; + this.comHourEnd.Items.AddRange(new object[] { + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23"}); + this.comHourEnd.Location = new System.Drawing.Point(459, 16); + this.comHourEnd.Name = "comHourEnd"; + this.comHourEnd.Size = new System.Drawing.Size(40, 25); + this.comHourEnd.TabIndex = 8; + // + // comMinuteStart + // + this.comMinuteStart.FormattingEnabled = true; + this.comMinuteStart.Items.AddRange(new object[] { + "0", + "5", + "10", + "15", + "20", + "25", + "30", + "35", + "40", + "45", + "50", + "55"}); + this.comMinuteStart.Location = new System.Drawing.Point(259, 16); + this.comMinuteStart.Name = "comMinuteStart"; + this.comMinuteStart.Size = new System.Drawing.Size(40, 25); + this.comMinuteStart.TabIndex = 7; + // + // comHourStart + // + this.comHourStart.FormattingEnabled = true; + this.comHourStart.Items.AddRange(new object[] { + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23"}); + this.comHourStart.Location = new System.Drawing.Point(216, 16); + this.comHourStart.Name = "comHourStart"; + this.comHourStart.Size = new System.Drawing.Size(40, 25); + this.comHourStart.TabIndex = 6; + // + // dpOpeEnd + // + this.dpOpeEnd.CalendarFont = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dpOpeEnd.Location = new System.Drawing.Point(334, 17); + this.dpOpeEnd.Name = "dpOpeEnd"; + this.dpOpeEnd.Size = new System.Drawing.Size(120, 23); + this.dpOpeEnd.TabIndex = 5; + // + // dpOpeStart + // + this.dpOpeStart.CalendarFont = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dpOpeStart.Location = new System.Drawing.Point(85, 17); + this.dpOpeStart.Name = "dpOpeStart"; + this.dpOpeStart.Size = new System.Drawing.Size(125, 23); + this.dpOpeStart.TabIndex = 4; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(304, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(24, 20); + this.label1.TabIndex = 0; + this.label1.Text = "至"; + // + // lblOperateDate + // + this.lblOperateDate.AutoSize = true; + this.lblOperateDate.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblOperateDate.Location = new System.Drawing.Point(15, 18); + this.lblOperateDate.Name = "lblOperateDate"; + this.lblOperateDate.Size = new System.Drawing.Size(69, 20); + this.lblOperateDate.TabIndex = 0; + this.lblOperateDate.Text = "操作时间"; + // + // lblSearchTitle + // + this.lblSearchTitle.AutoSize = true; + this.lblSearchTitle.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSearchTitle.Location = new System.Drawing.Point(15, 7); + this.lblSearchTitle.Name = "lblSearchTitle"; + this.lblSearchTitle.Size = new System.Drawing.Size(69, 20); + this.lblSearchTitle.TabIndex = 0; + this.lblSearchTitle.Text = "查询条件"; + // + // panelSearchTitle + // + this.panelSearchTitle.BackColor = System.Drawing.SystemColors.ScrollBar; + this.panelSearchTitle.Controls.Add(this.lblSearchTitle); + this.panelSearchTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearchTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearchTitle.Location = new System.Drawing.Point(0, 70); + this.panelSearchTitle.Name = "panelSearchTitle"; + this.panelSearchTitle.Size = new System.Drawing.Size(964, 35); + this.panelSearchTitle.TabIndex = 8; + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Font = new System.Drawing.Font("宋体", 9F); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSearch, + this.tbtnSearch, + this.toolStripButton1, + this.toolStripButton2}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0); + this.toolStrip1.Size = new System.Drawing.Size(964, 70); + this.toolStrip1.TabIndex = 7; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSearch + // + this.tsbSearch.AutoSize = false; + this.tsbSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSearch.Image = ((System.Drawing.Image)(resources.GetObject("tsbSearch.Image"))); + this.tsbSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSearch.Name = "tsbSearch"; + this.tsbSearch.Size = new System.Drawing.Size(100, 60); + this.tsbSearch.Text = "查询"; + this.tsbSearch.Click += new System.EventHandler(this.tsbSearch_Click); + // + // tbtnSearch + // + this.tbtnSearch.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tbtnSearch.AutoSize = false; + this.tbtnSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tbtnSearch.Image = ((System.Drawing.Image)(resources.GetObject("tbtnSearch.Image"))); + this.tbtnSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tbtnSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tbtnSearch.Name = "tbtnSearch"; + this.tbtnSearch.Size = new System.Drawing.Size(140, 60); + this.tbtnSearch.Text = "返回加工"; + this.tbtnSearch.Visible = false; + this.tbtnSearch.Click += new System.EventHandler(this.tbtnSearch_Click); + // + // toolStripButton1 + // + this.toolStripButton1.AutoSize = false; + this.toolStripButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.toolStripButton1.Image = global::QMAPP.WinForm.Resource1.cancle; + this.toolStripButton1.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton1.Name = "toolStripButton1"; + this.toolStripButton1.Size = new System.Drawing.Size(100, 60); + this.toolStripButton1.Text = "关闭"; + this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); + // + // toolStripButton2 + // + this.toolStripButton2.AutoSize = false; + this.toolStripButton2.Font = new System.Drawing.Font("微软雅黑", 12F); + this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); + this.toolStripButton2.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(200, 60); + this.toolStripButton2.Text = "回冲数据查询"; + this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); + // + // DGData + // + this.DGData.AllowUserToAddRows = false; + this.DGData.AllowUserToDeleteRows = false; + this.DGData.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.DGData.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.DGData.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.model, + this.materialName, + this.materialCode, + this.color, + this.count}); + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.DefaultCellStyle = dataGridViewCellStyle7; + this.DGData.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGData.Location = new System.Drawing.Point(0, 0); + this.DGData.Name = "DGData"; + this.DGData.ReadOnly = true; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGData.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.DGData.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; + this.DGData.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGData.RowTemplate.Height = 23; + this.DGData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGData.Size = new System.Drawing.Size(964, 229); + this.DGData.TabIndex = 11; + this.DGData.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.DGData_RowPostPaint); + // + // model + // + this.model.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.model.DataPropertyName = "模具"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.model.DefaultCellStyle = dataGridViewCellStyle2; + this.model.FillWeight = 110.2359F; + this.model.HeaderText = "模具"; + this.model.Name = "model"; + this.model.ReadOnly = true; + // + // materialName + // + this.materialName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; + this.materialName.DataPropertyName = "零件名称"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.materialName.DefaultCellStyle = dataGridViewCellStyle3; + this.materialName.FillWeight = 104.0609F; + this.materialName.HeaderText = "零件名称"; + this.materialName.Name = "materialName"; + this.materialName.ReadOnly = true; + this.materialName.Width = 101; + // + // materialCode + // + this.materialCode.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.materialCode.DataPropertyName = "零件号"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.materialCode.DefaultCellStyle = dataGridViewCellStyle4; + this.materialCode.FillWeight = 136.4285F; + this.materialCode.HeaderText = "零件号"; + this.materialCode.Name = "materialCode"; + this.materialCode.ReadOnly = true; + // + // color + // + this.color.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.color.DataPropertyName = "颜色"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.color.DefaultCellStyle = dataGridViewCellStyle5; + this.color.FillWeight = 72.74867F; + this.color.HeaderText = "颜色"; + this.color.Name = "color"; + this.color.ReadOnly = true; + // + // count + // + this.count.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.count.DataPropertyName = "加工数量"; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.count.DefaultCellStyle = dataGridViewCellStyle6; + this.count.FillWeight = 76.52604F; + this.count.HeaderText = "数量"; + this.count.Name = "count"; + this.count.ReadOnly = true; + // + // panel3 + // + this.panel3.Controls.Add(this.DGData); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 165); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(964, 229); + this.panel3.TabIndex = 14; + // + // MainOperationStaticForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.ClientSize = new System.Drawing.Size(964, 394); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panelSearch); + this.Controls.Add(this.panelSearchTitle); + this.Controls.Add(this.toolStrip1); + this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.Name = "MainOperationStaticForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "加工统计"; + this.TopMost = true; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.MainOperationStaticForm_Load); + this.panelSearch.ResumeLayout(false); + this.panelSearch.PerformLayout(); + this.panelSearchTitle.ResumeLayout(false); + this.panelSearchTitle.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGData)).EndInit(); + this.panel3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelSearch; + private System.Windows.Forms.Label lblSearchTitle; + private System.Windows.Forms.Panel panelSearchTitle; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tbtnSearch; + private System.Windows.Forms.Label lblOperateDate; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ToolStripButton tsbSearch; + private System.Windows.Forms.DataGridView DGData; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.DateTimePicker dpOpeStart; + private System.Windows.Forms.BindingSource bindingSource1; + private System.Windows.Forms.DateTimePicker dpOpeEnd; + private System.Windows.Forms.ComboBox comMinuteEnd; + private System.Windows.Forms.ComboBox comHourEnd; + private System.Windows.Forms.ComboBox comMinuteStart; + private System.Windows.Forms.ComboBox comHourStart; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.DataGridViewTextBoxColumn model; + private System.Windows.Forms.DataGridViewTextBoxColumn materialName; + private System.Windows.Forms.DataGridViewTextBoxColumn materialCode; + private System.Windows.Forms.DataGridViewTextBoxColumn color; + private System.Windows.Forms.DataGridViewTextBoxColumn count; + private System.Windows.Forms.ToolStripButton toolStripButton2; + } +} \ No newline at end of file diff --git a/.svn/pristine/b2/b2c4d27ddbf461deb8bfef9fc16d3b919b9c5ba0.svn-base b/.svn/pristine/b2/b2c4d27ddbf461deb8bfef9fc16d3b919b9c5ba0.svn-base new file mode 100644 index 0000000..c06857d --- /dev/null +++ b/.svn/pristine/b2/b2c4d27ddbf461deb8bfef9fc16d3b919b9c5ba0.svn-base @@ -0,0 +1,1389 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI.DataSource; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Web.Models.FeedInManage; +using QMAPP.Common.Web.Controllers; +using QMAPP.FJC.Entity.Injection; +using QMAPP.Entity; +using System.Data; +using QMAPP.FJC.Entity.ProduceManage; +using QMAPP.MD.Entity; +using Corp = QMAPP.FJC.Entity.Basic.Corp; +using ProcessRoute = QMAPP.FJC.Entity.Basic.ProcessRoute; +using WorkCell = QMAPP.MD.Entity.WorkCell; +using WorkLoc = QMAPP.MD.Entity.WorkLoc; +using QMAPP.FJC.Entity.FIS; +using QMAPP.FJC.Entity.FileCopy.FIS; +using QMAPP.MD.BLL.Dict; +using QMAPP.FJC.Entity.Basic; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.Web.Controllers +{ + public class DictController : QController + { + public string EmptyItemTitle = " "; + + #region 注塑投料--物料绑定 + + + public ActionResult GetMaterialTreeClass() + { + try + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + List trees = new List(); + trees.Add(new CombotreeItem { id = "", text = this.EmptyItemTitle }); + + var materialResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material()); + + MaterialClass materialclass = new MaterialClass(); + materialclass.MaterialAttributes = "('1','')"; + var classresult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", materialclass).Result; + foreach (MaterialClass item in classresult.Where(p => string.IsNullOrWhiteSpace(p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = item.MATERIAL_TYPE_CODE, text = item.MATERIAL_TYPE_NAME, children = new List() }; + + AppendTree(subnode, classresult, materialResult); + if (subnode.children.Count > 0) + { + trees.Add(subnode); + } + } + return Json(trees); + } + catch (Exception ex) + { + throw ex; + } + } + + + #endregion + + #region 获取料筒下拉列表 + /// + /// 获取公司下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetBucketCodeComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("BucketInfoBLL_GetAllList"); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (BucketInfo item in dataResult) + { + model.Add(new ComboboxItem { ID = item.BucketCode, Text = item.BucketCode + "/" + item.BucketName }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取组织结构下拉列表数据源 + /// + /// 获取组织结构下拉列表数据源 + /// + /// 数据源 + [HandleException] + public ActionResult GetFixedComboxSource() + { + string kind = Request.Params["kind"]; + //单雨春 是否带空项 2014年9月26日 + bool isWithEmpty = string.IsNullOrEmpty(Request.Params["WithEmpty"]) ? true : false; + Dictionary dicts = null; + try + { + ComboboxResult model = new ComboboxResult(); + + //单雨春 是否带空项 2014年9月26日 + if (isWithEmpty) + { + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + } + + QMFrameWork.Common.Util.ModelDictionaryHandler.TryGetModelDictionary(kind.ToString(), out dicts); + + foreach (string key in dicts.Keys) + { + model.Add(new ComboboxItem { ID = key, Text = dicts[key] }); + } + + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 表皮查询获得物料号下拉列表(张敬贺 2015.05.28) + /// + /// 获得所属仓库中存储区域对应的零件号下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterielDropDownList(string id) + { + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(id) == false) + { + var dataResult = wcfAgent.InvokeServiceFunction>>(QMAPP.ServicesAgent.FeedInManage.EpidermisBLL_GetProductInfectionList.ToString(), id); + + foreach (InjectionRecorder ps in dataResult.Result) + { + //将数据添加到model中 + if (ps.PROCESSTYPE == ((int)QMAPP.FJC.Entity.EnumGeter.ProductType.biaopi).ToString()) + { + ps.MATERIALCODE = ps.MATERIALCODE + "/" + ps.MATERIALTYPE + "/" + ps.INJECTIONTERMINAL; + } + else + { + ps.MATERIALCODE = ps.MATERIALCODE + "/" + ps.MATERIALTYPE; + } + + list.Add(CopyToModel(ps)); + } + list.Insert(0, new EpidermisModel { PID = "", MATERIALCODE = "" }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + else + { + return Content(AppResource.DeleteMessage); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取缺陷类型 + + [HandleException] + public ActionResult GetDefectDropDownList() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction("DefectTypeBLL_GetDefectType"); + + + ComboboxResult model = new ComboboxResult(); + + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + //闫永刚2018-8-8修改 + foreach (DataRow dr in dataResult.Rows) + { + string keyvalue = dr["DEFECTKEY"].ToString(); + //int keyvalue = Convert.ToInt32(dr["DEFECTKEY"]); + string defectValue = dr["DEFECTVALUE"].ToString(); + defectValue = defectValue.Replace("\r", ""); + defectValue = defectValue.Replace("\n", ""); + model.Add(new ComboboxItem { ID = keyvalue.ToString(), Text = defectValue }); + } + + return Content(model.ToString()); + + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取公司下拉列表 + /// + /// 获取公司下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetCorpComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("CorpBLL_GetCorpList", new Corp()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Corp item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.PID, Text = item.CORP_CODE + "/" + item.CORP_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工厂下拉列表 + /// + /// 获取工厂下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetFactoryComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("FactoryBLL_GetFactoryList", new Factory()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Factory item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.FACTORY_CODE, Text = item.FACTORY_CODE + "/" + item.FACTORY_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 获取工厂下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetNewFactoryComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("FactoryBLL_GetFactoryList", new Factory()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Factory item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.FACTORY_CODE, Text = item.FACTORY_CODE + "/" + item.FACTORY_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + + + + #endregion + + #region 获取全部工序下拉列表 + /// + /// 获取全部工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetALLWorkCellBasicComboxSource(string routecode) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("ProcessInfoBLL_GetProcessInfoBasicList", new QMAPP.FJC.Entity.Basic.ProcessInfo() { PROCESSTYPE = routecode }); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (QMAPP.FJC.Entity.Basic.ProcessInfo item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.PID, Text = item.PROCESSNAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取全部设备下拉列表 + /// + /// 获取全部工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetALLEquipmentComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("EquipmentBLL_GetEquipmentList", new QMAPP.FJC.Entity.Basic.ProcessInfo()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (QMAPP.MD.Entity.Equipment item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.EQUIPMENT_CODE, Text = item.EQUIPMENT_CODE + "/" + item.EQUIPMENT_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取新物料信息下拉列表 + /// + /// 获取物料信息下拉列表GetMaterialClassList + /// + /// 数据源 + [HandleException] + public ActionResult GetNewMaterialComboxSource(string materialtype) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var result = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material() { MATERIAL_TYPE_CODE = materialtype }); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Material item in result) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表(联动) + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialWithTypeComboxSource(string materialtype) + { + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(materialtype) == false) + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material() { MATERIAL_TYPE_CODE = materialtype }); + foreach (Material item in dataResult) + { + item.MATERIAL_NAME = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME; + list.Add(item); + } + } + //list.Insert(0, new Material() { MATERIAL_CODE = "", MATERIAL_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表(FIS用) + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetFisMaterialComboxSource() + { + WorkCell info = new WorkCell(); + info.WORKCENTER_CODE = Request.Params["WORKCENTER_CODE"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var result = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetNewMaterialList", new Material(), info); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Material item in result) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表(订单) + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialSource(string ordertype) + { + //WorkCell info = new WorkCell(); + //info.WORKCELL_CODE = ordertype; + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialForInjectOrder", ordertype); + foreach (Material item in dataResult) + { + item.MATERIAL_NAME = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME; + list.Add(item); + } + list.Insert(0, new Material() { MATERIAL_CODE = "", MATERIAL_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表(订单) + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialDoorPlan(string ordertype, string color, string hbtype, string mattypes) + { + Material info = new Material(); + + #region 前台传入后台文字乱码 + //if (color !="undefined") + //{ + // DictManageBLL dictCOLORBll = new DictManageBLL(DictKind.COLOR); + // //颜色 + // color = dictCOLORBll.GetDictValue(color).GetHashCode().ToString(); + // } + //if (hbtype != "undefined") + //{ + // DictManageBLL dictHBtypeBll = new DictManageBLL(DictKind.HBTYPE); + // //高低配 + // hbtype = dictHBtypeBll.GetDictValue(hbtype).GetHashCode().ToString(); + //} + #endregion + + info.ORDER_TYPE = ordertype; + info.COLOR = color; + info.HBTYPE = hbtype; + if (string.IsNullOrEmpty(mattypes) == false && mattypes != "undefined") + { + info.MaterialCodes = "('" + mattypes.Replace(";", "','") + "')"; + } + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialDoorPlan", info); + foreach (Material item in dataResult) + { + item.MATERIAL_NAME = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME; + list.Add(item); + } + list.Insert(0, new Material() { MATERIAL_CODE = "", MATERIAL_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 门板计划整车添加成都 + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetFisDoorPlanForCD() + { + FISAssembly info = new FISAssembly(); + + List list = new List(); + + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>("DoorPlankPlanBLL_GetMaterialDoorPlanForCD", info); + foreach (FISAssembly item in dataResult) + { + item.Name =item.Name; + list.Add(item); + } + list.Insert(0, new FISAssembly() { Id="",Name = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表(所有) + /// + /// 获取物料信息下拉列表(所有) + /// + /// 数据源 + [HandleException] + public ActionResult GetALLMaterialComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var result = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Material item in result) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料类型下拉列表 + /// + /// 获取物料类型下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialClassComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", new MaterialClass()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (MaterialClass item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_TYPE_CODE, Text = item.MATERIAL_TYPE_NAME + "/" + item.MATERIAL_TYPE_CODE }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + #region 获取物料类型(关联物料attribute)下拉列表 + /// + /// 获取物料类型下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialClassByAttributeComboxSource(string attribute) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + MaterialClass info = new MaterialClass(); + info.MATERIAL_ATTRIBUTE = attribute; + List list = new List(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetAllMaterialClassList", info); + foreach (MaterialClass item in dataResult) + { + item.MATERIAL_TYPE_NAME = item.MATERIAL_TYPE_CODE + "/" + item.MATERIAL_TYPE_NAME; + list.Add(item); + } + list.Insert(0,new MaterialClass() { MATERIAL_TYPE_CODE = "", MATERIAL_TYPE_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取物料信息下拉列表--树 + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Material item in dataResult) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME }); + } + + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + public ActionResult GetFactoryMaterialComboxSource(string factoryCode) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var list = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material{FACTORY_CODE = factoryCode}); + //ComboboxResult model = new ComboboxResult(); + //model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + //foreach (Material item in dataResult) + //{ + // model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME }); + //} + + //return Content(model.ToString()); + + list.Insert(0, new Material() { MATERIAL_CODE = "", MATERIAL_NAME = " " }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// FIS + /// + /// + [HandleException] + public ActionResult GetFisMaterialTree(string ordertype) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + Material material = new Material(); + if (!string.IsNullOrEmpty(ordertype)) + { + int i=0; + if (int.TryParse(ordertype, out i) == false) + { + material.ORDER_TYPE = ordertype; + } + else + { + material.MATERIAL_ATTRIBUTE = ordertype; + } + } + try + { + var materialResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", material); + var classresult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", new MaterialClass()).Result; + List trees = new List(); + trees.Add(new CombotreeItem { id = "", text = this.EmptyItemTitle }); + + foreach (MaterialClass item in classresult.Where(p => string.IsNullOrWhiteSpace(p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = item.MATERIAL_TYPE_CODE, text = item.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, classresult, materialResult); + if (subnode.children.Count > 0) + { + trees.Add(subnode); + } + } + + return Json(trees); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMaterialTree() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var materialResult = wcfAgent.InvokeServiceFunction> + ("MaterialBLL_GetMaterialList", new Material()); + var classresult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", new MaterialClass()).Result; + List trees = new List(); + trees.Add(new CombotreeItem { id = "", text = this.EmptyItemTitle }); + + foreach (MaterialClass item in classresult.Where(p => string.IsNullOrWhiteSpace(p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = item.MATERIAL_TYPE_CODE, text = item.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, classresult, materialResult); + if (subnode.children.Count > 0) + { + trees.Add(subnode); + } + } + + return Json(trees); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 追加树节点 + /// + /// + /// + /// + private void AppendTree(CombotreeItem node, List mclasslist, List materiallist) + { + foreach (var mclass in mclasslist.Where(p => string.Equals(node.id, p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = mclass.MATERIAL_TYPE_CODE, text = mclass.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, mclasslist, materiallist); + if (subnode.children.Count > 0) + { + node.children.Add(subnode); + } + } + foreach (var material in materiallist.Where(p => string.Equals(node.id, p.MATERIAL_TYPE_CODE)).OrderBy(p => p.MATERIAL_CODE)) + { + var subnode = new CombotreeItem { id = material.MATERIAL_CODE, text = material.MATERIAL_CODE + "/" + material.MATERIAL_NAME }; + node.children.Add(subnode); + } + } + + #endregion + + #region 获取全部工序下拉列表 + /// + /// 获取全部工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetALLWorkCellComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("WorkCellBLL_GetWorkCellList", new WorkCell()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (WorkCell item in dataResult) + { + model.Add(new ComboboxItem { ID = item.WORKCELL_CODE, Text = item.WORKCELL_CODE + "/" + item.WORKCELL_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + public ActionResult GetFactoryWorkCellComboxSource(string factoryCode, string workCenterCode) + { + string kind = Request.Params["kind"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var list = wcfAgent.InvokeServiceFunction> + ("WorkCellBLL_GetWorkCellList", new WorkCell { FACTORY_CODE = factoryCode, WORKCENTER_CODE = workCenterCode }); + + list.Insert(0, new WorkCell() { WORKCELL_CODE = "", WORKCELL_NAME = " " }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工序下拉列表 + /// + /// 获取全部工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetWorkCellBasicComboxSource(string routecode) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("WorkCellBLL_GetWorkCellList", new WorkCell() ,routecode); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (WorkCell item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.WORKCELL_CODE, Text = item.WORKCELL_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工序下拉列表(联动) + /// + /// 获取工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetWorkCellBasicWithTypeComboxSource(string routecode) + { + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(routecode) == false) + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("WorkCellBLL_GetNewWorkCellList", new WorkCell(), routecode); + foreach (WorkCell item in dataResult) + { + item.WORKCELL_NAME = item.WORKCELL_CODE + "/" + item.WORKCELL_NAME; + list.Add(item); + } + } + list.Insert(0, new WorkCell() { WORKCELL_CODE = "", WORKCELL_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工位下拉列表(联动) + /// + /// 获取工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetWorkLocFromWorkCellComboxSource(string workCellCode) + { + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(workCellCode) == false) + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("WorkLocBLL_GetWorkLocFromWorkCellList", new WorkLoc(), workCellCode); + foreach (WorkLoc item in dataResult) + { + item.WORKLOC_NAME = item.WORKLOC_CODE + "/" + item.WORKLOC_NAME; + list.Add(item); + } + } + list.Insert(0, new WorkLoc() { WORKLOC_CODE = "", WORKLOC_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工位下拉列表(联动) + /// + /// 获取工序下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetWorkLocComboxSource(string workCenterCode) + { + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (string.IsNullOrEmpty(workCenterCode) == false) + { + list = wcfAgent.InvokeServiceFunction> + ("WorkLocBLL_GetWorkLocFromWorkCenterCodeList", workCenterCode); + //foreach (WorkLoc item in dataResult) + //{ + // item.WORKLOC_NAME = item.WORKLOC_NAME; + // list.Add(item); + //} + } + list.Insert(0, new WorkLoc() { WORKLOC_CODE = "", WORKLOC_NAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取班次下拉列表 + /// + /// 获取班次下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetProduceShiftComboxSource(string workcentercode) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction> + ("ProduceShiftBLL_GetWorkcenterShifts", workcentercode); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (ProduceShift item in dataResult) + { + model.Add(new ComboboxItem { ID = item.PRODUCESHIFTTCODE, Text = item.PRODUCESHIFTTCODE + "/" + item.PRODUCESHIFTNAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取工艺路线下拉列表 + /// + /// 获取工艺路线下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetProcessRouteComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("ProcessRouteBLL_GetProcessRouteList", new ProcessRoute()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (ProcessRoute item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.ROUTE_CODE, Text = item.ROUTE_CODE + "/" + item.ROUTE_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取全部工作中心下拉列表 + /// + /// 获取工作中心下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetAllWorkCenterComboxSource() + { + string kind = Request.Params["kind"]; + var workCenter = new WorkCenter(); + if (!string.IsNullOrEmpty(kind)) + { + workCenter.CENTER_TYPE = "0"; + } + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("WorkCenterBLL_GetWorkCenterList", workCenter); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (WorkCenter item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.WORKCENTER_CODE, Text = item.WORKCENTER_NAME }); + } + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + public ActionResult GetFactoryWorkCenterComboxSource(string factoryCode) + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("WorkCenterBLL_GetWorkCenterList", new WorkCenter { FACTORY_CODE = factoryCode }); + + var list = dataResult.Result; + list.Insert(0, new WorkCenter() { WORKCENTER_CODE = "", WORKCENTER_NAME = " " }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取计划状态 + /// + /// 获取计划状态 + /// + /// 数据源 + [HandleException] + public ActionResult GetPlanStateComboxSource() + { + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + model.Add(new ComboboxItem { ID = "初始", Text = "初始" }); + model.Add(new ComboboxItem { ID = "处理中", Text = "处理中" }); + model.Add(new ComboboxItem { ID = "完成", Text = "完成" }); + return Content(model.ToString()); + } + #endregion + + #region 获取PBOM头物料信息下拉列表 + /// + /// 获取BOM头物料信息下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetPbomMaterialComboxSource() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetPbomMaterialList", new Material()); + ComboboxResult model = new ComboboxResult(); + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + foreach (Material item in dataResult.Result) + { + model.Add(new ComboboxItem { ID = item.MATERIAL_CODE, Text = item.MATERIAL_CODE + "/" + item.MATERIAL_NAME }); + } + + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取设备(MACHINE)下拉列表 + /// + /// 获取设备(MACHINE)下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMachineForOrder(string ordertype) + { + WorkCell info = new WorkCell(); + info.WORKCELL_CODE = ordertype; + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + //if (string.IsNullOrEmpty(ordertype) == false) + //{ + var dataResult = wcfAgent.InvokeServiceFunction> + ("MachineInfoBLL_GetMachineForOrderList", new QMAPP.FJC.Entity.Basic.MachineInfo(), info); + foreach (QMAPP.FJC.Entity.Basic.MachineInfo item in dataResult) + { + item.MACHINENAME = item.MACHINECODDE + "/" + item.MACHINENAME; + list.Add(item); + } + //} + list.Insert(0, new QMAPP.FJC.Entity.Basic.MachineInfo() { MACHINECODDE = "", MACHINENAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取设备(MACHINE)下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMachineList(string workcentercode) + { + QMAPP.FJC.Entity.Basic.MachineInfo info = new Entity.Basic.MachineInfo(); + info.WORKCENTER_CODE = workcentercode; + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + //if (string.IsNullOrEmpty(ordertype) == false) + //{ + var dataResult = wcfAgent.InvokeServiceFunction> + ("MachineInfoBLL_GetMachineInfoList", info); + foreach (QMAPP.FJC.Entity.Basic.MachineInfo item in dataResult) + { + item.MACHINENAME = item.MACHINECODDE + "/" + item.MACHINENAME; + list.Add(item); + } + //} + list.Insert(0, new QMAPP.FJC.Entity.Basic.MachineInfo() { MACHINECODDE = "", MACHINENAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取设备模架下拉列表 + /// + /// 数据源 + [HandleException] + public ActionResult GetMouldList(string machinecode) + { + QMAPP.FJC.Entity.Basic.MachineInfoModels info = new Entity.Basic.MachineInfoModels(); + info.MachineCode = machinecode; + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if (!string.IsNullOrEmpty(machinecode)) + { + + var machine = wcfAgent.InvokeServiceFunction + ("MachineInfoBLL_GetMachineInfo", new QMAPP.FJC.Entity.Basic.MachineInfo { MACHINECODDE = machinecode }); + if (machine != null) + { + info.MID = machine.PID; + } + } + var dataResult = wcfAgent.InvokeServiceFunction> + ("MachineInfoModelBLL_GetAllList", info); + foreach (QMAPP.FJC.Entity.Basic.MachineInfoModels item in dataResult) + { + item.MODELNAME = item.MODELCODE + "/" + item.MODELNAME; + list.Add(item); + } + //} + list.Insert(0, new QMAPP.FJC.Entity.Basic.MachineInfoModels() { MODELCODE = "", MODELNAME = this.EmptyItemTitle }); + return Content(QMFrameWork.Common.Serialization.JsonConvertHelper.GetSerializes(list)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取计划流水号 + /// + /// 获取计划流水号 + /// + /// 数据源 + [HandleException] + public ActionResult GetOrderPlanSeq(string datestr,string prefix) + { + FISPlan fisplan = new FISPlan(); + fisplan.DATASTR = datestr; + fisplan.PREFIX = prefix; + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var dataResult = wcfAgent.InvokeServiceFunction + ("OrderPlanBLL_GetOrderPlanSeq", fisplan); + + return Json(dataResult, JsonRequestBehavior.AllowGet); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + /// + /// 获取物料类型树 + /// + /// + [HandleException] + public ActionResult GetMaterialClassTree() + { + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + var classresult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", new MaterialClass()).Result; + List trees = new List(); + trees.Add(new CombotreeItem { id = "", text = this.EmptyItemTitle }); + + foreach (MaterialClass item in classresult.Where(p => string.IsNullOrWhiteSpace(p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = item.MATERIAL_TYPE_CODE, text = item.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, classresult); + trees.Add(subnode); + } + + return Json(trees); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取物料类型树(有过滤) + /// + /// + [HandleException] + public ActionResult GetMaterialClassTreeDea(string type) + { + MaterialClass materialclass = new MaterialClass(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + try + { + if(!string.IsNullOrEmpty(type)) + { + materialclass.MATERIAL_ATTRIBUTE = type; + } + var classresult = wcfAgent.InvokeServiceFunction>> + ("MaterialBLL_GetMaterialClassList", materialclass).Result; + List trees = new List(); + trees.Add(new CombotreeItem { id = "", text = this.EmptyItemTitle }); + + foreach (MaterialClass item in classresult.Where(p => string.IsNullOrWhiteSpace(p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = item.MATERIAL_TYPE_CODE, text = item.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, classresult); + trees.Add(subnode); + } + + return Json(trees); + } + catch (Exception ex) + { + throw ex; + } + } + + private void AppendTree(CombotreeItem node, List mclasslist) + { + foreach (var mclass in mclasslist.Where(p => string.Equals(node.id, p.UP_MATERIAL_TYPE_CODE)).OrderBy(p => p.SEQ_NUM)) + { + var subnode = new CombotreeItem { id = mclass.MATERIAL_TYPE_CODE, text = mclass.MATERIAL_TYPE_NAME, children = new List() }; + AppendTree(subnode, mclasslist); + node.children.Add(subnode); + } + + } + + #region 获取呼叫类型 + + /// + /// 获取呼叫类型 + /// + /// 数据源 + [HandleException] + public ActionResult GetConfigDetailComboxSource() + { + string kind = Request.Params["kind"]; + + bool isWithEmpty = string.IsNullOrEmpty(Request.Params["WithEmpty"]) ? true : false; + Dictionary dicts = null; + try + { + ComboboxResult model = new ComboboxResult(); + + if (isWithEmpty) + { + model.Add(new ComboboxItem { ID = "", Text = this.EmptyItemTitle }); + } + //执行查询 + List list = new List(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + list = wcfAgent.InvokeServiceFunction>("ConfigDetailBLL_GetAllList", kind); + + foreach (ConfigDetail item in list) + { + //item.DetailTypeName = item.DetailTypeCode + "/" + item.DetailTypeName; + model.Add(new ComboboxItem { ID = item.DetailTypeCode, Text = item.DetailTypeName }); + } + + return Content(model.ToString()); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + + } +} diff --git a/.svn/pristine/b2/b2cb646b9e87075dd4a8c292dd2189368debd0f1.svn-base b/.svn/pristine/b2/b2cb646b9e87075dd4a8c292dd2189368debd0f1.svn-base new file mode 100644 index 0000000..cad1c65 --- /dev/null +++ b/.svn/pristine/b2/b2cb646b9e87075dd4a8c292dd2189368debd0f1.svn-base @@ -0,0 +1,34 @@ +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.csprojAssemblyReference.cache +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.Properties.Resources.resources +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.csproj.GenerateResource.cache +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\LineDict.xml +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.WinModuleFactor.exe +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.WinModuleFactor.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\CkTec.Utils.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.Common.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.Entity.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.User.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.WinBiz.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Gm_WMS.DataAccess.DataService.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.OOXML.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Interop.grproLib.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\IrisSkin2.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.OpenXmlFormats.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.OpenXml4Net.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\stdole.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\ICSharpCode.SharpZipLib.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\CkTec.Utils.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.WinBiz.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.Common.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.Common.dll.config +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\Stone.Entity.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.OOXML.xml +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.xml +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\NPOI.OpenXml4Net.xml +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.Quality.frmCheckItemView.resources +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.csproj.CopyComplete +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.exe +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.pdb +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\bin\Debug\WeifenLuo.WinFormsUI.Docking.dll +D:\Project\BjbmptMesNgccNew\Stone.WinModuleFactor\obj\Debug\Stone.WinModuleFactor.frmBase.resources diff --git a/.svn/pristine/b4/b4032873015870b3dbfdb689c1d634598f44add5.svn-base b/.svn/pristine/b4/b4032873015870b3dbfdb689c1d634598f44add5.svn-base new file mode 100644 index 0000000..7325957 --- /dev/null +++ b/.svn/pristine/b4/b4032873015870b3dbfdb689c1d634598f44add5.svn-base @@ -0,0 +1,73 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + +
+ <%=Html.QV(p => p.BucketCode)%> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("RawMaterial", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("RawMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("RawMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("RawMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/b4/b4261d1363b65dbe09c0657d1c1e05db44aaedda.svn-base b/.svn/pristine/b4/b4261d1363b65dbe09c0657d1c1e05db44aaedda.svn-base new file mode 100644 index 0000000..07a6acf --- /dev/null +++ b/.svn/pristine/b4/b4261d1363b65dbe09c0657d1c1e05db44aaedda.svn-base @@ -0,0 +1,69 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + + + + +
+ <%=Html.QV(p => p.Line)%> + + <%=Html.QC(p => p.Line)%> +
+ <%=Html.QV(p=>p.BucketCode) %> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QV(p => p.RawMaterial)%> + + <%=Html.QC(p => p.RawMaterial)%> +
+
+ <%=Html.HiddenFor(p=>p.PID) %> + <%=Html.HiddenFor(p => p.IsCheck)%> + <%=Html.HiddenFor(p=>p.CREATEDATE) %> + <%=Html.HiddenFor(p=>p.CREATEUSER) %> + <%=Html.HiddenFor(p=>p.UPDATEDATE)%> + <%=Html.HiddenFor(p=>p.UPDATEUSER) %> + <%=Html.QPEnd() %> +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "BucketMaterial", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/b4/b4360b914ae2da418da644054dcbeadf3ca6c604.svn-base b/.svn/pristine/b4/b4360b914ae2da418da644054dcbeadf3ca6c604.svn-base new file mode 100644 index 0000000..b4ce69b --- /dev/null +++ b/.svn/pristine/b4/b4360b914ae2da418da644054dcbeadf3ca6c604.svn-base @@ -0,0 +1,1906 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {2D1697C6-EB08-46CD-8A8A-27F66DEDE628} + WinExe + Properties + QMAPP.WinForm + QMAPP.WinForm + v4.0 + + + 512 + SAK + SAK + SAK + SAK + true + E:\Deploy\CDMES\Winform\ + true + Web + true + Foreground + 7 + Days + true + true + true + http://10.111.144.97:8088/ + http://10.111.144.97:8088/ + Trace System + ADIENT + 1.0.0.0 + true + Default.htm + true + 35 + 1.0.1.%2a + false + true + true + true + Relative + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\QMAPP.WinForm.XML + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + D7B0D251F30AE957B8EE42D7C0AD873E0F75B094 + + + + + + + true + + + false + + + cfaa-mes.ico + + + + false + + + QMSetupKey.pfx + + + + True + + + ..\..\DLL\BarcodeLib.dll + + + + + + False + ..\..\DLL\FastReport\FastReport.dll + + + ..\..\DLL\Interop.gregn6Lib.dll + True + + + False + True + bin\Debug\Interop.Microsoft.Office.Core.dll + + + False + True + bin\Debug\Interop.Microsoft.Office.Interop.Excel.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + False + ..\..\DLL\PlaySound.dll + + + False + ..\..\DLL\QMCommon.dll + + + False + ..\..\DLL\QMConfig.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + False + ..\..\DLL\QMWinCommon.dll + + + + + + + + + + + + + + + + + + ..\..\DLL\ThoughtWorks.QRCode.dll + + + + + + + + + Component + + + UserControl + + + Pager.cs + + + + + + + + + + + + + + + + + + + + + Form + + + CallManageForm.cs + + + + Form + + + frmAlertConfirm.cs + + + Form + + + LeakInspection.cs + + + Form + + + DefaultDataSetNum.cs + + + + Form + + + FrmCarCardDetail.cs + + + Form + + + FrmCarCardPrintShow.cs + + + Form + + + FrmItemList.cs + + + Form + + + frmLineSetting.cs + + + Form + + + FrmPlace.cs + + + True + True + PastCard.rpt + Component + + + + + Form + + + ResetSendIndexForm.cs + + + Form + + + DPShipment.cs + + + + InjectionMoldingNEWEditForm.cs + + + Form + + + InjectionMoldingNEWForm.cs + + + Form + + + InjectPasswordForm.cs + + + Form + + + InjectPrintForm.cs + + + Form + + + InjectionCodePrint.cs + + + Form + + + MaterialTreeForm.cs + + + + Form + + + DPLabelRegenerate.cs + + + Form + + + InjectIntoBarcode.cs + + + Form + + + InjectPlat.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + MainCodeChangeEditForm.cs + + + Form + + + MainCodeChangeForm.cs + + + Form + + + MendReasonSubDefects.cs + + + Form + + + MendRecorderWasteForm.cs + + + Form + + + ProductCheckAddForm.cs + + + Form + + + ProductCheckDetailForm.cs + + + Form + + + ProductCheckForm.cs + + + Form + + + ProductCheckValuesFrom.cs + + + Form + + + ReplaceForm.cs + + + Form + + + MendRecorderReasonForm.cs + + + Form + + + BZDPasswordForm.cs + + + Form + + + BZDRePrintForm.cs + + + Form + + + DPLabelReplace.cs + + + Form + + + frmInspectSkipping.cs + + + Form + + + PrintPlanLabel.cs + + + Form + + + frmFISBreakConfirm.cs + + + Form + + + ProductInForm.cs + + + Form + + + ProductInSendCodeForm.cs + + + Form + + + ProductInfo.cs + + + Form + + + DPAssemblyCodePrintForm.cs + + + Form + + + DoorFrameForm.cs + + + Form + + + EquipmentAlarmForm.cs + + + Form + + + FisM100ListForm.cs + + + Form + + + CastCounterSet.cs + + + Form + + + InjectionCheckForm.cs + + + Form + + + InjectionCheckListForm.cs + + + Form + + + InjectionScarpForm.cs + + + Form + + + SingleSlushMoldConfig.cs + + + Form + + + SingleSlushMoldConfigEdit.cs + + + Form + + + SlushMoldingEditForm.cs + + + Form + + + SlushMoldingForm.cs + + + Form + + + SlushMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForm.cs + + + Form + + + EquipmentMaintainEditForm.cs + + + Form + + + EquipmentMaintainForm.cs + + + Form + + + InjectionMoldingEditForm.cs + + + Form + + + InjectionMoldingForm.cs + + + Form + + + InjectionMoldingPrintForm.cs + + + Form + + + ProductBundleForm.cs + + + Form + + + InjectionMoldingPrintEditForm.cs + + + Form + + + SlushMoldingPrintForOldForm.cs + + + Form + + + PouringMoldingEditForm.cs + + + Form + + + PouringMoldingForm.cs + + + Form + + + SlushMoldingPrintLotForm.cs + + + Form + + + InjectionMoldingPrintLotForm.cs + + + Form + + + SlushMoldSet.cs + + + Form + + + SlushScarpForm.cs + + + Form + + + MachineCheckEditForm.cs + + + Form + + + MachineCheckForm.cs + + + Form + + + ItemForm.cs + + + Form + + + MendRecorderForm.cs + + + Form + + + MendRecorderCreateForm.cs + + + Form + + + MendRecorderFinishForm.cs + + + Form + + + MendStaticForm.cs + + + Form + + + SpecifyForm.cs + + + Form + + + TestForm.cs + + + Form + + + VideoTypeEditForm.cs + + + Form + + + MediaPlayerForm.cs + + + Form + + + MediaPlayerSubForm.cs + + + Form + + + MediaPlayerEditForm.cs + + + Form + + + VideoTypeForm.cs + + + Form + + + MainOperationSearchForm.cs + + + Form + + + PrintForm.cs + + + + Form + + + ProductAddForm.cs + + + Form + + + RepairForm.cs + + + Form + + + OperationForm.cs + + + Form + + + SetProcessPassForm.cs + + + Form + + + SPCControlForm.cs + + + Form + + + MainOperationStaticForm.cs + + + Form + + + SlushPlanEditForm.cs + + + Form + + + SlushPlanForm.cs + + + Form + + + ReprintForm.cs + + + Form + + + OutWarehouseForm.cs + + + Form + + + SendPlanSearchEditForm.cs + + + Form + + + SendPlanSearchForm.cs + + + Form + + + SendPlanPrintForm.cs + + + Form + + + EditUserForm.cs + + + Form + + + ManageUserForm.cs + + + Form + + + InWarehouseForm.cs + + + Form + + + SendCodeForm.cs + + + Form + + + SendFinalForm.cs + + + Form + + + MainForm.cs + + + Form + + + LoginForm.cs + + + + + + + + + + + + + + + True + True + Resource1.resx + + + Form + + + ServerSwitch.cs + + + True + True + Reference.svcmap + + + UserControl + + + BaseHole.cs + + + UserControl + + + DetailHole.cs + + + + + + + + + Pager.cs + + + CallManageForm.cs + + + frmAlertConfirm.cs + + + LeakInspection.cs + + + DefaultDataSetNum.cs + + + FrmCarCardDetail.cs + + + FrmCarCardPrintShow.cs + + + FrmItemList.cs + + + frmLineSetting.cs + + + FrmPlace.cs + + + CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator + PastCard.cs + + + ResetSendIndexForm.cs + + + DPShipment.cs + + + InjectionMoldingNEWEditForm.cs + + + InjectionMoldingNEWForm.cs + + + InjectPasswordForm.cs + + + InjectPrintForm.cs + + + InjectIntoBarcode.cs + + + InjectionCodePrint.cs + + + MaterialTreeForm.cs + + + DPLabelRegenerate.cs + + + InjectPlat.cs + + + DPLabelReplace.cs + + + MainCodeChangeEditForm.cs + + + MainCodeChangeForm.cs + + + MendReasonSubDefects.cs + + + MendRecorderWasteForm.cs + + + ProductCheckAddForm.cs + + + ProductCheckDetailForm.cs + + + ProductCheckForm.cs + + + ProductCheckValuesFrom.cs + + + ReplaceForm.cs + + + MendRecorderReasonForm.cs + + + BZDPasswordForm.cs + + + BZDRePrintForm.cs + + + DPLabelReplace.cs + + + frmInspectSkipping.cs + + + PrintPlanLabel.cs + + + frmFISBreakConfirm.cs + + + ProductInForm.cs + Designer + + + ProductInSendCodeForm.cs + + + ProductInfo.cs + + + DPAssemblyCodePrintForm.cs + + + DoorFrameForm.cs + + + EquipmentAlarmForm.cs + + + FisM100ListForm.cs + + + CastCounterSet.cs + + + InjectionCheckForm.cs + + + InjectionCheckListForm.cs + + + InjectionScarpForm.cs + + + SingleSlushMoldConfig.cs + + + SingleSlushMoldConfigEdit.cs + + + SlushMoldingEditForm.cs + + + SlushMoldingForm.cs + + + SlushMoldingPrintEditForm.cs + + + SlushMoldingPrintForm.cs + + + EquipmentMaintainEditForm.cs + + + EquipmentMaintainForm.cs + + + InjectionMoldingEditForm.cs + + + InjectionMoldingForm.cs + + + InjectionMoldingPrintForm.cs + Designer + + + ProductBundleForm.cs + + + InjectionMoldingPrintEditForm.cs + + + SlushMoldingPrintForOldForm.cs + + + PouringMoldingEditForm.cs + + + PouringMoldingForm.cs + + + SlushMoldingPrintLotForm.cs + + + InjectionMoldingPrintLotForm.cs + + + SlushMoldSet.cs + + + SlushScarpForm.cs + + + MachineCheckEditForm.cs + + + MachineCheckForm.cs + + + ItemForm.cs + + + MendRecorderForm.cs + + + MendRecorderCreateForm.cs + + + MendRecorderFinishForm.cs + + + MendStaticForm.cs + + + SpecifyForm.cs + + + TestForm.cs + + + VideoTypeEditForm.cs + + + MediaPlayerForm.cs + + + MediaPlayerSubForm.cs + + + MediaPlayerEditForm.cs + + + VideoTypeForm.cs + + + MainOperationSearchForm.cs + + + PrintForm.cs + + + ProductAddForm.cs + + + RepairForm.cs + + + OperationForm.cs + Designer + + + SetProcessPassForm.cs + + + SPCControlForm.cs + + + MainOperationStaticForm.cs + + + SlushPlanEditForm.cs + + + SlushPlanForm.cs + + + ReprintForm.cs + + + OutWarehouseForm.cs + Designer + + + SendPlanSearchEditForm.cs + + + SendPlanSearchForm.cs + + + SendPlanPrintForm.cs + + + EditUserForm.cs + + + ManageUserForm.cs + + + InWarehouseForm.cs + Designer + + + SendCodeForm.cs + + + SendFinalForm.cs + + + LoginForm.cs + + + MainForm.cs + + + PublicResXFileCodeGenerator + Designer + Resource1.Designer.cs + + + ServerSwitch.cs + + + BaseHole.cs + + + DetailHole.cs + + + Designer + + + + PreserveNewest + + + + + PreserveNewest + + + Always + + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + {706750E7-6D42-4FE2-95BF-99E90F84BE07} + QMAPP.FJC.TRACING + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + PreserveNewest + + + + + Always + Designer + + + Always + + + Always + + + Always + + + + + WCF Proxy Generator + Reference.cs + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + Always + + + Designer + + + Always + Designer + + + Always + + + Always + + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + False + + + + + Include + True + File + + + False + + + + + Include + True + Assembly + + + + + + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + aximp + False + + + {F5078F18-C551-11D3-89B9-0000F81FE221} + 3 + 0 + 0 + tlbimp + False + True + + + {6BF52A50-394A-11D3-B153-00C04F79FAA6} + 1 + 0 + 0 + tlbimp + False + True + + + + + False + 追溯系统 + 1 + cfaa-mes.ico + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/b4/b439baaf49a63a8e13aed1ce489f6f61de3eb518.svn-base b/.svn/pristine/b4/b439baaf49a63a8e13aed1ce489f6f61de3eb518.svn-base new file mode 100644 index 0000000..9236374 --- /dev/null +++ b/.svn/pristine/b4/b439baaf49a63a8e13aed1ce489f6f61de3eb518.svn-base @@ -0,0 +1,1500 @@ + + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {47DECB89-B294-4ACC-BDB6-651DB8F18DDE} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + QMAPP.FJC.Web + QMAPP.FJC.Web + v4.0 + false + + + 4.0 + + + + false + + + + + + + + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\DLL\EmitMapper.dll + + + ..\..\DLL\Globale_Variablen.dll + + + ..\..\DLL\itextsharp.dll + + + False + ..\..\DLL\log4net.dll + + + ..\..\DLL\MySql.Data.dll + + + False + ..\..\DLL\Newtonsoft.Json.dll + + + ..\..\DLL\NPOI.dll + + + False + ..\..\DLL\NPOI.OOXML.dll + + + False + ..\..\DLL\NPOI.OpenXml4Net.dll + + + False + ..\..\DLL\NPOI.OpenXmlFormats.dll + + + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + False + ..\..\APPMESReport\QMAPP.MESReport.Web\bin\QMAPP.MESReport.Entity.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + False + ..\..\QMFrameWork\QMFrameWork.ServiceInterface.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.dll + + + ..\..\QMFrameWork\QMFrameWork.WebUI.Expand.dll + + + + + 3.5 + + + + + + + + + + + + + False + ..\..\DLL\System.Web.Mvc.dll + + + + + + + + + + + + True + True + AppResource.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PrintMaster.Master + ASPXCodeBehind + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Designer + Always + + + Always + + + Always + + + Designer + Always + + + Designer + Always + + + Always + + + Always + Designer + + + Always + + + Always + + + + + Designer + Always + + + Designer + + + Designer + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + + + + Always + + + + + {5FB9E7FC-1601-467C-86CE-6817DDE70DDE} + QMAPP.Common.Web + + + {BA9CEDD0-B232-4A1C-B5CB-A00C81EA5A91} + QMAPP.ServicesAgent + + + {CF05BE73-3D50-4F6B-A95C-EE55800EDB9C} + QMAPP.MD.BLL + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {4B533C1B-7D16-4BD3-9285-D6E7E9740645} + QMAPP.MD.Web + + + {DCABED0D-A8FC-47ED-BFB1-AAAEAD0A9B01} + QMAPP.BLL + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {C78C8970-0737-4F36-8F54-137032EAFE41} + Common + + + {82A4D3A5-844B-49E0-9D06-0C2B273EF1F0} + QMAPP.FJC.BLL + + + {063B6316-7154-4BD9-B546-21CCE4685235} + QMAPP.FJC.DAL + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + ResXFileCodeGenerator + AppResource.Designer.cs + Designer + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + + + + + False + False + 1777 + / + + + False + False + + + False + + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/b5/b540a4e2a9d6e653791a5efc529c1b05b29015c6.svn-base b/.svn/pristine/b5/b540a4e2a9d6e653791a5efc529c1b05b29015c6.svn-base new file mode 100644 index 0000000..adf4187 Binary files /dev/null and b/.svn/pristine/b5/b540a4e2a9d6e653791a5efc529c1b05b29015c6.svn-base differ diff --git a/.svn/pristine/b8/b82cd2e1267bc3609bde92a9edc57de1e263e024.svn-base b/.svn/pristine/b8/b82cd2e1267bc3609bde92a9edc57de1e263e024.svn-base new file mode 100644 index 0000000..3b15796 --- /dev/null +++ b/.svn/pristine/b8/b82cd2e1267bc3609bde92a9edc57de1e263e024.svn-base @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.FJC.Web.Models.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialModel : QDGModel + { + /// + /// 主键 + /// + [Description("主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 料筒编号 + /// + [Description("料筒编号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200, JsonUtl = "/Dict/GetBucketCodeComboxSource")] + [InputType(inputType.combotree)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string BucketCode { get; set; } + + /// + /// 零件号 + /// + [Description("零件号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center)] + public string RawMaterial { get; set; } + + + /// + /// 是否可用 + /// + [Description("是否可用")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 200)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = true, Sortable = true, Width = 100, DataAlign = DataAlign.center,Hidden = true)] + public string IsCheck { get; set; } + + /// + /// 创建人 + /// + [Description("创建用户")] + public string CREATEUSER { get; set; } + + /// + /// 创建日期 + /// + [Description("创建时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime CREATEDATE { get; set; } + + /// + /// 更新人 + /// + [Description("更新用户")] + public string UPDATEUSER { get; set; } + + /// + /// 更新日期 + /// + [Description("更新时间")] + [HTMLInput(UpdateRead = true, MaxLength = 20)] + [InputType(inputType.hidden)] + [DGColumn(Sortable = true, Width = 150, DataAlign = DataAlign.center, FormatDate = "yyyy-MM-dd hh:mm:ss")] + public DateTime UPDATEDATE { get; set; } + } +} diff --git a/.svn/pristine/b8/b8541e4fe7c03a7b0f6a356ae6aaaa540218e35c.svn-base b/.svn/pristine/b8/b8541e4fe7c03a7b0f6a356ae6aaaa540218e35c.svn-base new file mode 100644 index 0000000..2023906 --- /dev/null +++ b/.svn/pristine/b8/b8541e4fe7c03a7b0f6a356ae6aaaa540218e35c.svn-base @@ -0,0 +1,992 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Basic; +using QMFrameWork.Data; +using QMFrameWork.Common.Serialization; +using System.Linq; +using QMAPP.WinForm.Forms.Operation; +using System.IO.Ports; +using System.Management; +using System.Threading; +using QMAPP.MD.Entity.Bucket; +using System.Drawing; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M11-2 + /// 作 用:搪塑条码打印 + /// 作 者:王庆男 + /// 编写日期:2015年05月28日 + /// + public partial class SlushMoldingPrintForOldNewForm : Form + { + + + /// + /// 车型,A:B9车型,B:Q5车型 + /// + public string CarType { set; get; } + + List moldConfigList; + + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + + /// + /// 称重记录 + /// + public List List_tSWeighRecores = new List(); + + private string _cfgSlushMolding = null;// 称重区间 + + /// + /// 新建 + /// + public SlushMoldingPrintForOldNewForm() + { + InitializeComponent(); + //infolabel.Text = $"重量13245,超出100-300安全区间!"; + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + _cfgSlushMolding = GetAppConfigValue("SlushMolding"); + btnCommSend.Enabled = true; + serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived); + frmMain_Load(); + moldConfigList = new List(); + } + + /// + /// 窗体初始化 + /// + private void InitForm() + { + //预留方法,用于B9\Q5功能差异 + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + InitForm(); + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + List recorders = null; + recorders = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + recorders = recorders.OrderBy(o => o.INDEXVALUE).ToList(); + moldConfigList = recorders; + + #region 绑定下拉列表 + + BasicData basicData = new BasicData(); + //加载搪塑设备列表 + //this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType.tangsu.GetHashCode().ToString() }, true); + //this.comMachineCode.DisplayMember = "MACHINENAME"; + //this.comMachineCode.ValueMember = "MACHINECODDE"; + //this.comMachineCode.SelectedIndex = 1; + //this.comMachineCode.Enabled = false; + + var machinelist = basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachineCode.DataSource = machinelist; + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + + + + //颜色 + this.comColor.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.COLOR.ToString()); + this.comColor.DisplayMember = "VALUE"; + this.comColor.ValueMember = "KEY"; + this.comColor.SelectedValue = "1"; + //this.comColor.Enabled = false; + ////AB腔 + this.comPosition.DataSource = basicData.GetDictionaryList(EnumGeter.DictKind.CAVITYTYPE.ToString()); + this.comPosition.DisplayMember = "VALUE"; + this.comPosition.ValueMember = "KEY"; + //this.comPosition.SelectedIndex = 0; + //this.comPosition.Enabled = false; + + + #endregion + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text)) + { + this.dtpDate.Text = DateTime.Now.ToString(); + } + + SetMouldStation(); + + + #region 打印模板拷贝 + + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("SlushMoldingPrintForOldForm"); + + #endregion + } + + #region 设置模架号 + /// + /// + /// + private void SetMouldStation() + { + this.cBoxModelCode.DisplayMember = "VALUE"; + this.cBoxModelCode.ValueMember = "KEY"; + List cBoxModelCodeList = new List(); + foreach (var m in moldConfigList) + { + cBoxModelCodeList.Add(new { VALUE = m.MOLDVALUE, KEY = m.MOLDVALUE }); + } + this.cBoxModelCode.DataSource = cBoxModelCodeList; + this.cBoxModelCode.SelectedIndex = 0; + cBoxModelCode.Enabled = false; + + + this.comMouldNumber.DisplayMember = "VALUE"; + this.comMouldNumber.ValueMember = "KEY"; + List comMouldNumberList = new List(); + foreach (var m in moldConfigList) + { + comMouldNumberList.Add(new { VALUE = m.MOLDSTATION, KEY = m.MOLDSTATION }); + } + this.comMouldNumber.DataSource = comMouldNumberList; + this.comMouldNumber.SelectedIndex = 0; + + //判断是否有正在使用的模腔配置信息 + if (moldConfigList.Count(o => o.USED == 1) > 0) + { + //获取该对象 + MoldConfig m = moldConfigList.First(o => o.USED == 1); + //设置模架选择项 + comMouldNumber.SelectedValue = m.MOLDSTATION; + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + } + #endregion + + #region 窗体保存事件 + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + string message = this.ErrorCheck(); + if (!string.IsNullOrEmpty(message)) + { + this.ErrorMessage.Text = message; + return; + } + List listRecorder = new List(); + //窗体数据校验 + //老搪塑只出黑色表皮,模腔号2 为高配B腔 模腔号3 为低配A腔,老搪塑只有一套模具,固定即可 + //搪塑机 + MachineInfo machineInfo = this.comMachineCode.SelectedItem as MachineInfo; + + #region 加载保存信息 + //for (int i = 0; i < 2; i++)//一次出2个码 + //{ + //零件属性 + Product recorder = new Product(); + ProductAttribute productAttribute = new ProductAttribute(); + //搪塑机编号 + productAttribute.VAL1 = machineInfo.MACHINENUM; + //产品类型(车型)成都固定 + productAttribute.VAL2 = "V"; + //高低配 成都无,且固定 + productAttribute.VAL3 = "B"; + //颜色 + productAttribute.VAL4 = this.comColor.SelectedValue.ToString(); + + string[] cb = new string[] { }; + if (!string.IsNullOrEmpty(this.cBoxModelCode.Text)) + { + cb = this.cBoxModelCode.Text.Split('+'); + } + if (cb.Length <= 0) + { + MessageBox.Show("模腔出错!"); + return; + } + + //腔 + + + if (this.comPosition.Text == "搪塑B腔")//第一个为模腔号2 + { + //腔 + productAttribute.VAL5 = "B"; + + //模腔 + productAttribute.VAL6 = cb[0].PadLeft(2, '0'); + } + else if (this.comPosition.Text == "搪塑A腔") + { + //腔 + productAttribute.VAL5 = "A"; + //模腔 + productAttribute.VAL6 = cb[1].PadLeft(2, '0'); + } + + //加工日期 + if (string.IsNullOrEmpty(this.dtpDate.Text.Trim())) + { + productAttribute.VAL7 = Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd HH:mm:ss"); + } + else + { + productAttribute.VAL7 = Convert.ToDateTime(this.dtpDate.Text.Trim()).ToString("yyyy-MM-dd HH:mm:ss"); + } + + recorder.MACHINECODDE = machineInfo.MACHINECODDE; + recorder.MACHINENAME = machineInfo.MACHINENAME; + recorder.PRODUCTSOURCE = EnumGeter.PRODUCTSOURCE.SELFMADE.GetHashCode().ToString(); + recorder.PRODUCTTYPE = EnumGeter.ProductType.biaopi.GetHashCode().ToString(); + + ////添加加物料号 + //QMAPP.ServicesAgent.ServiceAgent agents = ClientContext.GetServiceAgent(); + //DataResult materialcode = agents.InvokeServiceFunction>(B9BasicService.MaterialCodeBLL_GetMaterialCode.ToString(), productAttribute.VAL2); + //recorder.MATERIAL_CODE = materialcode.Result.ToString(); + + recorder.STATUS = EnumGeter.PRODUCTSTAUTS.QUALIFIED.GetHashCode().ToString(); + recorder.CURRENTPROCESS = EnumGeter.ProcessType.lengdaoruohua.GetHashCode().ToString(); + //ToDo:选择生产线 + //成都固定生产线 + recorder.PRODUCELINE = "IPVW371"; + + recorder.OUTFLAG = EnumGeter.PRODUCTOUTFLAG.INLIBRARY.GetHashCode().ToString(); + recorder.USINGSTATE = EnumGeter.PRODUCTUSESTATE.UNUSED.GetHashCode().ToString(); + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE; + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME; + recorder.CAPACITY = 1; + recorder.USINGCOUNT = 0; + recorder.PRODUCTATTRIBUTE = productAttribute; + recorder.AddM = this.cbM.Checked; + listRecorder.Add(recorder); + //} + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult> result = agent.InvokeServiceFunction>>(B9BasicService.ProductBLL_InsertListEpidermis.ToString(), listRecorder); + result_Save = result; + + btnCommSend_Click(sender, e); //发送信号 + + #endregion + + #endregion + } + #endregion + + #region 先判定称重,再进行打印 + /// + /// + /// + public DataResult> result_Save { get; set; } + /// + /// + /// + public void SaveProduct() + { + //保存成功 + if (result_Save.IsSuccess) + { + + #region 打印条码 + + this.DialogResult = System.Windows.Forms.DialogResult.OK; + string barCode = result_Save.Result.ToString(); + foreach (PrintCode item in result_Save.Result) + { + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = item.MAINCODE + ",*" + item.PRODUCTCODE + "*" + "," + item.COLOR_CODE; + QM.Assist.PrintUtil.LabelList2.Add(ll); + + + //创建新行 + var row = new DataGridViewRow(); + if (DGView.Rows.Count == 0) + { + var index = this.DGView.Rows.Add(); + row = DGView.Rows[index]; + } + else + { + this.DGView.Rows.InsertCopy(0, 0); + row = DGView.Rows[0]; + } + //对datagridview赋值 + row.Cells["MAINCODE"].Value = item.MAINCODE; + row.Cells["PRODUCTCODE"].Value = item.PRODUCTCODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["COLOR"].Value = item.COLOR_CODE; + row.Cells["CREATETIME"].Value = DateTime.Now; + if (DGView.Rows.Count > 200) + { + DGView.Rows.RemoveAt(200); + } + + #region 保存称重记录 + + var Entity = new TSWeighRecore(); + Entity.MATERIAL_CODE = item.PRODUCTCODE; + Entity.PColour = item.COLOR_CODE; + Entity.ProductCode = item.MAINCODE; + + List_tSWeighRecores.Add(Entity); + #endregion + + + } + + + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "temPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[EnumGeter.ProductType.biaopi.GetHashCode().ToString() + "dataPath"].ToString + ()); + + #endregion + + #region 重新设置当前使用和列表信息 + + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + + #region 重新设置当前使用 + + + DataResult updateresult = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_UpdateNextUsed.ToString(), new MoldConfig() { MOLDSTATION = moldStation }); + + #endregion + + #region 绑定下拉列表 + + DataPage dataPage = new DataPage(); + //获取前台分页设置信息 + dataPage.PageIndex = 1; + dataPage.PageSize = 100; + //获取可用的配置信息 + MoldConfig searchModel = new MoldConfig() { STATUS = 1 }; + dataPage = agent.InvokeServiceFunction(B9BasicService.MoldConfigBLL_GetList.ToString(), searchModel); + moldConfigList = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + moldConfigList = moldConfigList.OrderBy(o => o.INDEXVALUE).ToList(); + + + SetMouldStation(); + + #endregion + + #endregion + + //MessageBox.Show("打印成功!"); + + this.ErrorMessage.Text = ""; + + } + else + { + MessageBox.Show(result_Save.Msg); + } + } + + #endregion + + #region 窗体关闭 + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + #endregion + + #region 错误检测 + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region + string strMessage = ""; + //判断条码是否为空 + + ////搪塑设备 + if (this.comMachineCode.SelectedValue == null || this.comMachineCode.SelectedValue == string.Empty) + { + strMessage += Resource1.SlushMachineNullValidate + "\r\n"; + } + ////产品类别 + //if (this.comProType.SelectedValue == null || this.comProType.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.ProductTypeNullValidate + "\r\n"; + //} + //颜色 + if (this.comColor.SelectedValue == null || this.comColor.SelectedValue == string.Empty) + { + strMessage += Resource1.ColorNullValidate + "\r\n"; + } + ////高低配 + //if (this.comHOrL.SelectedValue == null || this.comHOrL.SelectedValue == string.Empty) + //{ + // strMessage += Resource1.HLNullValidate + "\r\n"; + //} + //腔 + if (this.comPosition.SelectedValue == null || this.comPosition.SelectedValue == string.Empty) + { + strMessage += Resource1.PositionNullValidate + "\r\n"; + } + ////模腔号 + //if (this.cBoxModelCode.Text == null || this.cBoxModelCode.Text == string.Empty) + //{ + // strMessage += Resource1.ModelCodeNullValidate + "\r\n"; + //} + + return strMessage; + #endregion + } + #endregion + + + /// + /// + /// + /// + /// + private void comMouldNumber_SelectedIndexChanged(object sender, EventArgs e) + { + var Station = comMouldNumber.SelectedItem; + string moldStation = GetPropertyValue(Station, "KEY").ToString(); + MoldConfig m = moldConfigList.First(o => o.MOLDSTATION == moldStation); + //设置模腔选择项 + cBoxModelCode.SelectedValue = m.MOLDVALUE; + } + + /// + /// + /// + /// + /// + /// + public object GetPropertyValue(object info, string field) + { + if (info == null) return null; + Type t = info.GetType(); + IEnumerable property = from pi in t.GetProperties() where pi.Name.ToLower() == field.ToLower() select pi; + return property.First().GetValue(info, null); + } + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachineCode.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachineCode.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region + + /// + /// + /// + /// + /// + public delegate void MyInitDelegate(RichTextBox myRtb, string strTemp); + public void DelegateInitMethod(RichTextBox myRtb, string strTemp) + { + myRtb.AppendText(strTemp + System.Environment.NewLine); + } + /// + /// 所有的串口类型 + /// + public enum HardwareEnum + { + Win32_Processor, + Win32_PhysicalMemory, + Win32_Keyboard, + Win32_PointingDevice, + Win32_FloppyDrive, + Win32_DiskDrive, + Win32_CDROMDrive, + Win32_BaseBoard, + Win32_BIOS, + Win32_ParallelPort, + Win32_SerialPort, + Win32_SerialPortConfiguration, + Win32_SoundDevice, + Win32_SystemSlot, + Win32_USBController, + Win32_NetworkAdapter, + Win32_NetworkAdapterConfiguration, + Win32_Printer, + Win32_PrinterConfiguration, + Win32_PrintJob, + Win32_TCPIPPrinterPort, + Win32_POTSModem, + Win32_POTSModemToSerialPort, + Win32_DesktopMonitor, + Win32_DisplayConfiguration, + Win32_DisplayControllerConfiguration, + Win32_VideoController, + Win32_VideoSettings, + Win32_TimeZone, + Win32_SystemDriver, + Win32_DiskPartition, + Win32_LogicalDisk, + Win32_LogicalDiskToPartition, + Win32_LogicalMemoryConfiguration, + Win32_PageFile, + Win32_PageFileSetting, + Win32_BootConfiguration, + Win32_ComputerSystem, + Win32_OperatingSystem, + Win32_StartupCommand, + Win32_Service, + Win32_Group, + Win32_GroupUser, + Win32_UserAccount, + Win32_Process, + Win32_Thread, + Win32_Share, + Win32_NetworkClient, + Win32_NetworkProtocol, + Win32_PnPEntity, + } + + /// + /// 获取所有串口数据(2) + /// + public static string[] MulGetHardwareInfo(HardwareEnum hardType, string propKey) + { + + List stringList = new List(); + try + { + + ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("select * from " + (object)hardType); + + foreach (ManagementBaseObject managementBaseObject in managementObjectSearcher.Get()) + { + if (managementBaseObject.Properties[propKey].Value != null) + { + string s = managementBaseObject.Properties[propKey].Value.ToString(); + int num = s.LastIndexOf("(COM"); + + if (num != -1 && char.IsNumber(s, num + 4)) + stringList.Add(managementBaseObject.Properties[propKey].Value.ToString()); + } + } + + managementObjectSearcher.Dispose(); + return stringList.ToArray(); + } + catch + { + MessageBox.Show("MulGetHardwareInfo!"); + return stringList.ToArray(); + } + finally + { + } + } + + /// + /// 获取所有串口数据(1) + /// + private void frmMain_Load() + { + try + { + string[] hardwareInfo = MulGetHardwareInfo(HardwareEnum.Win32_PnPEntity, "Name"); + + int length = hardwareInfo.Length; + List listItem = new List(); + + for (int index = 0; index < length; ++index) + { + listItem.Add(new ListItem((string)hardwareInfo[index], (string)hardwareInfo[index])); + } + this.textBox1.DataSource = listItem; + this.textBox1.DisplayMember = "VALUE"; + this.textBox1.ValueMember = "KEY"; + } + catch + { + MessageBox.Show("frmMain_Load!"); + } + + + } + + public string CodeName = string.Empty; + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + string text = this.textBox1.SelectedValue.ToString(); + int num = text.LastIndexOf("COM"); + + if (num == -1) + return; + + char ch1 = text[num + 3]; + char ch2 = text[num + 4]; + + if ((int)ch2 == 41) + CodeName = "COM" + (object)ch1; + else + CodeName = "COM" + (object)ch1 + (object)ch2; + } + catch + { + MessageBox.Show("comboBox1_SelectedIndexChanged!"); + } + + } + public string Weigh_str = string.Empty; + private SerialPort serialPort1 = new SerialPort(); + + /// + /// 获取设备返回结果 + /// + /// + /// + private void serialPort1_DataReceived(object sender, EventArgs e) + { + try + { + int bytesToRead = this.serialPort1.BytesToRead; + + if (bytesToRead == 0) + return; + + //TBRCV.Text = ""; + bool flag = true; + + while (flag) + { + Thread.Sleep(50); + + if (this.serialPort1.BytesToRead == bytesToRead) + flag = false; + else + bytesToRead = this.serialPort1.BytesToRead; + } + + byte[] numArray1 = new byte[bytesToRead]; + this.serialPort1.Read(numArray1, 0, bytesToRead); + byte[] numArray2 = callcrc(numArray1, bytesToRead - 2); + string str = string.Empty; + + for (int index = 0; index < numArray1.Length; ++index) + str = (int)numArray1[index] >= 16 ? str + Convert.ToString(numArray1[index], 16) + " " : str + "0" + Convert.ToString(numArray1[index], 16) + " "; + + if ((int)numArray2[0] == (int)numArray1[bytesToRead - 2] && + (int)numArray2[1] == (int)numArray1[bytesToRead - 1]) + { + if (!string.IsNullOrEmpty(_cfgSlushMolding)) + { + var SP = _cfgSlushMolding.Split(','); + var SP_Begin = Convert.ToInt32(SP[0]); + var SP_End = Convert.ToInt32(SP[1]); + Weigh_str = str.ToUpper(); + //TBRCV.BeginInvoke(new MyInitDelegate(DelegateInitMethod), new object[] { TBRCV, str.ToUpper() }); + Weigh_str = Weigh_str.Trim(); + Weigh_str = Weigh_str.Substring(Weigh_str.Length - 11, 2) + Weigh_str.Substring(Weigh_str.Length - 8, 2); + Weigh_str = Convert.ToInt32(Weigh_str, 16).ToString(); + var Weigh_Num = Convert.ToInt32(Weigh_str); + if (SP_Begin <= Weigh_Num && Weigh_Num <= SP_End) + { + SaveProduct(); + foreach (var t in List_tSWeighRecores) + { + t.Weigh = Weigh_str; + agent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.TSWeighRecoreBLL_Insert.ToString(), t); + } + List_tSWeighRecores = new List(); + this.TBRCV.Text = str.ToUpper(); + } + else + { + this.TBRCV.Text = $"重量{Weigh_Num},超出{_cfgSlushMolding}安全区间!"; + infolabel.Text = $"重量{Weigh_Num},超出{_cfgSlushMolding}安全区间!"; + } + + } + else + { + this.TBRCV.Text = "未配置安全区间"; + infolabel.Text = "未配置安全区间"; + } + + } + else + { + Weigh_str = "接收错误"; + this.TBRCV.Text = str.ToUpper() + "接收错误 CRC有误"; + infolabel.Text = str.ToUpper() + "接收错误 CRC有误"; + } + } + catch + { + MessageBox.Show("serialPort1_DataReceived!"); + } + } + public static byte[] strToToHexByte(string hexString) + { + try + { + hexString = hexString.Replace(" ", ""); + + if (hexString.Length % 2 != 0) + hexString += "0"; + + byte[] numArray = new byte[hexString.Length / 2]; + + for (int index = 0; index < numArray.Length; ++index) + { + try + { + numArray[index] = Convert.ToByte(hexString.Substring(index * 2, 2), 16); + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + return numArray; + } + catch + { + MessageBox.Show("strToToHexByte!"); + return new byte[] { }; + } + + } + public static byte[] addCrcHexByte(byte[] strHexByte) + { + try + { + byte[] numArray = new byte[strHexByte.Length + 2]; + + for (int index = 0; index < strHexByte.Length; ++index) + { + try + { + numArray[index] = strHexByte[index]; + } + catch + { + int num = (int)MessageBox.Show("输入可能错误"); + } + } + + byte[] numArray2 = callcrc(strHexByte, strHexByte.Length); + numArray[strHexByte.Length + 0] = numArray2[0]; + numArray[strHexByte.Length + 1] = numArray2[1]; + return numArray; + } + catch + { + MessageBox.Show("addCrcHexByte!"); + return new byte[] { }; + } + + } + public static byte[] callcrc(byte[] ss, int num) + { + try + { + ushort num1 = ushort.MaxValue; + byte[] numArray = ss; + + for (byte index1 = 0; (int)index1 < num; ++index1) + { + num1 ^= (ushort)numArray[(int)index1]; + + for (byte index2 = 0; (int)index2 < 8; ++index2) + { + if (((int)num1 & 1) > 0) + num1 = (ushort)((uint)(ushort)((uint)num1 >> 1) ^ 40961U); + else + num1 >>= 1; + } + } + + byte num2 = (byte)((uint)num1 >> 8); + return new byte[2] + { + (byte)((uint) num1 & (uint) byte.MaxValue), + num2 + }; + } + catch + { + MessageBox.Show("callcrc!"); + return new byte[] { }; + } + + } + + /// + /// 打开设备通讯 + /// + /// + /// + private void btnCom_Click(object sender, EventArgs e) + { + try + { + if (CodeName == "") + { + comboBox1_SelectedIndexChanged(sender, e); + } + + serialPort1.BaudRate = Convert.ToInt32(19200); + serialPort1.Parity = Parity.None; + serialPort1.DataBits = 8; + serialPort1.StopBits = StopBits.One; + serialPort1.ReadBufferSize = 4068; + serialPort1.WriteBufferSize = 4068; + serialPort1.ReadTimeout = 200; + serialPort1.WriteTimeout = 200; + serialPort1.PortName = CodeName; + serialPort1.Open(); + + this.TBSEND.Text = "连接设备"; + } + catch + { + MessageBox.Show("btnCom_Click!"); + } + + } + + /// + /// 发送连接请求 + /// + /// + /// + private void btnCommSend_Click(object sender, EventArgs e) + { + try { + //btnCom_Click(); + if (serialPort1.IsOpen) + { + byte[] toHexByte = strToToHexByte("01" + "03" + "0FA1" + "0002"); + byte[] buffer = addCrcHexByte(toHexByte); + serialPort1.Write(buffer, 0, buffer.Length); + //TBRCV.Text = ""; + TBSEND.Text = ""; + string str = string.Empty; + + for (int index = 0; index < buffer.Length; ++index) + str = (int)buffer[index] >= 16 ? str + Convert.ToString(buffer[index], 16) + " " : str + "0" + Convert.ToString(buffer[index], 16) + " "; + + TBSEND.Text = str.ToUpper(); + } + else + { + int num1 = (int)MessageBox.Show("请打开设备连接!"); + } + } + catch + { + MessageBox.Show("btnCommSend_Click!"); + } + + } + + #endregion + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + } +} diff --git a/.svn/pristine/b8/b86d5fcff885687d05347d981f57c890d3a4a11f.svn-base b/.svn/pristine/b8/b86d5fcff885687d05347d981f57c890d3a4a11f.svn-base new file mode 100644 index 0000000..f41f60d Binary files /dev/null and b/.svn/pristine/b8/b86d5fcff885687d05347d981f57c890d3a4a11f.svn-base differ diff --git a/.svn/pristine/b8/b8aed15b45c69a3e1f16d4718b82b783cec95dbb.svn-base b/.svn/pristine/b8/b8aed15b45c69a3e1f16d4718b82b783cec95dbb.svn-base new file mode 100644 index 0000000..788c07c --- /dev/null +++ b/.svn/pristine/b8/b8aed15b45c69a3e1f16d4718b82b783cec95dbb.svn-base @@ -0,0 +1,267 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectionMoldingNEWEditForm1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSave = new System.Windows.Forms.ToolStripButton(); + this.tsbClose = new System.Windows.Forms.ToolStripButton(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.BucketCode = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.SerialCode = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.BatchCode = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.toolStrip1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSave, + this.tsbClose}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(798, 60); + this.toolStrip1.TabIndex = 0; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSave + // + this.tsbSave.AutoSize = false; + this.tsbSave.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSave.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbSave.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(100, 60); + this.tsbSave.Text = "保存"; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // tsbClose + // + this.tsbClose.AutoSize = false; + this.tsbClose.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbClose.Image = global::QMAPP.WinForm.Resource1.cancle; + this.tsbClose.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbClose.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbClose.Name = "tsbClose"; + this.tsbClose.Size = new System.Drawing.Size(100, 60); + this.tsbClose.Text = "关闭"; + this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.textBox1); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.BucketCode); + this.groupBox1.Controls.Add(this.label10); + this.groupBox1.Controls.Add(this.SerialCode); + this.groupBox1.Controls.Add(this.label9); + this.groupBox1.Controls.Add(this.label12); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.BatchCode); + this.groupBox1.Controls.Add(this.label13); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Location = new System.Drawing.Point(3, 63); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(789, 476); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.ForeColor = System.Drawing.Color.Red; + this.label1.Location = new System.Drawing.Point(171, 161); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(11, 12); + this.label1.TabIndex = 16; + this.label1.Text = "*"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label2.Location = new System.Drawing.Point(182, 159); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(68, 16); + this.label2.TabIndex = 15; + this.label2.Text = "零件号:"; + // + // BucketCode + // + this.BucketCode.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); + this.BucketCode.Location = new System.Drawing.Point(266, 64); + this.BucketCode.MaxLength = 20; + this.BucketCode.Name = "BucketCode"; + this.BucketCode.Size = new System.Drawing.Size(265, 31); + this.BucketCode.TabIndex = 1; + this.BucketCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BucketCode_TextChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(174, 344); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(11, 12); + this.label10.TabIndex = 12; + this.label10.Text = "*"; + // + // SerialCode + // + this.SerialCode.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); + this.SerialCode.Location = new System.Drawing.Point(266, 334); + this.SerialCode.MaxLength = 20; + this.SerialCode.Name = "SerialCode"; + this.SerialCode.Size = new System.Drawing.Size(265, 31); + this.SerialCode.TabIndex = 13; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label9.Location = new System.Drawing.Point(185, 342); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(68, 16); + this.label9.TabIndex = 11; + this.label9.Text = "流水号:"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.ForeColor = System.Drawing.Color.Red; + this.label12.Location = new System.Drawing.Point(164, 249); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(11, 12); + this.label12.TabIndex = 9; + this.label12.Text = "*"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.ForeColor = System.Drawing.Color.Red; + this.label4.Location = new System.Drawing.Point(167, 73); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(11, 12); + this.label4.TabIndex = 9; + this.label4.Text = "*"; + // + // BatchCode + // + this.BatchCode.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); + this.BatchCode.Location = new System.Drawing.Point(266, 239); + this.BatchCode.MaxLength = 20; + this.BatchCode.Name = "BatchCode"; + this.BatchCode.Size = new System.Drawing.Size(265, 31); + this.BatchCode.TabIndex = 14; + this.BatchCode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BatchCode_TextChanged); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label13.Location = new System.Drawing.Point(174, 246); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(85, 16); + this.label13.TabIndex = 6; + this.label13.Text = "投料批次:"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.label3.Location = new System.Drawing.Point(176, 71); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(85, 16); + this.label3.TabIndex = 6; + this.label3.Text = "料筒编码:"; + // + // textBox1 + // + this.textBox1.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Bold); + this.textBox1.Location = new System.Drawing.Point(266, 152); + this.textBox1.MaxLength = 20; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(265, 31); + this.textBox1.TabIndex = 17; + this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PartCode_TextChanged); + // + // InjectionMoldingNEWEditForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(798, 544); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.toolStrip1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "InjectionMoldingNEWEditForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "注塑投料"; + this.Load += new System.EventHandler(this.Form_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tsbSave; + private System.Windows.Forms.ToolStripButton tsbClose; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox BatchCode; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox SerialCode; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox BucketCode; + private System.Windows.Forms.TextBox textBox1; + } +} \ No newline at end of file diff --git a/.svn/pristine/b9/b9549d3647a4fba56a1fda8cea2e95d04e57625c.svn-base b/.svn/pristine/b9/b9549d3647a4fba56a1fda8cea2e95d04e57625c.svn-base new file mode 100644 index 0000000..cfd2268 --- /dev/null +++ b/.svn/pristine/b9/b9549d3647a4fba56a1fda8cea2e95d04e57625c.svn-base @@ -0,0 +1,19 @@ + + + + MES + + 5C2DE907DB859810 + + + + + + http://10.60.195.167:91/OpcService.asmx + + + 20000 + + + + diff --git a/.svn/pristine/ba/ba3757a72a7c2d381647ac406bc7c7dff82c3d79.svn-base b/.svn/pristine/ba/ba3757a72a7c2d381647ac406bc7c7dff82c3d79.svn-base new file mode 100644 index 0000000..9371287 --- /dev/null +++ b/.svn/pristine/ba/ba3757a72a7c2d381647ac406bc7c7dff82c3d79.svn-base @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Windows.Forms; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + public partial class BZDRePrintForm : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + List _bzdConfig = null; + + Product _CurrentProduct = null; + private OperationForm _parentForm; + + + public BZDRePrintForm(OperationForm parentForm) + { + InitializeComponent(); + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + _parentForm = parentForm; + } + + #region 打印按钮 + + /// + /// 打印按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + + if (string.IsNullOrWhiteSpace(cbMaterial.Text)) + { + infolabel.Text = "请选择总成零件号!"; + cbMaterial.Focus(); + return; + } + + if (string.IsNullOrEmpty(txtMainCode.Text)) + { + infolabel.Text = "请扫描或填写装配码!"; + + txtMainCode.Focus(); + return; + } + + //***************************** + var _Product = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = txtMainCode.Text }); + + if (_Product == null) + { + string BZDRule = ""; + DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "BZDRule"); + if (dataTable.Rows.Count > 0) + { + BZDRule = dataTable.Rows[0]["Value"].ToString(); + } + if (string.IsNullOrEmpty(BZDRule)) + { + MessageBox.Show("未配置总成规则!"); + return; + } + string MATERIAL_CODE = cbMaterial.Text.Split('|')[0]; + + if (System.Text.RegularExpressions.Regex.IsMatch(txtMainCode.Text, BZDRule)) + { + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtMainCode.Text, Type = "BZD条码补打" }); + + _parentForm.planMATERIAL_CODE = MATERIAL_CODE; + _parentForm.processMainCode = txtMainCode.Text; + //_parentForm.cBoxVAN = false; + _parentForm.Print052QRCODE(false); + } + + else + { + MessageBox.Show("条码规则不符合!"); + } + + } + else + MessageBox.Show("条码已存在!"); + } + catch (Exception exception) + { + MessageBox.Show("打印失败!"); + throw; + } + } + + #endregion + + + #region 初始界面 + + /// + /// + /// + /// + /// + private void PrintForm_Load(object sender, EventArgs e) + { + _bzdConfig = + _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),""); + foreach (var t in _bzdConfig) + { + t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail; + } + LoadAssyMaterial(); + } + + #endregion + + #region 加载总成物料 + + /// + /// 加载总成物料 + /// + private void LoadAssyMaterial() + { + + //模腔号 + this.cbMaterial.DataSource = _bzdConfig; + this.cbMaterial.DisplayMember = "MATERIALCODDE"; + this.cbMaterial.ValueMember = "PID"; + } + + + + #endregion + + private void label2_Click(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/.svn/pristine/bc/bc0524dae88929e9e5c8612f0fa16d3cd8b36f4d.svn-base b/.svn/pristine/bc/bc0524dae88929e9e5c8612f0fa16d3cd8b36f4d.svn-base new file mode 100644 index 0000000..1e4d0e1 Binary files /dev/null and b/.svn/pristine/bc/bc0524dae88929e9e5c8612f0fa16d3cd8b36f4d.svn-base differ diff --git a/.svn/pristine/bc/bc2ba70f65df174a86fe62511ae87054eeff80c3.svn-base b/.svn/pristine/bc/bc2ba70f65df174a86fe62511ae87054eeff80c3.svn-base new file mode 100644 index 0000000..6506661 --- /dev/null +++ b/.svn/pristine/bc/bc2ba70f65df174a86fe62511ae87054eeff80c3.svn-base @@ -0,0 +1,209 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QMAPP.WinForm.Common; +using QMAPP.ServicesAgent.LoginService; +using System.Deployment.Application; +using System.Diagnostics; + +namespace QMAPP.WinForm +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main(string[] Args) + { + + bool createNew; + using (System.Threading.Mutex m = new System.Threading.Mutex(true, Application.ProductName, out createNew)) + { + if (createNew) + { + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + //绑定异常处理事件 + Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); + Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); + AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + + //增加自动更新程序 + var form = new FormSplash(); + if (DialogResult.OK != form.ShowDialog()) return; + + //string path = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"]; + //if (!System.IO.Directory.Exists(path)) + //{ + // System.IO.Directory.CreateDirectory(path); + //} + + var switchserver = LocalSetting.Settings["SwitchServer", ""]; + if (string.Equals(switchserver,"1")) + { + ServerSwitch frmSwitch = new ServerSwitch(); + frmSwitch.ShowDialog(); + LocalSetting.Settings["SwitchServer"] = "0"; + } + + + //系统初始化 + ClientContext.Init(); + //加载静态基础数据 + QMFrameWork.Common.Util.ModelDictionaryHandler.Configure(); + + + Application.Run(new LoginForm()); + } + else + { + MessageBox.Show("程序已启动!"); + } + } + + + + } + + #region 异常处理事件 + + static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) + { + HandleException(e.Exception); + } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + try + { + if (e.ExceptionObject is System.Exception) + { + HandleException((System.Exception)e.ExceptionObject); + } + } + catch (Exception ex) + { + HandleException(ex); + } + } + + #endregion + + #region 处理异常 + + static void HandleException(Exception ex) + { + try + { + //AppService.RecordException(ex); + System.Text.StringBuilder error = new System.Text.StringBuilder(); + error.AppendFormat("BEGIN:{0:yyyy-MM-dd HH:mm:ss}-------------\r\n", DateTime.Now); + error.AppendLine(ex.Message); + error.AppendLine(ex.StackTrace); + error.AppendLine("-----------------------------------------END"); + WriteLog.WriteError(error.ToString()); + } + catch + { } + finally + { + if (ex.GetBaseException() is System.BadImageFormatException) + { + if (!ApplicationDeployment.IsNetworkDeployed) + { + MessageBox.Show("程序文件损坏!需要重新安装程序。", "程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error); + Application.ExitThread(); + Environment.Exit(0); + } + else + { + var result=MessageBox.Show("程序文件损坏!需要重新安装程序。\r\n点击“确定”运行自动卸载。","程序异常",MessageBoxButtons.OKCancel,MessageBoxIcon.Error); + if (result == DialogResult.OK) + { + try + { + //var ad = ApplicationDeployment.CurrentDeployment; + //ApplicationDeployment.CurrentDeployment. + //System.IO.Directory.Delete(Application.StartupPath); + //MessageBox.Show("应用程序已卸载,现在将重新启动安装程序。","程序更新",MessageBoxButtons.OK,MessageBoxIcon.Information); + //Application.Restart(); + var bat = CreateUninstallBat(); + Process p = new Process(); + var pinfo = new ProcessStartInfo(bat); + pinfo.WorkingDirectory = "C:\\"; + Process.Start(pinfo); + + } + catch (DeploymentDownloadException dde) + { + MessageBox.Show("未能更新应用程序! \n\n请检查网络连接是否正常, 或再次尝试。 \r\n 错误: " + dde,"程序更新",MessageBoxButtons.OK,MessageBoxIcon.Error); + Application.ExitThread(); + Environment.Exit(0); + } + } + else + { + Application.ExitThread(); + Environment.Exit(0); + } + } + } + else + { + MessageBox.Show(ex.Message, "程序异常", MessageBoxButtons.OK, MessageBoxIcon.Error); + //Application.Exit(); + } + } + } + + #endregion + + #region 生成删除安装目录批处理命令 + + public static string CreateUninstallBat() + { + string batpath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"]; + batpath = batpath + "MESAutoUninstall.bat"; + + string exepath = Application.StartupPath; + string[] pathparts=exepath.Split(System.IO.Path.DirectorySeparatorChar); + string apppath = System.IO.Path.GetPathRoot(exepath)+System.IO.Path.Combine(pathparts.Skip(1).Take(pathparts.Length-3).ToArray()); + + + + System.Text.StringBuilder cmd = new System.Text.StringBuilder(); + cmd.AppendLine("@echo off"); + cmd.AppendLine("mode con cols=80 lines=20"); + cmd.AppendLine("title MES自动卸载工具"); + cmd.AppendLine("cls"); + cmd.AppendLine("echo 正在关闭MES程序..."); + cmd.AppendLine("taskkill /F /IM QMAPP.WinForm.exe "); + cmd.AppendLine("timeout /t 5 /nobreak"); + cmd.AppendLine("cls"); + cmd.AppendLine("echo 正在卸载MES程序..."); + cmd.AppendLine(string.Format("rd/s/q \"{0}\"", apppath)); + cmd.AppendLine("cls"); + cmd.AppendLine("echo."); + cmd.AppendLine("echo MES程序卸载完成"); + cmd.AppendLine("echo."); + cmd.AppendLine("echo 请重新启动MES程序"); + cmd.AppendLine("timeout /t 5"); + cmd.AppendLine(string.Format("del \"{0}\"", batpath)); + cmd.AppendLine("exit"); + + using (var stream = System.IO.File.Create(batpath)) + { + System.IO.StreamWriter sw = new System.IO.StreamWriter(stream, System.Text.Encoding.Default); + sw.Write(cmd.ToString()); + sw.Close(); + } + return batpath; + } + + #endregion + } +} diff --git a/.svn/pristine/bc/bc7bcd38ebe0a2acb3674d846c2b78438bc0a6de.svn-base b/.svn/pristine/bc/bc7bcd38ebe0a2acb3674d846c2b78438bc0a6de.svn-base new file mode 100644 index 0000000..8cad8b2 --- /dev/null +++ b/.svn/pristine/bc/bc7bcd38ebe0a2acb3674d846c2b78438bc0a6de.svn-base @@ -0,0 +1,1087 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectionCodePrint + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.MAINCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MATERIAL_NAME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PRODUCTCODE = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CREATETIME = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.paneldouble = new System.Windows.Forms.Panel(); + this.comboxMaterial = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnChoiceMaterial = new System.Windows.Forms.Button(); + this.tsbPrint = new System.Windows.Forms.Button(); + this.textMaterialName = new System.Windows.Forms.TextBox(); + this.txtMaterialCode = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.plPrintSetting = new System.Windows.Forms.Panel(); + this.panel34 = new System.Windows.Forms.Panel(); + this.txtMaterial2 = new System.Windows.Forms.TextBox(); + this.labelTex2 = new System.Windows.Forms.Label(); + this.txtMaterial4 = new System.Windows.Forms.TextBox(); + this.txtMaterial3 = new System.Windows.Forms.TextBox(); + this.labelTex4 = new System.Windows.Forms.Label(); + this.labelTex3 = new System.Windows.Forms.Label(); + this.cbMould = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.radioButSignal = new System.Windows.Forms.RadioButton(); + this.radioButDouble = new System.Windows.Forms.RadioButton(); + this.radioButFourth = new System.Windows.Forms.RadioButton(); + this.label10 = new System.Windows.Forms.Label(); + this.comMachine = new System.Windows.Forms.ComboBox(); + this.btnLockMachine = new System.Windows.Forms.Button(); + this.tpPrintMode = new System.Windows.Forms.TabControl(); + this.tpOnline = new System.Windows.Forms.TabPage(); + this.cbSkipHistory = new System.Windows.Forms.CheckBox(); + this.btnStartFileScan = new System.Windows.Forms.Button(); + this.btnStopFileScan = new System.Windows.Forms.Button(); + this.tpManual = new System.Windows.Forms.TabPage(); + this.cbTemplateDesign = new System.Windows.Forms.CheckBox(); + this.tpTimer = new System.Windows.Forms.TabPage(); + this.label5 = new System.Windows.Forms.Label(); + this.cbPrintSpan = new System.Windows.Forms.ComboBox(); + this.cbPrintCount = new System.Windows.Forms.ComboBox(); + this.btnStart = new System.Windows.Forms.Button(); + this.btnStop = new System.Windows.Forms.Button(); + this.lblLastCount = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.timer2 = new System.Windows.Forms.Timer(this.components); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.lvParamRecords = new System.Windows.Forms.ListView(); + this.chDate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.picConnectState = new System.Windows.Forms.PictureBox(); + this.txtConnectState = new System.Windows.Forms.TextBox(); + this.txtLastScanTime = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.txtMessage = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.txtCurrentFile = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.txtFilePath = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.comboxMaterial3 = new System.Windows.Forms.ComboBox(); + this.comboxMaterial4 = new System.Windows.Forms.ComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.paneldouble.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.plPrintSetting.SuspendLayout(); + this.panel34.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.tpPrintMode.SuspendLayout(); + this.tpOnline.SuspendLayout(); + this.tpManual.SuspendLayout(); + this.tpTimer.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picConnectState)).BeginInit(); + this.SuspendLayout(); + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.MAINCODE, + this.MATERIAL_NAME, + this.PRODUCTCODE, + this.CREATETIME}); + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(3, 3); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle24.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle24; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(667, 567); + this.DGView.TabIndex = 38; + // + // MAINCODE + // + this.MAINCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MAINCODE.DataPropertyName = "MAINCODE"; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 15.75F); + this.MAINCODE.DefaultCellStyle = dataGridViewCellStyle20; + this.MAINCODE.FillWeight = 48.95314F; + this.MAINCODE.HeaderText = "条码信息"; + this.MAINCODE.Name = "MAINCODE"; + this.MAINCODE.ReadOnly = true; + this.MAINCODE.Width = 280; + // + // MATERIAL_NAME + // + this.MATERIAL_NAME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.MATERIAL_NAME.DataPropertyName = "MATERIAL_NAME"; + dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 15.75F); + this.MATERIAL_NAME.DefaultCellStyle = dataGridViewCellStyle21; + this.MATERIAL_NAME.FillWeight = 99.90437F; + this.MATERIAL_NAME.HeaderText = "零件名称"; + this.MATERIAL_NAME.Name = "MATERIAL_NAME"; + this.MATERIAL_NAME.ReadOnly = true; + this.MATERIAL_NAME.Width = 260; + // + // PRODUCTCODE + // + this.PRODUCTCODE.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.PRODUCTCODE.DataPropertyName = "PRODUCTCODE"; + dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.PRODUCTCODE.DefaultCellStyle = dataGridViewCellStyle22; + this.PRODUCTCODE.FillWeight = 48.95314F; + this.PRODUCTCODE.HeaderText = "零件号"; + this.PRODUCTCODE.Name = "PRODUCTCODE"; + this.PRODUCTCODE.ReadOnly = true; + this.PRODUCTCODE.Width = 200; + // + // CREATETIME + // + this.CREATETIME.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.CREATETIME.DataPropertyName = "CREATETIME"; + dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle23.Format = "f"; + dataGridViewCellStyle23.NullValue = null; + this.CREATETIME.DefaultCellStyle = dataGridViewCellStyle23; + this.CREATETIME.FillWeight = 48.95314F; + this.CREATETIME.HeaderText = "操作时间"; + this.CREATETIME.Name = "CREATETIME"; + this.CREATETIME.ReadOnly = true; + this.CREATETIME.Width = 250; + // + // paneldouble + // + this.paneldouble.Controls.Add(this.comboxMaterial); + this.paneldouble.Controls.Add(this.label2); + this.paneldouble.Location = new System.Drawing.Point(0, 215); + this.paneldouble.Name = "paneldouble"; + this.paneldouble.Size = new System.Drawing.Size(449, 38); + this.paneldouble.TabIndex = 52; + this.paneldouble.Visible = false; + // + // comboxMaterial + // + this.comboxMaterial.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboxMaterial.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comboxMaterial.Location = new System.Drawing.Point(71, 3); + this.comboxMaterial.Name = "comboxMaterial"; + this.comboxMaterial.Size = new System.Drawing.Size(369, 30); + this.comboxMaterial.TabIndex = 40; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(0, 7); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(67, 22); + this.label2.TabIndex = 41; + this.label2.Text = "零件#2:"; + // + // btnChoiceMaterial + // + this.btnChoiceMaterial.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnChoiceMaterial.Location = new System.Drawing.Point(6, 86); + this.btnChoiceMaterial.Name = "btnChoiceMaterial"; + this.btnChoiceMaterial.Size = new System.Drawing.Size(124, 44); + this.btnChoiceMaterial.TabIndex = 37; + this.btnChoiceMaterial.Text = "选择零件信息"; + this.btnChoiceMaterial.UseVisualStyleBackColor = true; + this.btnChoiceMaterial.Click += new System.EventHandler(this.btnChoiceMaterial_Click); + // + // tsbPrint + // + this.tsbPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tsbPrint.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tsbPrint.Image = global::QMAPP.WinForm.Resource1.save; + this.tsbPrint.Location = new System.Drawing.Point(241, 6); + this.tsbPrint.Name = "tsbPrint"; + this.tsbPrint.Size = new System.Drawing.Size(190, 83); + this.tsbPrint.TabIndex = 34; + this.tsbPrint.Text = "打印"; + this.tsbPrint.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.tsbPrint.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.tsbPrint.UseVisualStyleBackColor = true; + this.tsbPrint.Click += new System.EventHandler(this.tsbPrint_Click); + // + // textMaterialName + // + this.textMaterialName.BackColor = System.Drawing.SystemColors.Control; + this.textMaterialName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.textMaterialName.Location = new System.Drawing.Point(70, 141); + this.textMaterialName.MaxLength = 3096; + this.textMaterialName.Name = "textMaterialName"; + this.textMaterialName.ReadOnly = true; + this.textMaterialName.Size = new System.Drawing.Size(370, 29); + this.textMaterialName.TabIndex = 33; + // + // txtMaterialCode + // + this.txtMaterialCode.BackColor = System.Drawing.SystemColors.Control; + this.txtMaterialCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtMaterialCode.Location = new System.Drawing.Point(70, 180); + this.txtMaterialCode.MaxLength = 3096; + this.txtMaterialCode.Name = "txtMaterialCode"; + this.txtMaterialCode.ReadOnly = true; + this.txtMaterialCode.Size = new System.Drawing.Size(370, 29); + this.txtMaterialCode.TabIndex = 30; + this.txtMaterialCode.TextChanged += new System.EventHandler(this.txtMaterialCode_TextChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(3, 183); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(63, 22); + this.label6.TabIndex = 29; + this.label6.Text = "零件号:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 144); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 22); + this.label1.TabIndex = 25; + this.label1.Text = "零件名:"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.plPrintSetting); + this.groupBox1.Controls.Add(this.tpPrintMode); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Right; + this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(685, 4); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(451, 607); + this.groupBox1.TabIndex = 40; + this.groupBox1.TabStop = false; + // + // plPrintSetting + // + this.plPrintSetting.Controls.Add(this.paneldouble); + this.plPrintSetting.Controls.Add(this.panel34); + this.plPrintSetting.Controls.Add(this.cbMould); + this.plPrintSetting.Controls.Add(this.label6); + this.plPrintSetting.Controls.Add(this.label1); + this.plPrintSetting.Controls.Add(this.label9); + this.plPrintSetting.Controls.Add(this.txtMaterialCode); + this.plPrintSetting.Controls.Add(this.btnChoiceMaterial); + this.plPrintSetting.Controls.Add(this.groupBox3); + this.plPrintSetting.Controls.Add(this.label10); + this.plPrintSetting.Controls.Add(this.textMaterialName); + this.plPrintSetting.Controls.Add(this.comMachine); + this.plPrintSetting.Controls.Add(this.btnLockMachine); + this.plPrintSetting.Dock = System.Windows.Forms.DockStyle.Top; + this.plPrintSetting.Location = new System.Drawing.Point(3, 25); + this.plPrintSetting.Margin = new System.Windows.Forms.Padding(0); + this.plPrintSetting.Name = "plPrintSetting"; + this.plPrintSetting.Size = new System.Drawing.Size(445, 404); + this.plPrintSetting.TabIndex = 64; + // + // panel34 + // + this.panel34.Controls.Add(this.comboxMaterial4); + this.panel34.Controls.Add(this.comboxMaterial3); + this.panel34.Controls.Add(this.txtMaterial2); + this.panel34.Controls.Add(this.labelTex2); + this.panel34.Controls.Add(this.txtMaterial4); + this.panel34.Controls.Add(this.txtMaterial3); + this.panel34.Controls.Add(this.labelTex4); + this.panel34.Controls.Add(this.labelTex3); + this.panel34.Location = new System.Drawing.Point(0, 212); + this.panel34.Name = "panel34"; + this.panel34.Size = new System.Drawing.Size(449, 118); + this.panel34.TabIndex = 50; + this.panel34.Visible = false; + // + // txtMaterial2 + // + this.txtMaterial2.BackColor = System.Drawing.SystemColors.Control; + this.txtMaterial2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtMaterial2.Location = new System.Drawing.Point(70, 8); + this.txtMaterial2.MaxLength = 3096; + this.txtMaterial2.Name = "txtMaterial2"; + this.txtMaterial2.ReadOnly = true; + this.txtMaterial2.Size = new System.Drawing.Size(369, 29); + this.txtMaterial2.TabIndex = 56; + // + // labelTex2 + // + this.labelTex2.AutoSize = true; + this.labelTex2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelTex2.Location = new System.Drawing.Point(1, 11); + this.labelTex2.Name = "labelTex2"; + this.labelTex2.Size = new System.Drawing.Size(67, 22); + this.labelTex2.TabIndex = 55; + this.labelTex2.Text = "零件#2:"; + // + // txtMaterial4 + // + this.txtMaterial4.BackColor = System.Drawing.SystemColors.Control; + this.txtMaterial4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtMaterial4.Location = new System.Drawing.Point(71, 83); + this.txtMaterial4.MaxLength = 3096; + this.txtMaterial4.Name = "txtMaterial4"; + this.txtMaterial4.ReadOnly = true; + this.txtMaterial4.Size = new System.Drawing.Size(368, 29); + this.txtMaterial4.TabIndex = 54; + // + // txtMaterial3 + // + this.txtMaterial3.BackColor = System.Drawing.SystemColors.Control; + this.txtMaterial3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtMaterial3.Location = new System.Drawing.Point(70, 45); + this.txtMaterial3.MaxLength = 3096; + this.txtMaterial3.Name = "txtMaterial3"; + this.txtMaterial3.ReadOnly = true; + this.txtMaterial3.Size = new System.Drawing.Size(369, 29); + this.txtMaterial3.TabIndex = 53; + // + // labelTex4 + // + this.labelTex4.AutoSize = true; + this.labelTex4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelTex4.Location = new System.Drawing.Point(1, 86); + this.labelTex4.Name = "labelTex4"; + this.labelTex4.Size = new System.Drawing.Size(67, 22); + this.labelTex4.TabIndex = 50; + this.labelTex4.Text = "零件#4:"; + // + // labelTex3 + // + this.labelTex3.AutoSize = true; + this.labelTex3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.labelTex3.Location = new System.Drawing.Point(1, 48); + this.labelTex3.Name = "labelTex3"; + this.labelTex3.Size = new System.Drawing.Size(67, 22); + this.labelTex3.TabIndex = 49; + this.labelTex3.Text = "零件#3:"; + // + // cbMould + // + this.cbMould.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbMould.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbMould.FormattingEnabled = true; + this.cbMould.Location = new System.Drawing.Point(70, 44); + this.cbMould.Name = "cbMould"; + this.cbMould.Size = new System.Drawing.Size(370, 30); + this.cbMould.TabIndex = 60; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(2, 6); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(63, 22); + this.label9.TabIndex = 25; + this.label9.Text = "注塑机:"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.radioButSignal); + this.groupBox3.Controls.Add(this.radioButDouble); + this.groupBox3.Controls.Add(this.radioButFourth); + this.groupBox3.Enabled = false; + this.groupBox3.Location = new System.Drawing.Point(136, 73); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(303, 58); + this.groupBox3.TabIndex = 49; + this.groupBox3.TabStop = false; + // + // radioButSignal + // + this.radioButSignal.AutoSize = true; + this.radioButSignal.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radioButSignal.Location = new System.Drawing.Point(7, 22); + this.radioButSignal.Name = "radioButSignal"; + this.radioButSignal.Size = new System.Drawing.Size(92, 26); + this.radioButSignal.TabIndex = 44; + this.radioButSignal.TabStop = true; + this.radioButSignal.Text = "单件打印"; + this.radioButSignal.UseVisualStyleBackColor = true; + this.radioButSignal.CheckedChanged += new System.EventHandler(this.radioButSignal_CheckedChanged); + // + // radioButDouble + // + this.radioButDouble.AutoSize = true; + this.radioButDouble.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radioButDouble.Location = new System.Drawing.Point(107, 22); + this.radioButDouble.Name = "radioButDouble"; + this.radioButDouble.Size = new System.Drawing.Size(92, 26); + this.radioButDouble.TabIndex = 45; + this.radioButDouble.TabStop = true; + this.radioButDouble.Text = "双件打印"; + this.radioButDouble.UseVisualStyleBackColor = true; + this.radioButDouble.CheckedChanged += new System.EventHandler(this.radioButDouble_CheckedChanged); + // + // radioButFourth + // + this.radioButFourth.AutoSize = true; + this.radioButFourth.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.radioButFourth.Location = new System.Drawing.Point(207, 22); + this.radioButFourth.Name = "radioButFourth"; + this.radioButFourth.Size = new System.Drawing.Size(92, 26); + this.radioButFourth.TabIndex = 46; + this.radioButFourth.TabStop = true; + this.radioButFourth.Text = "四件打印"; + this.radioButFourth.UseVisualStyleBackColor = true; + this.radioButFourth.CheckedChanged += new System.EventHandler(this.radioButFourth_CheckedChanged); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.Location = new System.Drawing.Point(18, 48); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(47, 22); + this.label10.TabIndex = 61; + this.label10.Text = "模具:"; + // + // comMachine + // + this.comMachine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comMachine.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comMachine.FormattingEnabled = true; + this.comMachine.Location = new System.Drawing.Point(71, 4); + this.comMachine.Name = "comMachine"; + this.comMachine.Size = new System.Drawing.Size(297, 30); + this.comMachine.TabIndex = 60; + this.comMachine.SelectedIndexChanged += new System.EventHandler(this.comMachine_SelectedIndexChanged); + // + // btnLockMachine + // + this.btnLockMachine.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnLockMachine.Location = new System.Drawing.Point(374, 3); + this.btnLockMachine.Name = "btnLockMachine"; + this.btnLockMachine.Size = new System.Drawing.Size(67, 32); + this.btnLockMachine.TabIndex = 63; + this.btnLockMachine.Text = "锁定"; + this.btnLockMachine.UseVisualStyleBackColor = true; + this.btnLockMachine.Click += new System.EventHandler(this.btnLockMachine_Click); + // + // tpPrintMode + // + this.tpPrintMode.Controls.Add(this.tpOnline); + this.tpPrintMode.Controls.Add(this.tpManual); + this.tpPrintMode.Controls.Add(this.tpTimer); + this.tpPrintMode.Dock = System.Windows.Forms.DockStyle.Bottom; + this.tpPrintMode.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tpPrintMode.Location = new System.Drawing.Point(3, 458); + this.tpPrintMode.Name = "tpPrintMode"; + this.tpPrintMode.Padding = new System.Drawing.Point(12, 9); + this.tpPrintMode.SelectedIndex = 0; + this.tpPrintMode.Size = new System.Drawing.Size(445, 146); + this.tpPrintMode.TabIndex = 62; + // + // tpOnline + // + this.tpOnline.Controls.Add(this.cbSkipHistory); + this.tpOnline.Controls.Add(this.btnStartFileScan); + this.tpOnline.Controls.Add(this.btnStopFileScan); + this.tpOnline.Location = new System.Drawing.Point(4, 47); + this.tpOnline.Name = "tpOnline"; + this.tpOnline.Padding = new System.Windows.Forms.Padding(3); + this.tpOnline.Size = new System.Drawing.Size(437, 95); + this.tpOnline.TabIndex = 0; + this.tpOnline.Text = "注塑联机打印"; + this.tpOnline.UseVisualStyleBackColor = true; + // + // cbSkipHistory + // + this.cbSkipHistory.AutoSize = true; + this.cbSkipHistory.CheckAlign = System.Drawing.ContentAlignment.TopCenter; + this.cbSkipHistory.Checked = true; + this.cbSkipHistory.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbSkipHistory.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbSkipHistory.Location = new System.Drawing.Point(19, 19); + this.cbSkipHistory.Name = "cbSkipHistory"; + this.cbSkipHistory.Size = new System.Drawing.Size(78, 60); + this.cbSkipHistory.TabIndex = 60; + this.cbSkipHistory.Text = "扫描跳过\r\n历史数据"; + this.cbSkipHistory.UseVisualStyleBackColor = true; + // + // btnStartFileScan + // + this.btnStartFileScan.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStartFileScan.Image = global::QMAPP.WinForm.Resource1.forward; + this.btnStartFileScan.Location = new System.Drawing.Point(114, 6); + this.btnStartFileScan.Name = "btnStartFileScan"; + this.btnStartFileScan.Size = new System.Drawing.Size(150, 83); + this.btnStartFileScan.TabIndex = 59; + this.btnStartFileScan.Text = "启动参数\r\n文件扫描"; + this.btnStartFileScan.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnStartFileScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnStartFileScan.UseVisualStyleBackColor = false; + this.btnStartFileScan.Click += new System.EventHandler(this.btnStartFileScan_Click); + // + // btnStopFileScan + // + this.btnStopFileScan.Enabled = false; + this.btnStopFileScan.Font = new System.Drawing.Font("微软雅黑", 13F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStopFileScan.Image = global::QMAPP.WinForm.Resource1.st; + this.btnStopFileScan.Location = new System.Drawing.Point(270, 6); + this.btnStopFileScan.Name = "btnStopFileScan"; + this.btnStopFileScan.Size = new System.Drawing.Size(150, 83); + this.btnStopFileScan.TabIndex = 58; + this.btnStopFileScan.Text = "停止参数\r\n文件扫描"; + this.btnStopFileScan.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnStopFileScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.btnStopFileScan.UseVisualStyleBackColor = true; + this.btnStopFileScan.Click += new System.EventHandler(this.btnStopFileScan_Click); + // + // tpManual + // + this.tpManual.Controls.Add(this.cbTemplateDesign); + this.tpManual.Controls.Add(this.tsbPrint); + this.tpManual.Location = new System.Drawing.Point(4, 47); + this.tpManual.Name = "tpManual"; + this.tpManual.Padding = new System.Windows.Forms.Padding(3); + this.tpManual.Size = new System.Drawing.Size(437, 95); + this.tpManual.TabIndex = 2; + this.tpManual.Text = "手动打印"; + this.tpManual.UseVisualStyleBackColor = true; + // + // cbTemplateDesign + // + this.cbTemplateDesign.AutoSize = true; + this.cbTemplateDesign.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbTemplateDesign.Location = new System.Drawing.Point(6, 6); + this.cbTemplateDesign.Name = "cbTemplateDesign"; + this.cbTemplateDesign.Size = new System.Drawing.Size(93, 25); + this.cbTemplateDesign.TabIndex = 35; + this.cbTemplateDesign.Text = "模板调整"; + this.cbTemplateDesign.UseVisualStyleBackColor = true; + // + // tpTimer + // + this.tpTimer.Controls.Add(this.label5); + this.tpTimer.Controls.Add(this.cbPrintSpan); + this.tpTimer.Controls.Add(this.cbPrintCount); + this.tpTimer.Controls.Add(this.btnStart); + this.tpTimer.Controls.Add(this.btnStop); + this.tpTimer.Controls.Add(this.lblLastCount); + this.tpTimer.Controls.Add(this.label7); + this.tpTimer.Controls.Add(this.label8); + this.tpTimer.Location = new System.Drawing.Point(4, 47); + this.tpTimer.Name = "tpTimer"; + this.tpTimer.Padding = new System.Windows.Forms.Padding(3); + this.tpTimer.Size = new System.Drawing.Size(437, 95); + this.tpTimer.TabIndex = 1; + this.tpTimer.Text = "定时打印"; + this.tpTimer.UseVisualStyleBackColor = true; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(8, 13); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(88, 26); + this.label5.TabIndex = 56; + this.label5.Text = "定时打印"; + // + // cbPrintSpan + // + this.cbPrintSpan.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbPrintSpan.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbPrintSpan.FormattingEnabled = true; + this.cbPrintSpan.Items.AddRange(new object[] { + "10s", + "15s", + "20s", + "30s", + "40s", + "50s", + "60s", + "70s", + "80s"}); + this.cbPrintSpan.Location = new System.Drawing.Point(102, 10); + this.cbPrintSpan.Name = "cbPrintSpan"; + this.cbPrintSpan.Size = new System.Drawing.Size(106, 34); + this.cbPrintSpan.TabIndex = 53; + // + // cbPrintCount + // + this.cbPrintCount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbPrintCount.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.cbPrintCount.FormattingEnabled = true; + this.cbPrintCount.Items.AddRange(new object[] { + "20", + "50", + "100", + "150", + "200", + "300", + "400"}); + this.cbPrintCount.Location = new System.Drawing.Point(102, 51); + this.cbPrintCount.Name = "cbPrintCount"; + this.cbPrintCount.Size = new System.Drawing.Size(106, 34); + this.cbPrintCount.TabIndex = 54; + // + // btnStart + // + this.btnStart.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStart.Location = new System.Drawing.Point(229, 9); + this.btnStart.Name = "btnStart"; + this.btnStart.Size = new System.Drawing.Size(90, 35); + this.btnStart.TabIndex = 55; + this.btnStart.Text = "开始"; + this.btnStart.UseVisualStyleBackColor = true; + this.btnStart.Click += new System.EventHandler(this.btnStart_Click); + // + // btnStop + // + this.btnStop.Enabled = false; + this.btnStop.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStop.Location = new System.Drawing.Point(330, 9); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(90, 35); + this.btnStop.TabIndex = 55; + this.btnStop.Text = "停止"; + this.btnStop.UseVisualStyleBackColor = true; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // lblLastCount + // + this.lblLastCount.AutoSize = true; + this.lblLastCount.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblLastCount.Location = new System.Drawing.Point(332, 56); + this.lblLastCount.Name = "lblLastCount"; + this.lblLastCount.Size = new System.Drawing.Size(24, 26); + this.lblLastCount.TabIndex = 59; + this.lblLastCount.Text = "0"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(8, 54); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(88, 26); + this.label7.TabIndex = 57; + this.label7.Text = "打印数量"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label8.Location = new System.Drawing.Point(231, 56); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(88, 26); + this.label8.TabIndex = 58; + this.label8.Text = "剩余数量"; + // + // timer2 + // + this.timer2.Enabled = true; + this.timer2.Interval = 1000; + this.timer2.Tick += new System.EventHandler(this.timer2_Tick); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabControl1.Location = new System.Drawing.Point(4, 4); + this.tabControl1.Margin = new System.Windows.Forms.Padding(10, 10, 10, 3); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(681, 607); + this.tabControl1.TabIndex = 41; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.DGView); + this.tabPage1.Location = new System.Drawing.Point(4, 30); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(673, 573); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "打印记录"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.groupBox4); + this.tabPage2.Controls.Add(this.groupBox2); + this.tabPage2.Location = new System.Drawing.Point(4, 30); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(673, 573); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "注塑参数扫描"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.lvParamRecords); + this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox4.Location = new System.Drawing.Point(3, 140); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(667, 430); + this.groupBox4.TabIndex = 1; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "扫描记录"; + // + // lvParamRecords + // + this.lvParamRecords.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.chDate}); + this.lvParamRecords.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvParamRecords.FullRowSelect = true; + this.lvParamRecords.GridLines = true; + this.lvParamRecords.HideSelection = false; + this.lvParamRecords.Location = new System.Drawing.Point(3, 25); + this.lvParamRecords.Name = "lvParamRecords"; + this.lvParamRecords.Size = new System.Drawing.Size(661, 402); + this.lvParamRecords.TabIndex = 0; + this.lvParamRecords.UseCompatibleStateImageBehavior = false; + this.lvParamRecords.View = System.Windows.Forms.View.Details; + // + // chDate + // + this.chDate.Text = "扫描时间"; + this.chDate.Width = 165; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.panel1); + this.groupBox2.Controls.Add(this.txtLastScanTime); + this.groupBox2.Controls.Add(this.label14); + this.groupBox2.Controls.Add(this.txtMessage); + this.groupBox2.Controls.Add(this.label12); + this.groupBox2.Controls.Add(this.txtCurrentFile); + this.groupBox2.Controls.Add(this.label13); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.txtFilePath); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox2.Location = new System.Drawing.Point(3, 3); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(667, 137); + this.groupBox2.TabIndex = 0; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "参数信息"; + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.BackColor = System.Drawing.SystemColors.Control; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.picConnectState); + this.panel1.Controls.Add(this.txtConnectState); + this.panel1.Location = new System.Drawing.Point(537, 24); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(117, 29); + this.panel1.TabIndex = 12; + // + // picConnectState + // + this.picConnectState.BackColor = System.Drawing.SystemColors.Control; + this.picConnectState.Image = global::QMAPP.WinForm.Resource1.help; + this.picConnectState.Location = new System.Drawing.Point(1, 1); + this.picConnectState.Name = "picConnectState"; + this.picConnectState.Size = new System.Drawing.Size(25, 25); + this.picConnectState.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.picConnectState.TabIndex = 2; + this.picConnectState.TabStop = false; + // + // txtConnectState + // + this.txtConnectState.BackColor = System.Drawing.SystemColors.Control; + this.txtConnectState.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtConnectState.Location = new System.Drawing.Point(32, 3); + this.txtConnectState.Name = "txtConnectState"; + this.txtConnectState.ReadOnly = true; + this.txtConnectState.Size = new System.Drawing.Size(80, 22); + this.txtConnectState.TabIndex = 11; + // + // txtLastScanTime + // + this.txtLastScanTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtLastScanTime.Location = new System.Drawing.Point(537, 61); + this.txtLastScanTime.Name = "txtLastScanTime"; + this.txtLastScanTime.ReadOnly = true; + this.txtLastScanTime.Size = new System.Drawing.Size(117, 29); + this.txtLastScanTime.TabIndex = 8; + // + // label14 + // + this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(452, 64); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(90, 21); + this.label14.TabIndex = 7; + this.label14.Text = "扫描时间:"; + // + // txtMessage + // + this.txtMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtMessage.Location = new System.Drawing.Point(73, 97); + this.txtMessage.Name = "txtMessage"; + this.txtMessage.ReadOnly = true; + this.txtMessage.Size = new System.Drawing.Size(581, 29); + this.txtMessage.TabIndex = 6; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(21, 100); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(58, 21); + this.label12.TabIndex = 5; + this.label12.Text = "消息:"; + // + // txtCurrentFile + // + this.txtCurrentFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCurrentFile.Location = new System.Drawing.Point(73, 61); + this.txtCurrentFile.Name = "txtCurrentFile"; + this.txtCurrentFile.ReadOnly = true; + this.txtCurrentFile.Size = new System.Drawing.Size(358, 29); + this.txtCurrentFile.TabIndex = 6; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(6, 65); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(74, 21); + this.label13.TabIndex = 5; + this.label13.Text = "文件名:"; + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(453, 27); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(90, 21); + this.label11.TabIndex = 3; + this.label11.Text = "连接状态:"; + // + // txtFilePath + // + this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFilePath.Location = new System.Drawing.Point(73, 24); + this.txtFilePath.Name = "txtFilePath"; + this.txtFilePath.ReadOnly = true; + this.txtFilePath.Size = new System.Drawing.Size(358, 29); + this.txtFilePath.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(21, 27); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(58, 21); + this.label4.TabIndex = 0; + this.label4.Text = "路径:"; + // + // comboxMaterial3 + // + this.comboxMaterial3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboxMaterial3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comboxMaterial3.Location = new System.Drawing.Point(70, 45); + this.comboxMaterial3.Name = "comboxMaterial3"; + this.comboxMaterial3.Size = new System.Drawing.Size(369, 30); + this.comboxMaterial3.TabIndex = 57; + // + // comboxMaterial4 + // + this.comboxMaterial4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboxMaterial4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.comboxMaterial4.Location = new System.Drawing.Point(70, 83); + this.comboxMaterial4.Name = "comboxMaterial4"; + this.comboxMaterial4.Size = new System.Drawing.Size(369, 30); + this.comboxMaterial4.TabIndex = 58; + // + // InjectionCodePrint + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1140, 615); + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.groupBox1); + this.Name = "InjectionCodePrint"; + this.Padding = new System.Windows.Forms.Padding(4); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "注塑条码打印"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.InjectionCodePrint_FormClosed); + this.Load += new System.EventHandler(this.InjectionCodePrint_Load); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.paneldouble.ResumeLayout(false); + this.paneldouble.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.plPrintSetting.ResumeLayout(false); + this.plPrintSetting.PerformLayout(); + this.panel34.ResumeLayout(false); + this.panel34.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.tpPrintMode.ResumeLayout(false); + this.tpOnline.ResumeLayout(false); + this.tpOnline.PerformLayout(); + this.tpManual.ResumeLayout(false); + this.tpManual.PerformLayout(); + this.tpTimer.ResumeLayout(false); + this.tpTimer.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picConnectState)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtMaterialCode; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox textMaterialName; + private System.Windows.Forms.Button tsbPrint; + private System.Windows.Forms.Button btnChoiceMaterial; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.DataGridViewTextBoxColumn MAINCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn MATERIAL_NAME; + private System.Windows.Forms.DataGridViewTextBoxColumn PRODUCTCODE; + private System.Windows.Forms.DataGridViewTextBoxColumn CREATETIME; + private System.Windows.Forms.RadioButton radioButFourth; + private System.Windows.Forms.RadioButton radioButDouble; + private System.Windows.Forms.RadioButton radioButSignal; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Panel panel34; + private System.Windows.Forms.Label labelTex4; + private System.Windows.Forms.Label labelTex3; + private System.Windows.Forms.Panel paneldouble; + private System.Windows.Forms.ComboBox comboxMaterial; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtMaterial4; + private System.Windows.Forms.TextBox txtMaterial3; + private System.Windows.Forms.TextBox txtMaterial2; + private System.Windows.Forms.Label labelTex2; + private System.Windows.Forms.ComboBox cbPrintCount; + private System.Windows.Forms.ComboBox cbPrintSpan; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Button btnStart; + private System.Windows.Forms.Label lblLastCount; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Button btnStop; + private System.Windows.Forms.Timer timer2; + private System.Windows.Forms.ComboBox cbMould; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.ComboBox comMachine; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabControl tpPrintMode; + private System.Windows.Forms.TabPage tpOnline; + private System.Windows.Forms.TabPage tpTimer; + private System.Windows.Forms.TabPage tpManual; + private System.Windows.Forms.Button btnStartFileScan; + private System.Windows.Forms.Button btnStopFileScan; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.ListView lvParamRecords; + private System.Windows.Forms.ColumnHeader chDate; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TextBox txtLastScanTime; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.TextBox txtCurrentFile; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.PictureBox picConnectState; + private System.Windows.Forms.TextBox txtFilePath; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btnLockMachine; + private System.Windows.Forms.TextBox txtConnectState; + private System.Windows.Forms.TextBox txtMessage; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox cbSkipHistory; + private System.Windows.Forms.Panel plPrintSetting; + private System.Windows.Forms.CheckBox cbTemplateDesign; + private System.Windows.Forms.ComboBox comboxMaterial4; + private System.Windows.Forms.ComboBox comboxMaterial3; + } +} \ No newline at end of file diff --git a/.svn/pristine/bc/bc7db00a2e0915bb9d2d897a92cfa580166927a1.svn-base b/.svn/pristine/bc/bc7db00a2e0915bb9d2d897a92cfa580166927a1.svn-base new file mode 100644 index 0000000..daff7f5 --- /dev/null +++ b/.svn/pristine/bc/bc7db00a2e0915bb9d2d897a92cfa580166927a1.svn-base @@ -0,0 +1,75 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息编辑 + + + + <%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.ID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ <%=Html.QV(p=>p.Code) %> + + <%=Html.QC(p => p.Code)%> +
+ <%=Html.QV(p => p.Name)%> + + <%=Html.QC(p => p.Name)%> +
+ <%=Html.QV(p => p.Value)%> + + <%=Html.QC(p => p.Value)%> +
+ <%=Html.QV(p => p.Remark)%> + + <%=Html.QC(p => p.Remark)%> +
+
+ <%=Html.HiddenFor(p=>p.ID) %> + <%=Html.QPEnd() %> +
+ + + + + + +
+ <%=Html.QTButtonSave("User", "Save", "return Save();")%> + <%=Html.QTButtonBack("close", "AppConfig", "parent.closeAppWindow1();return false;")%> +
+ +
diff --git a/.svn/pristine/bc/bca7738ab51fcc77e92bee6bfb8d955cc4be9482.svn-base b/.svn/pristine/bc/bca7738ab51fcc77e92bee6bfb8d955cc4be9482.svn-base new file mode 100644 index 0000000..a2bdf31 --- /dev/null +++ b/.svn/pristine/bc/bca7738ab51fcc77e92bee6bfb8d955cc4be9482.svn-base @@ -0,0 +1,1093 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + 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 + AElFTkSuQmCC + + + \ No newline at end of file diff --git a/.svn/pristine/bd/bd556fee3e8c1d74e0ae6c189bcfe3baea416b8a.svn-base b/.svn/pristine/bd/bd556fee3e8c1d74e0ae6c189bcfe3baea416b8a.svn-base new file mode 100644 index 0000000..7a0a054 --- /dev/null +++ b/.svn/pristine/bd/bd556fee3e8c1d74e0ae6c189bcfe3baea416b8a.svn-base @@ -0,0 +1,3473 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["AutoInput条码正则表达式"]?.Trim(); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + ispass = true; + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex))//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.MATERIAL_CODE)).ToList(); + if (filterList.Count > 0) + { + string bomCode = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(true); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + ///// + ///// 总成标签打印 + ///// + ///// + //private void PrintAssemblyLabe(string processcode) + //{ + // tsbPrint.Visible = true; + // ///////////////////// + // string selectKey = processcode; + // Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + // if (main == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + // MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + // if (mcinit == null) + // { + // MessageBox.Show("获取总成条码异常!"); + // return; + // } + + // #region 总成装配打印 + + // rePrintBzd.barcode = main.MAINCODE; + // rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + // rePrintBzd.color = mcinit.COLOR; + + // try + // { + // Report = new GridppReport(); + + // string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + // //数据填充 + // Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + // Report.LoadFromFile(reportPath); + + // //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + // Report.Print(false); + // } + // catch (Exception) + // { + + // throw; + // } + // finally + // { + + // Report = new GridppReport(); + // } + + //} + + + //新增 + private BZD rePrintBzd = new BZD(); + + //private void ReadFetchRecordBox2() + //{ + // try + // { + // string e052BarCode = rePrintBzd.barcode; + + // Report.DetailGrid.Recordset.Append(); + + // Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + // Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + // Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + // Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + // Report.DetailGrid.Recordset.Post(); + // } + // catch (Exception err) + // { + // throw new Exception(err.Message); + // } + //} + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// 物料号是否为固定值 + public void Print052QRCODE(bool cBoxVANstr) + { + try + { + if (!cBoxVANstr || "IP_ASSEMBLING,GWASSEMBLE_VW371PA".Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + cBoxVAN.Visible = false; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + Report.DetailGrid.Recordset.Append(); + + //************20210712 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked && cBoxVAN.Visible == true) + { + Report.FieldByName("PartDesc").Value = "5CG.857.003.A VAN"; + } + else + { + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 //物料号 + } + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + + /// + /// 重打总成 + /// + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + if (record != null) + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/be/be02ee6fd534856125fc948924d3f7c4e89722cb.svn-base b/.svn/pristine/be/be02ee6fd534856125fc948924d3f7c4e89722cb.svn-base new file mode 100644 index 0000000..4f80aa5 --- /dev/null +++ b/.svn/pristine/be/be02ee6fd534856125fc948924d3f7c4e89722cb.svn-base @@ -0,0 +1,310 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QM.Common; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Injection; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.MD.Entity; +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M12-1 + /// 作 用:投料记录 + /// 作 者:王庆男 + /// 编写日期:2015年06月08日 + /// + public partial class InjectionMoldingNEWEditForm : Form + { + InjectionRecorder recorder = new InjectionRecorder();//编辑保存实体 + + /// + /// 新建 + /// + public InjectionMoldingNEWEditForm() + { + InitializeComponent(); + + } + + /// + /// 编辑 + /// + /// + public InjectionMoldingNEWEditForm(string pid) + { + recorder.PID = pid; + InitializeComponent(); + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + new KeyEvent().SetKeyToTxt(this); + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + //加载是否有条码列表 + //this.comIsHadNo.Items.Add(new ListItem("1", "有")); + //this.comIsHadNo.Items.Add(new ListItem("0", "无")); + + //this.comIsHadNo.SelectedIndex = 0; + //this.ActiveControl = this.txtMaterialCode; + //this.txtMaterialCode.Focus(); + //加载注塑设备列表 + this.comMachineCode.DataSource = basicData.GetMachineInfoList(new string[] { EnumGeter.ProcessType_M.Injection.GetHashCode().ToString() }, false); + this.comMachineCode.DisplayMember = "MACHINENAME"; + this.comMachineCode.ValueMember = "MACHINECODDE"; + if (ClientContext.MachineInfo != null) + this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.comMachineCode.SelectedValue = ClientContext.MachineInfo.MACHINECODDE;//默认当前设备 + //加载物料列表 + this.comMaterialCode.DataSource = basicData.GetMaterielInfoList("RAW_INJECT", true); + this.comMaterialCode.DisplayMember = "MATERIAL_NAME"; + this.comMaterialCode.ValueMember = "MATERIAL_CODE"; + //加载操作人列表 + this.comOpreator.DataSource = basicData.GetOperatorInfoList(EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(), true); ; + this.comOpreator.DisplayMember = "OPERATOR"; + this.comOpreator.ValueMember = "PID"; + //加载物料类别列表 + this.comMaterialType.DataSource = basicData.GetMaterialTypeList(new MD.Entity.MaterialClass { UpTypeCodes = "('IP_PLASTICPART','DP_PLASTICPART')" }, false); + this.comMaterialType.DisplayMember = "MATERIAL_TYPE_NAME"; + this.comMaterialType.ValueMember = "MATERIAL_TYPE_CODE"; + + //加载产品列表 + this.cbProject.DataSource = basicData.GetProjectList(false); + this.cbProject.DisplayMember = "PROJECT_NAME"; + this.cbProject.ValueMember = "PROJECT_CODE"; + #endregion + + #region 加载编辑 + //判断是否为编辑加载编辑数据 + if (string.IsNullOrEmpty(recorder.PID) == false) + { + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + recorder = agent.InvokeServiceFunction(B9BasicService.InjectionRecorderBLL_Get.ToString(), recorder); + //一定是存在的物料 + //this.comIsHadNo.SelectedIndex = 1; + //this.txtMaterialCode.Visible = false; + this.comMaterialCode.Visible = true; + //this.txtMaterialCode.Text = ""; + + this.comMaterialCode.SelectedValue = recorder.MATERIALCODE; + + //this.comMaterialType.SelectedValue = recorder.MATERIALTYPE; + this.txtMeterialWeight.Text = recorder.METERIALWEIGHT.ToString("0"); + this.comOpreator.SelectedValue = recorder.CREATEUSER.Trim(); + this.txtMaterialBatch.Text = recorder.MATERIALBATCH; + + foreach (var m in (recorder.MACHINECODDE + "").Split(',')) + { + var machinelist = comMachineCode.Items.Cast(); + var machine = machinelist.FirstOrDefault(p => p.MACHINECODDE == m); + var index = comMachineCode.Items.IndexOf(machine); + if (index >= 0) + { + this.comMachineCode.SetItemChecked(index, true); + } + } + var project_A_mtypes = (recorder.MATERIALTYPE + "").Split(';'); + if (project_A_mtypes.Length == 2) + { + foreach (var p in project_A_mtypes[0].Split(',')) + { + var projectlist = cbProject.Items.Cast(); + var project = projectlist.FirstOrDefault(o => o.PROJECT_CODE == p); + var index = cbProject.Items.IndexOf(project); + if (index >= 0) + { + this.cbProject.SetItemChecked(index, true); + } + } + + foreach (var t in project_A_mtypes[1].Split(',')) + { + var typelist = comMaterialType.Items.Cast(); + var mtype = typelist.FirstOrDefault(o => o.MATERIAL_TYPE_NAME == t); + var index = comMaterialType.Items.IndexOf(mtype); + if (index >= 0) + { + this.comMaterialType.SetItemChecked(index, true); + } + } + } + + } + #endregion + } + + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + #region 加载保存信息 + //判断是否有物料号 + + recorder.MATERIALCODE = this.comMaterialCode.SelectedValue.ToString(); + + //原材料信息 + var mateial = (this.comMaterialCode.DataSource as List).Where(m => m.MATERIAL_CODE == recorder.MATERIALCODE); + if (mateial.Count() > 0) + { + MD.Entity.Material materielInfo = mateial.First(); + recorder.MATERIALNAME = materielInfo.MATERIAL_NAME; + + } + + string projects = string.Join(",", cbProject.CheckedItems.Cast().Select(p => p.PROJECT_CODE).ToArray()); + string materialtypes = string.Join(",", comMaterialType.CheckedItems.Cast().Select(p => p.MATERIAL_TYPE_NAME).ToArray()); + recorder.MATERIALTYPE = projects + ";" + materialtypes; + //获取设备信息 + var selectmachines = this.comMachineCode.CheckedItems.Cast(); + recorder.MACHINECODDE = string.Join(",", selectmachines.Select(p => p.MACHINECODDE)); + recorder.MACHINENAME = string.Join(",", selectmachines.Select(p => p.MACHINENAME_SHORT)); + recorder.MACHINETYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); + //工序类别 + recorder.PROCESSTYPE = EnumGeter.MACHINETYPE.zhusu.GetHashCode().ToString(); + //投料信息 + //recorder.MATERIALTYPE = this.comMaterialType.SelectedValue.ToString(); + //重量 + recorder.METERIALWEIGHT = Convert.ToInt32(this.txtMeterialWeight.Text); + //批次 + recorder.MATERIALBATCH = this.txtMaterialBatch.Text; + recorder.PRODUCELINE = EnumGeter.PRODUCELINE.B9.ToString(); + //操作人 + recorder.CREATEUSER = this.comOpreator.SelectedValue.ToString().Trim(); + recorder.PRODUCESHIFTNAME = ClientContext.produceShift.PRODUCESHIFTNAME;//班组 + recorder.PRODUCESHIFTTCODE = ClientContext.produceShift.PRODUCESHIFTTCODE;//班组 + #endregion + + #region 保存 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + DataResult result;//判断是否成功 + if (string.IsNullOrEmpty(recorder.PID) == true) + { + result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Insert.ToString(), recorder); + } + else + { + result = agent.InvokeServiceFunction>(B9BasicService.InjectionRecorderBLL_Update.ToString(), recorder); + } + //保存成功 + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + #endregion + } + + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + + + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region 校验 + string strMessage = ""; + + + //物料号 + if (this.comMaterialCode.SelectedValue == null || this.comMaterialCode.SelectedValue == string.Empty) + { + strMessage += Resource1.MaterialCodeNullValidate + "\r\n"; + } + + //设备 + if (this.comMachineCode.CheckedItems.Count <= 0) + { + strMessage += Resource1.InjectionMachineNullValidate + "\r\n"; + } + //物料类别 + if (this.comMaterialType.CheckedItems.Count <= 0) + { + strMessage += "零件类别不能为空!" + "\r\n"; + } + //产品 + if (this.cbProject.CheckedItems.Count <= 0) + { + strMessage += "请选择产品!" + "\r\n"; + } + + //操作人 + if (this.comOpreator.SelectedValue == null || this.comOpreator.SelectedValue == string.Empty) + { + strMessage += Resource1.OpreatorNullValidate + "\r\n"; + } + //批次 + if (this.txtMaterialBatch.Text == string.Empty) + { + strMessage += Resource1.MaterialBatchNullValidate + "\r\n"; + } + + + + + return strMessage; + #endregion + } + + private void comMaterialCode_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.comMaterialCode.SelectedValue != null && this.comMaterialCode.SelectedValue != string.Empty) + { + this.txtMeterialWeight.Text = (this.comMaterialCode.SelectedItem as MD.Entity.Material).WEIGHT.ToString(); + } + } + + private void comMaterialType_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.comMaterialType.SelectedValue != null && this.comMaterialType.SelectedValue.Equals(EnumGeter.MATERIALTYPE.jinshuzhijia.GetHashCode().ToString())) + { + //this.comIsHadNo.SelectedIndex = 0; + //this.comIsHadNo.Enabled = false; + this.label13.Visible = false; + this.txtMaterialBatch.Visible = false; + this.label9.Text = "数量(个):"; + this.label12.Visible = false; + } + else + { + //this.comIsHadNo.Enabled = true; + this.label13.Visible = true; + this.txtMaterialBatch.Visible = true; + this.label9.Text = "重量(KG):"; + this.label12.Visible = true; + } + } + } +} diff --git a/.svn/pristine/bf/bf52ed8d1b304422c8e6c650a04395441031f5c3.svn-base b/.svn/pristine/bf/bf52ed8d1b304422c8e6c650a04395441031f5c3.svn-base new file mode 100644 index 0000000..f465d29 --- /dev/null +++ b/.svn/pristine/bf/bf52ed8d1b304422c8e6c650a04395441031f5c3.svn-base @@ -0,0 +1,80 @@ +using System; +using System.Linq; +using QMAPP.FJC.Entity.CompleteStatistics.Table; +using QMFrameWork.Data.Attributes; + +namespace QMAPP.FJC.Entity.CompleteStatistics +{ + /// + /// 完工统计表 + /// + [DBTable(TableName = "T_AW_COMPLETE_STATISTICS", TimeStampColumn = "UPDATETIME")] + public class CompleteStatisticsEntity : T_AW_COMPLETE_STATISTICS + { + public string MATERIALNAME { get; set; } + public string PRODUCTLINE { get; set; } + public string CREATEUSER_DISPLAY { get; set; } + public string UPDATEUSER_DISPLAY { get; set; } + public string SENDTIME { get; set; } + public string EENDTIME { get; set; } + public string DOESEXPORT + { + get + { + if (!string.IsNullOrEmpty(this.DELFLAG) && this.DELFLAG.Equals("1")) + { + return "是"; + } + return "否"; + } + } + + //For File + public string EMPLOYEE { get; set; } + public string SITE { get; set; } + public string SHIFT { get; set; } + public string EDIMAT { get; set; } + public string SERIAL { get; set; } + public string USERID { get; set; } + + public override string ToString() + { + string format = "\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\",\"{5}\",{6},\"{7}\",\"{8}\",{9},{10}"; + return string.Format(format, this.EMPLOYEE, this.SITE, this.SHIFT, this.MATERIALNO.Trim(), this.PRODUCTLINE, this.EDIMAT, this.SERIAL, this.USERID + , this.ORDERNO, this.COMPLETECOUNT, this.STARTTIME.ToString("MM/dd/yy")); + } + + public string ToSQL() + { + System.Text.StringBuilder sql = new System.Text.StringBuilder(); + sql.Append("INSERT INTO xxmes_bk_det(xxmes_bk_site,xxmes_bk_part,xxmes_bk_qty,xxmes_bk_line,xxmes_bk_doc,xxmes_bk_shift,xxmes_bk_emp,xxmes_bk_effdate,xxmes_bk_prod,xxmes_bk_qadread) "); + sql.Append("values "); + sql.AppendFormat("('{0}'", this.SITE);//xxmes_bk_site + sql.AppendFormat(",'{0}'", this.MATERIALNO);//xxmes_bk_part + sql.AppendFormat(",'{0}'", this.COMPLETECOUNT);//xxmes_bk_qty + sql.AppendFormat(",'{0}'", this.PRODUCTLINE);//xxmes_bk_line + sql.AppendFormat(",'{0}'", this.ORDERNO);//xxmes_bk_doc + sql.AppendFormat(",'{0}'", this.SHIFT);//xxmes_bk_shift + sql.AppendFormat(",'{0}'", this.EMPLOYEE);//xxmes_bk_emp + sql.AppendFormat(",'{0:yyyy-MM-dd HH:mm:ss}'", this.STARTTIME);//xxmes_bk_effdate + //sql.AppendFormat(",'{0:yyyy-MM-dd HH:mm:ss}'", DateTime.Now.ToString("yyyyMMddHHmmss"));//xxmes_bk_effdate + sql.AppendFormat(",'{0}'", this.ORDERNO.Substring(0, 4));//xxmes_bk_prod + sql.AppendFormat(",'0')");//xxmes_bk_qadread + + //string format = "\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\",\"{5}\",{6},\"{7}\",\"{8}\",{9},{10}"; + //return string.Format(format, this.EMPLOYEE, this.SITE, this.SHIFT, this.MATERIALNO.Trim(), this.PRODUCTLINE, this.EDIMAT, this.SERIAL, this.USERID + // , this.ORDERNO, this.COMPLETECOUNT, this.STARTTIME.ToString("MM/dd/yy")); + return sql.ToString(); + } + + /// + /// 根据GUID获取16位的唯一字符串 + /// + /// + private string GuidTo16String() + { + long i = Guid.NewGuid().ToByteArray().Aggregate(1, (current, b) => current*((int) b + 1)); + return string.Format("{0:x}", i - DateTime.Now.Ticks).PadRight(16, '0').ToUpper(); + } + } +} diff --git a/.svn/pristine/bf/bfacde5076839dc740b7551139a4f0899e4ecc0d.svn-base b/.svn/pristine/bf/bfacde5076839dc740b7551139a4f0899e4ecc0d.svn-base new file mode 100644 index 0000000..ed4a887 Binary files /dev/null and b/.svn/pristine/bf/bfacde5076839dc740b7551139a4f0899e4ecc0d.svn-base differ diff --git a/.svn/pristine/c0/c01830a39e4b8963aaf777ab869df87da28bb10c.svn-base b/.svn/pristine/c0/c01830a39e4b8963aaf777ab869df87da28bb10c.svn-base new file mode 100644 index 0000000..b3f3102 --- /dev/null +++ b/.svn/pristine/c0/c01830a39e4b8963aaf777ab869df87da28bb10c.svn-base @@ -0,0 +1,266 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:搪塑称重记录 + /// 作 者:张松男 + /// 编写日期:2021年08月23日 + /// + public class TSWeighRecoreDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public TSWeighRecore Get(TSWeighRecore info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public TSWeighRecore Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_AW_TSWeighRecore] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(TSWeighRecore condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetALL() + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT * FROM T_AW_TSWeighRecore "; + //分页关键字段及排序 + var LIST = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + LIST = session.GetList(sql, parameters.ToArray()).ToList(); + } + return LIST; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(TSWeighRecore condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + + //构成查询语句 + sqlBuilder.Append("SELECT PID,ProductCode,PColour,MATERIAL_CODE,Weigh,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE "); + sqlBuilder.Append("FROM T_AW_TSWeighRecore "); + + if (string.IsNullOrEmpty(condition.ProductCode) == false) + { + whereBuilder.Append(" AND ProductCode = @ProductCode"); + parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); + } + if (string.IsNullOrEmpty(condition.MATERIAL_CODE) == false) + { + whereBuilder.Append(" AND MATERIAL_CODE = @MATERIAL_CODE"); + parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = condition.MATERIAL_CODE }); + } + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(TSWeighRecore info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_AW_TSWeighRecore"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(TSWeighRecore info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(TSWeighRecore info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + + } +} diff --git a/.svn/pristine/c0/c0489b4089071db77d5459adf3a1a5e6d8ebb9fa.svn-base b/.svn/pristine/c0/c0489b4089071db77d5459adf3a1a5e6d8ebb9fa.svn-base new file mode 100644 index 0000000..36991b7 --- /dev/null +++ b/.svn/pristine/c0/c0489b4089071db77d5459adf3a1a5e6d8ebb9fa.svn-base @@ -0,0 +1,898 @@ + + + + EpidermisBLL + 表皮查询 + QMAPP.FJC.BLL.FeedInManage.EpidermisBLL + QMAPP.FJC.BLL.DLL + + + + + MaterialCodeBLL + 物料号查询 + QMAPP.FJC.BLL.Operation.MaterialCodeBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.DLL + + + + + + FISOrderBLL + FIS计划查询 + QMAPP.FJC.BLL.FIS.FISOrderBLL + QMAPP.FJC.BLL.DLL + + + + + + OrderPlanBLL + 注塑管理计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + DashBoardPlanBLL + 仪表板计划 + QMAPP.FJC.BLL.FIS.DashBoardPlanBLL + QMAPP.FJC.BLL.DLL + + + + + DoorPlankPlanBLL + 门板计划 + QMAPP.FJC.BLL.FIS.DoorPlankPlanBLL + QMAPP.FJC.BLL.DLL + + + + + FrmPlaceBLL + 发运模块 + QMAPP.FJC.BLL.FrmPlace.FrmPlaceBLL + QMAPP.FJC.BLL.DLL + + + + StocktakingBLL + 库存盘点 + QMAPP.FJC.BLL.Stocktaking.StocktakingBLL + QMAPP.FJC.BLL.DLL + + + + + FISOrderSendBLL + FIS订单发货信息 + QMAPP.FJC.BLL.FIS.FISOrderSendBLL + QMAPP.FJC.BLL.DLL + + + + + OrderPlanBLL + 订单生产计划 + QMAPP.FJC.BLL.FIS.OrderPlanBLL + QMAPP.FJC.BLL.DLL + + + + + + + + + + + + + UnQualityProductBLL + 不合格品数量 + QMAPP.FJC.BLL.Basic.UnQualityProductBLL + QMAPP.FJC.BLL.DLL + + + + WorkCenterBLL + 工作中心信息 + QMAPP.FJC.BLL.Basic.WorkCenterBLL + QMAPP.FJC.BLL.DLL + + + + CapacityBLL + 班次产能 + QMAPP.FJC.BLL.Basic.CapacityBLL + QMAPP.FJC.BLL.DLL + + + + + ProcessRouteBLL + 工艺路线 + QMAPP.FJC.BLL.Basic.ProcessRouteBLL + QMAPP.FJC.BLL.DLL + + + + BomHdrBLL + Bom信息维护 + QMAPP.FJC.BLL.Basic.BomHdrBLL + QMAPP.FJC.BLL.DLL + + + + MaterielBLL + 物料号信息 + QMAPP.FJC.BLL.Basic.MaterielBLL + QMAPP.FJC.BLL.DLL + + + + + MaterielVersionBLL + 物料类型信息 + QMAPP.FJC.BLL.Basic.MaterielVersionBLL + QMAPP.FJC.BLL.DLL + + + + + MachineInfoBLL + 设备信息 + QMAPP.FJC.BLL.Basic.MachineInfoBLL + QMAPP.FJC.BLL.DLL + + + + MachineInfoModelBLL + 设备模具信息 + QMAPP.FJC.BLL.Basic.MachineInfoModelBLL + QMAPP.FJC.BLL.DLL + + + + MouldBLL + 模具信息 + QMAPP.FJC.BLL.Equipment.MouldBLL + QMAPP.FJC.BLL.DLL + + + + ProduceShiftBLL + 班次信息 + QMAPP.FJC.BLL.Basic.ProduceShiftBLL + QMAPP.FJC.BLL.DLL + + + + ProductCodeIdentityBLL + 零件条码标识 + QMAPP.FJC.BLL.Basic.ProductCodeIdentityBLL + QMAPP.FJC.BLL.DLL + + + + OperatorInfoBLL + 操作员 + QMAPP.FJC.BLL.Basic.OperatorInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessInfoBLL + 工序名称 + QMAPP.FJC.BLL.Basic.ProcessInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProcessSetBLL + 工序设置 + QMAPP.FJC.BLL.Basic.ProcessSetBLL + QMAPP.FJC.BLL.DLL + + + + ProcessRuleBLL + 工序先决条件 + QMAPP.FJC.BLL.Basic.ProcessRuleBLL + QMAPP.FJC.BLL.DLL + + + + ProcessParameterBLL + 加工参数标准值设定 + QMAPP.FJC.BLL.Basic.ProcessParameterBLL + QMAPP.FJC.BLL.DLL + + + + ProductMderuleBLL + 投料配置规则 + QMAPP.FJC.BLL.Basic.ProductMderuleBLL + QMAPP.FJC.BLL.DLL + + + + MaterialShelfTypeBLL + 物料架类型维护 + QMAPP.FJC.BLL.Basic.MaterialShelfTypeBLL + QMAPP.FJC.BLL.DLL + + + + + InjectionRecorderBLL + 注塑投料记录 + QMAPP.FJC.BLL.Injection.InjectionRecorderBLL + QMAPP.FJC.BLL.DLL + + + + SlushRecorderBLL + 搪塑投料记录 + QMAPP.FJC.BLL.Injection.SlushRecorderBLL + QMAPP.FJC.BLL.DLL + + + + PouringRecorderBLL + 浇注投料记录 + QMAPP.FJC.BLL.Injection.PouringRecorderBLL + QMAPP.FJC.BLL.DLL + + + + ProductBLL + 零件条码 + QMAPP.FJC.BLL.Operation.ProductBLL + QMAPP.FJC.BLL.DLL + + + + ProductBasicBLL + 零件类别 + QMAPP.FJC.BLL.Basic.ProductBasicBLL + QMAPP.FJC.BLL.DLL + + + + ProductInfoBLL + 零件号 + QMAPP.FJC.BLL.Basic.ProductInfoBLL + QMAPP.FJC.BLL.DLL + + + + ProductAttributeBLL + 零件条码属性 + QMAPP.FJC.BLL.Operation.ProductAttributeBLL + QMAPP.FJC.BLL.DLL + + + + EquipmentMaintainBLL + 设备停机维护 + QMAPP.FJC.BLL.Equipment.EquipmentMaintainBLL + QMAPP.FJC.BLL.DLL + + + + + ProductInjectionBLL + 投料与零件关联 + QMAPP.FJC.BLL.Operation.ProductInjectionBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanInfoBLL + 贴车单记录 + QMAPP.FJC.BLL.SendPlan.SendPlanInfoBLL + QMAPP.FJC.BLL.DLL + + + + MainBLL + 加工本体 + QMAPP.FJC.BLL.Operation.MainBLL + QMAPP.FJC.BLL.DLL + + + + ProductEndBLL + 成品查询 + QMAPP.FJC.BLL.Operation.ProductEndBLL + QMAPP.FJC.BLL.DLL + + + + MainProductBLL + 主体与零件关联关系 + QMAPP.FJC.BLL.Operation.MainProductBLL + QMAPP.FJC.BLL.DLL + + + + SPCControlBLL + SPC监控 + QMAPP.FJC.BLL.IPC.SPCControlBLL + QMAPP.FJC.BLL.DLL + + + + ProducePlanBLL + 生产记录维护 + QMAPP.FJC.BLL.ProduceManage.ProducePlanBLL + QMAPP.FJC.BLL.DLL + + + + UnQualityBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.UnQualityBLL + QMAPP.FJC.BLL.DLL + + + + MainOperationBLL + 加工查询 + QMAPP.FJC.BLL.Operation.MainOperationBLL + QMAPP.FJC.BLL.DLL + + + + ProductArchivesBLL + 产品档案 + QMAPP.FJC.BLL.ProductPetrospect.ProductArchivesBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentAlarmBLL + 设备报警维护 + QMAPP.FJC.BLL.WarnManage.EquipMentAlarmBLL + QMAPP.FJC.BLL.DLL + + + + WarnManageBLL + 自动报警维护 + QMAPP.FJC.BLL.WarnManage.WarnManageBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentMaintainSearchBLL + 设备停机记录 + QMAPP.FJC.BLL.WarnManage.EquipMentMaintainSearchBLL + QMAPP.FJC.BLL.DLL + + + + StorageAlarmBLL + 低储报警信息 + QMAPP.FJC.BLL.WIPManage.StorageAlarmBLL + QMAPP.FJC.BLL.DLL + + + + DetentionBLL + 滞留品查询 + QMAPP.FJC.BLL.WIPManage.DetentionBLL + QMAPP.FJC.BLL.DLL + + + + + + MendRecorderBLL + 返修记录 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + + MainProductCountBLL + 成品数量查询 + QMAPP.FJC.BLL.Operation.MainProductCountBLL + QMAPP.FJC.BLL.dll + + + + WIPInventoryBLL + 在制品库存 + QMAPP.FJC.BLL.WIPManage.WIPInventoryBLL + QMAPP.FJC.BLL.DLL + + + WIPInRecorderBLL + 在制品入库信息 + QMAPP.FJC.BLL.WIPManage.WIPInRecorderBLL + QMAPP.FJC.BLL.DLL + + + WIPOutRecorderBLL + 在制品出库信息 + QMAPP.FJC.BLL.WIPManage.WIPOutRecorderBLL + QMAPP.FJC.BLL.DLL + + + + WIPProductCountBLL + 在制品数量查询 + QMAPP.FJC.BLL.WIPManage.WIPProductCountBLL + QMAPP.FJC.BLL.DLL + + + + SendPlanRecordBLL + 贴车单查询 + QMAPP.FJC.BLL.SendManage.SendPlanRecordBLL + QMAPP.FJC.BLL.DLL + + + FISInfoBLL + FIS M100生产信息查询 + QMAPP.FJC.BLL.FIS.FISInfoBLL + QMAPP.FJC.BLL.DLL + + + CheckWipBLL + 定时查询在制品库存 + QMAPP.FJC.BLL.WipService.CheckWipBLL + QMAPP.FJC.BLL.DLL + + + + FisBLL + 返修记录 + QMAPP.FJC.BLL.FIS.FisBLL + QMAPP.FJC.BLL.DLL + + + + + ScrapRecordBLL + 报废记录 + QMAPP.FJC.BLL.ProduceManage.ScrapRecordBLL + QMAPP.FJC.BLL.DLL + + + + OutWarehouseBLL + FISM100接口 + QMAPP.FJC.BLL.WarehouseManage.OutWarehouseBLL + QMAPP.FJC.BLL.DLL + + + InWarehouseBLL + 入库操作 + QMAPP.FJC.BLL.WarehouseManage.InWarehouseBLL + QMAPP.FJC.BLL.DLL + + + + FileCopyRecordBLL + 文件复制 + QMAPP.FJC.BLL.FileCopy.FileCopyRecordBLL + QMAPP.FJC.BLL.DLL + + + + MoldConfigBLL + 模具配置信息 + QMAPP.FJC.BLL.Basic.MoldConfigBLL + QMAPP.FJC.BLL.DLL + + + + MoldSetBLL + 模腔配置信息 + QMAPP.FJC.BLL.Basic.MoldSetBLL + QMAPP.FJC.BLL.DLL + + + + CastCounterBLL + 模腔配置信息 + QMAPP.FJC.BLL.Operation.CastCounterBLL + QMAPP.FJC.BLL.DLL + + + + InjectionCheckBLL + 注塑查验信息 + QMAPP.FJC.BLL.Operation.InjectionCheckBLL + QMAPP.FJC.BLL.DLL + + + + DefectTypeBLL + 缺陷类型 + QMAPP.FJC.BLL.ProduceManage.DefectTypeBLL + QMAPP.FJC.BLL.DLL + + + + PrintModelCopyBLL + 获取打印模板 + QMAPP.FJC.BLL.Basic.PrintModelCopyBLL + QMAPP.FJC.BLL.DLL + + + + CompleteStatisticsBLL + 完工统计Business + QMAPP.FJC.BLL.CompleteStatistics.CompleteStatisticsBLL + QMAPP.FJC.BLL.DLL + + + + ShipmentMonitorBLL + 发运看板 + QMAPP.FJC.BLL.Monitor.ShipmentMonitorBLL + QMAPP.FJC.BLL.DLL + + + + LineDWQTYCountBLL + 生产日报 + QMAPP.MESReport.BLL.LineQTY.LineDWQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + LineShiftQTYCountBLL + 班次对比分析 + QMAPP.MESReport.BLL.LineQTY.LineShiftQTYCountBLL + QMAPP.MESReport.BLL.DLL + + + + ShipmentCountBLL + 生产发运统计 + QMAPP.MESReport.BLL.LineQTY.ShipmentCountBLL + QMAPP.MESReport.BLL.DLL + + + + StandardRateCountBLL + 合格率分析 + QMAPP.MESReport.BLL.LineQTY.StandardRateCountBLL + QMAPP.MESReport.BLL.DLL + + + DAIBLL + 完工统计Business + QMAPP.FJC.BLL.QT.DAIBLL + QMAPP.FJC.BLL.DLL + + + BarcodeRulesBLL + 条码规则数据服务 + QMAPP.FJC.BLL.Basic.BarcodeRulesBLL + QMAPP.FJC.BLL.dll + + + DAI + 条码规则数据服务 + QMAPP.FJC.TRACING.DAHandler.DataAcquirer + QMAPP.FJC.TRACING.dll + + + DAICacheBLL + 采集缓存数据服务 + QMAPP.FJC.BLL.QT.DAICacheBLL + QMAPP.FJC.BLL.dll + + + DAIValidationBLL + 采集校验服务 + QMAPP.FJC.BLL.QT.DAIValidationBLL + QMAPP.FJC.BLL.dll + + + MeterReadingsBLL + 设备能耗统计 + QMAPP.FJC.BLL.EnergyManage.MeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + QTYInfoCountBLL + 生产统计 + QMAPP.MESReport.BLL.LineQTY.QTYInfoCountBLL + QMAPP.MESReport.BLL.DLL + + + + EmMeterReadingsBLL + 能源统计 + QMAPP.FJC.BLL.EM.EmMeterReadingsBLL + QMAPP.FJC.BLL.DLL + + + + MeterBLL + 能源表维护 + QMAPP.FJC.BLL.EnergyManage.MeterBLL + QMAPP.FJC.BLL.DLL + + + + mbM100BLL + 门板FIS数据获取 + QMAPP.FJC.BLL.QdFis.mbM100BLL + QMAPP.FJC.BLL.DLL + + + + ybbM100BLL + 仪表板FIS数据获取 + QMAPP.FJC.BLL.QdFis.ybbM100BLL + QMAPP.FJC.BLL.DLL + + + + QTYCompletionRateBLL + 生产完成率分析 + QMAPP.MESReport.BLL.LineQTY.QTYCompletionRateBLL + QMAPP.MESReport.BLL.DLL + + + + WorkOrderBLL + 派工单 + QMAPP.FJC.BLL.ProductionPlan.WorkOrderBLL + QMAPP.FJC.BLL.dll + + + + + WasteRateCountBLL + 废品率统计 + QMAPP.MESReport.BLL.LineQTY.WasteRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + ProduceCycleTimeBLL + 节拍统计 + QMAPP.MESReport.BLL.LineQTY.ProduceCycleTimeBLL + QMAPP.MESReport.BLL.DLL + + + + RepairRateCountBLL + 返修率统计 + QMAPP.MESReport.BLL.LineQTY.RepairRateCountBLL + QMAPP.MESReport.BLL.DLL + + + + EquConsumeCountBLL + 设备用电分析 + QMAPP.MESReport.BLL.LineQTY.EquConsumeCountBLL + QMAPP.MESReport.BLL.DLL + + + + EqueUseCountBLL + 设备利用率分析 + QMAPP.MESReport.BLL.LineQTY.EqueUseCountBLL + QMAPP.MESReport.BLL.DLL + + + + AnDongCallBLL + 安东呼叫统计 + QMAPP.MESReport.BLL.LineQTY.AnDongCallBLL + QMAPP.MESReport.BLL.DLL + + + + + ProcessRecordBLL + 加工记录 + QMAPP.FJC.BLL.QT.ProcessRecordBLL + QMAPP.FJC.BLL.dll + + + + VideoInfoBLL + 视频播放 + QMAPP.FJC.BLL.ODS.VideoInfoBLL + QMAPP.FJC.BLL.DLL + + + + VideoTypeBLL + 视频类型 + QMAPP.FJC.BLL.ODS.VideoTypeBLL + QMAPP.FJC.BLL.DLL + + + + AndonCallBLL + 安东呼叫 + QMAPP.FJC.BLL.Andon.AndonCallBLL + QMAPP.FJC.BLL.DLL + + + + MachineCheckBLL + 设备点检 + QMAPP.FJC.BLL.MachineCheck.MachineCheckBLL + QMAPP.FJC.BLL.DLL + + + + UsageLogBLL + 模具统计 + QMAPP.FJC.BLL.Equipment.UsageLogBLL + QMAPP.FJC.BLL.DLL + + + + TempProductBLL + 模具资料获取 + QMAPP.FJC.BLL.Equipment.TempProductBLL + QMAPP.FJC.BLL.DLL + + + + EquipMentRecordBLL + 设备维修记录 + QMAPP.FJC.BLL.Equipment.EquipMentRecordBLL + QMAPP.FJC.BLL.DLL + + + + ProductOutBLL + 出库 + QMAPP.FJC.BLL.Operation.ProductOutBLL + QMAPP.FJC.BLL.DLL + + + + ProductInBLL + 入库查询 + QMAPP.FJC.BLL.ProductIn.ProductInBLL + QMAPP.FJC.BLL.dll + + + + MaterialBindingBLL + 物料信息绑定关系 + QMAPP.FJC.BLL.QT.MaterialBindingBLL + QMAPP.FJC.BLL.dll + + + + AnalyzerBLL + 解析类别 + QMAPP.FJC.BLL.QT.AnalyzerBLL + QMAPP.FJC.BLL.dll + + + + + ProductCheckBLL + 抽检 + QMAPP.FJC.BLL.Operation.ProductCheckBLL + QMAPP.FJC.BLL.dll + + + + PackageBLL + 线边库存大屏显示 + QMAPP.FJC.BLL.Package.PackageBLL + QMAPP.FJC.BLL.dll + + + + MainCodeChangeBLL + 总成条码替换 + QMAPP.FJC.BLL.Operation.MainCodeChangeBLL + QMAPP.FJC.BLL.DLL + + + + MendRecorderBLL + 不合格品记录查询 + QMAPP.FJC.BLL.ProduceManage.MendRecorderBLL + QMAPP.FJC.BLL.DLL + + + FISPhraseBLL + FIS短语字典 + QMAPP.FJC.BLL.FIS.FISPhraseBLL + QMAPP.FJC.BLL.DLL + + + LeakInspectRecordBLL + 漏装检测记录 + QMAPP.FJC.BLL.InterfaceData.LeakInspectRecordBLL + QMAPP.FJC.BLL.DLL + + + AppConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.AppConfigBLL + QMAPP.FJC.BLL.DLL + + + PbomItemBLL + BOM明细 + QMAPP.FJC.BLL.Operation.PbomItemBLL + QMAPP.FJC.BLL.DLL + + + ScanIPConfigBLL + 配置表 + QMAPP.FJC.BLL.Basic.ScanIPConfigBLL + QMAPP.FJC.BLL.DLL + + + aterialBomConfigBLLBLL + 配置表 + QMAPP.FJC.BLL.Basic.aterialBomConfigBLLBLL + QMAPP.FJC.BLL.DLL + + + + + BZDConfigBLL + BZD配置 + QMAPP.FJC.BLL.BZD.BZDConfigBLL + QMAPP.FJC.BLL.DLL + + + + BZDRecorderBLL + BZD记录 + QMAPP.FJC.BLL.BZD.BZDRecorderBLL + QMAPP.FJC.BLL.DLL + + + + BarCodeReplacementBLL + 补打记录 + QMAPP.FJC.BLL.BZD.BarCodeReplacementBLL + QMAPP.FJC.BLL.DLL + + + + CHECKTIMEBLL + 时间验证 + QMAPP.FJC.BLL.CheckTime.CHECKTIMEBLL + QMAPP.FJC.BLL.DLL + + + \ No newline at end of file diff --git a/.svn/pristine/c0/c06104811e8d22817d0d04f2436d89e3542f4593.svn-base b/.svn/pristine/c0/c06104811e8d22817d0d04f2436d89e3542f4593.svn-base new file mode 100644 index 0000000..94fcdab --- /dev/null +++ b/.svn/pristine/c0/c06104811e8d22817d0d04f2436d89e3542f4593.svn-base @@ -0,0 +1,3460 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Drawing; +using System.Windows.Forms; +using System.ComponentModel; +using QMAPP.FJC.Entity; +using QMAPP.FJC.Entity.Basic; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.SendPlan; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMFrameWork.Common.Serialization; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Linq; +using System.Reflection; +using System.ServiceModel; +using System.Threading; +using System.Net.Sockets; +using System.IO; +using QMAPP.FJC.Entity.QT; +using QMAPP.FJC.TRACING.DAInterface; +using QMAPP.WinForm.Forms.Andon; +using DCS.Common; +using QMAPP.WinForm.Forms.Mend; +using System.Collections; +using QMAPP.FJC.Entity.ProductionPlan; +using gregn6Lib; +using System.Data; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:加工操作 + /// 作者:王庆男 + /// 时间:2015年7月1日 + /// + [CallbackBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, UseSynchronizationContext = false)] + public partial class OperationForm : Form, ServiceOpc.IOpcServiceCallback + { + #region 全局变量 + public static SynchronizationContext SynchronizationContext; + //与服务器传递参与以及窗口静态变量 + OperationServiceParam _operationServiceParam = new OperationServiceParam(); + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + ServiceOpc.OpcServiceClient proy;//连接OPC服务 + + BarCodeHook BarCode = new BarCodeHook(); + + /// + /// 附加信息 + /// + Dictionary AttachInfo = new Dictionary(); + + /// + /// 采集点列表 + /// + private List daiList = new List(); + /// + /// 数据采集点视图 + /// + private BindingList daiviewSource = new BindingList(); + /// + /// 数据采集点视图 + /// + private List daicache = new List(); + /// + /// 模架列表 + /// + private List mouldList = new List(); + /// + /// 条码格式规则列表 + /// + private List _barcodeRules; + + /// + /// 正确的声音文件路径 + /// + private string okSoundPath = null; + /// + /// 错误的声音文件路径 + /// + private string errorSoundPath = null; + /// + /// 用于隐藏计划tab页 + /// + Hashtable htPages = new Hashtable(); + + private string _showDetailError = "false"; //后修改内容,若果true. 发生异常时显示异常详细信息. false,显示内容和原来一样,不发生变化 + private string _lowCfgAutoSwitchLoc = string.Empty; //自动填充配置的工位 + private string _ipGJBarCodeRegex = string.Empty; + + private string[] _cfgAutoInputLocs = null;//DP 自动输入配置的工位 + private string _cfgAutoInputSwitch = string.Empty; //DP 自动输入配置的开关 + private string _bentiBarCodeRegex = string.Empty; //DP 自动输入配置的开关 + + private string _052printWorkloc = string.Empty; //052打印工位 + + #endregion + + #region 窗体构造函数 + /// + /// 窗体构造函数 + /// + public OperationForm() + { + InitializeComponent(); + + _showDetailError = System.Configuration.ConfigurationManager.AppSettings["是否显示异常详细信息"]?.ToLower(); + _lowCfgAutoSwitchLoc = GetAppConfigValue("AutomationLocAdd"); //查找所有 需要自动填充的工位 + _ipGJBarCodeRegex = GetAppConfigValue("AutomationBarCodeRegex"); //查找所有 需要自动填充的工位 + + var str__cfgAutoInputLocs = GetAppConfigValue("AutoInputLocAdd"); //查找所有 需要自动填充的工位 + if (str__cfgAutoInputLocs.Split(';').Length > 0) + _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); + _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 + _bentiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["AutoInput条码正则表达式"]?.Trim(); + + _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; + + this.WindowState = FormWindowState.Maximized; + //this.CheckFile(); + okSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundOk; + errorSoundPath = System.Configuration.ConfigurationManager.AppSettings["SaveFilePath"] + "Sound\\" + PlaySoundConst.strSoundNg; + SynchronizationContext = new SynchronizationContext(); + BarCode.BarCodeEvent += new BarCodeHook.BarCodeDelegate(BarCode_BarCodeEvent); + BarCode.Start(); + } + #endregion + + #region 键盘Hook + void BarCode_BarCodeEvent(BarCodeHook.BarCodes barCode) + { + ShowInfo(barCode); + } + + private void ShowInfo(BarCodeHook.BarCodes barCode) + { + if (!this.txtCode.Focused) + { + this.txtCode.Focus(); + } + } + #endregion + + #region 窗体载入 + private void Form_Load(object sender, EventArgs e) + { + LoadViewSetting(); + + //初始化控件属性 + this.DGView.AutoGenerateColumns = false; + this.DGViewProList.AutoGenerateColumns = false; + + //隐藏工单计划 + //DeletePlanPage("tpPlan"); + + //加载所有设备下拉列表 + LoadMachineList(); + + _barcodeRules = _agent.InvokeServiceFunction>(B9BasicService.BarcodeRulesBLL_GetAllList.ToString()); + + this.DGView.DataSource = daiviewSource; + //页面初始化 + Init(); + + //tsbRe.Visible = false; + DGViewProList.ClearSelection(); + + #region 打印模板拷贝 + PrintTempleCopyClass printClass = new PrintTempleCopyClass(); + printClass.CopyPrintTemple("IPASSYLABEL"); + printClass.CopyPrintTemple("DPPLANLABEL"); + #endregion + btnRefresh.Visible = true; + txtCode.Focus(); + } + #endregion + + #region 加载设备列表 + /// + /// 加载设备列表 + /// + private void LoadMachineList() + { + #region + BasicData basicData = new BasicData(); + var machinelist=basicData.GetMachineInfoAndModelList(new string[] { }, true); + this.comMachine.DataSource = machinelist; + this.comMachine.DisplayMember = "MACHINENAME"; + this.comMachine.ValueMember = "MACHINECODDE"; + + //如果工位已设定 + if (ClientContext.MachineInfo != null && !string.IsNullOrEmpty(ClientContext.MachineInfo.PID)) + { + this.comMachine.SelectedValue = ClientContext.MachineInfo.MACHINECODDE; + //this.lblLock.Visible = false; + this.LockType(false); + } + else + { + //this.lblLock.Visible = false; + this.LockType(false); + } + #endregion + } + #endregion + + #region 加载列表显示设置 + /// + /// 加载列表显示设置 + /// + private void LoadViewSetting() + { + #region 加载列表显示设置 + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + + var setting = new { ListRowcount = 20, RefreshRate = 5 }; + if (System.IO.File.Exists(filepath)) + { + string settingstring = System.IO.File.ReadAllText(filepath); + setting = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(settingstring, setting); + } + cbListRowcount.Text = setting.ListRowcount.ToString(); + cbRefreshRate.Text = string.Format("{0}s", setting.RefreshRate); + cbPlanFilter.SelectedIndex = 1; + + cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); + cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); + cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + + #endregion + } + #endregion + + #region 初始化界面 + /// + /// 初始化界面 + /// 加载当前设备对应的工序信息 + /// 加载当前工序的先决条件 + /// + private void Init() + { + ClientContext.OpcState = 0; + var mouldno=0; + this.tsbConnect.Visible = false; + this.tsbReSignal.Visible = false; + this.btnChange.Visible = false; + this.cBoxVAN.Visible = false; + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.produceShift = ClientContext.produceShift; + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + return; + } + if (!string.IsNullOrEmpty(_operationServiceParam.machineInfo.OPCGROUPNAME)) + { + btnChange.Visible = true; + } + //****************20210413 DQZhang BC316 VAN ************************************** + if (_operationServiceParam.machineInfo.MACHINECODDE== "ASSEMBLE_BC316") + { + this.cBoxVAN.Visible = true; + } + //********************************************************************************* + //else + //{ + // //隐藏工单计划 + // if (_operationServiceParam.machineInfo.PLAN_SET == "1") + // { + // DeletePlanPage("tpPlan"); + // } + // else + // { + // AddPage("tpPlan"); + // } + //} + if (LocalSetting.Settings["AbilityValid","1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MOLDNUMBER)) + { + _operationServiceParam.machineInfo.MOLDNUMBER = "1"; + } + _operationServiceParam.produceShift = ClientContext.produceShift; + mouldno = ConnectOPCHost(mouldno); + LoadDAI(mouldno); + BindAll(); + + //var extendpages=tabView.TabPages. + tabView.TabPages.Clear(); + tabView.TabPages.Add(tpPlan); + tabView.TabPages.Add(tpRecord); + + if (_operationServiceParam.machineInfo.OPERATETYPE == "EINSP")//终检工位,增加卡扣漏装检测设备接口 + { + DeviceInterface.LeakInspection frm = new DeviceInterface.LeakInspection(); + + + var tabpage = new TabPage(frm.Text); + tabView.TabPages.Add(tabpage); + frm.TopLevel = false; + frm.Parent = tabpage; + //frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + frm.Machine = _operationServiceParam.machineInfo; + //frm.WindowState = FormWindowState.Maximized; + //frm.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + frm.Dock = DockStyle.Fill; + frm.Show(); + + tabpage.BackColor = Color.Black; + //tabpage.Controls.Add(frm); + + } + + } + #endregion + + #region 加载采集点信息 + /// + /// 加载采集点信息 + /// + /// + private void LoadDAI(int mouldno) + { + #region 获取采集点 + + daiList = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE }); + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + mouldList = _agent.InvokeServiceFunction>(B9BasicService.MachineInfoModelBLL_GetAllList.ToString(), new MachineInfoModels { MID = _operationServiceParam.machineInfo.PID }).OrderBy(p=>p.MODELCODE).ToList(); + cbMould.DisplayMember = "MODELNAME"; + cbMould.ValueMember = "MODELCODE"; + cbMould.DataSource = mouldList.ToList(); + mouldList.Insert(0, new MachineInfoModels { MODELCODE = "" }); + + + daicache.Clear(); + foreach (var mould in mouldList) + { + foreach (var dai in daiList.Where(p => string.Equals(p.DIVBY_MOULD, mould.MODELCODE != "" ? "1" : "0"))) + { + var daiview = new FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialTypeName = "",// dai.MATERIAL_TYPE_NAME, + MaterialCode = "", + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE, + MouldName = mould.MODELNAME, + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && (string.IsNullOrWhiteSpace(p.MOULD_CODE) || p.MOULD_CODE == daiview.MouldCode) && (!string.Equals(p.PREINPUT, "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + + daicache.Add(daiview); + } + + } + + dgcMouldName.Visible = mouldList.Count > 1; + + if (daiList.Count(p => string.Equals(p.CANPREINPUT, "1")) > 0) + { + dgcMouldName.Visible = true; + int i = 0; + int m = mouldList.Count; + if (string.Equals(_operationServiceParam.machineInfo.ISSTATION, 2)) + { + i = 1; + } + else + { + i = 0; + m = 1; + } + for (; i < m; i++) + { + foreach (var dai in daiList.Where(p => string.Equals(p.CANPREINPUT, "1"))) + { + var mould = mouldList[i]; + var daiview = new QMAPP.FJC.Entity.View.DAIFormView + { + DACode = dai.DA_CODE, + DAName = dai.DA_NAME, + DAResult = "", + DAType = dai.DATA_TYPE, + MaterialType = dai.MATERIAL_TYPE, + MaterialCode = "",// dai.MATERIAL_TYPE_NAME, + MaterialName = "", + StateCode = dai.STATE_CODE, + StateName = dai.STATE_NAME, + DAValue = "", + MouldCode = "PRE-" + (string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE), + MouldName = "预备", + PREINPUT = "1" + }; + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode && string.Equals(p.PREINPUT, "1")&&string.Equals(p.MOULD_CODE,(string.IsNullOrWhiteSpace(mould.MODELCODE) ? dai.WORKCELL_CODE : mould.MODELCODE))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + daicache.Add(daiview); + } + } + } + + //dgcMouldName.Visible = mouldList.Count > 1; + lblMouldTitle.Visible = cbMould.Visible = mouldList.Count > 1; + + + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + + //= _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetList.ToString(), new DAI() { WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOCCODE }); + + + + #endregion + } + + #endregion + + #region 连接OPC服务 + //TODO:优化连接失败时的长时间卡死状态 + /// + /// 连接OPC服务 + /// + /// + /// + private int ConnectOPCHost(int mouldno) + { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.PID)) + { + ClientContext.OpcState = 0; + proy = null; + return 0; + } + if (!_operationServiceParam.machineInfo.ISCONTROL.Equals("0")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + this.tsbConnect.Visible = true; + this.tsbReSignal.Visible = true; + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + ClientContext.OpcState = 4; + this.lblError.Text = "正在连接中稍后..."; + + mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + ClientContext.OpcState = 1; + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + } + catch (Exception) + { + ClientContext.OpcState = 2; + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + else + { + ClientContext.OpcState = 2; + this.lblError.Text = "服务已经断开,请重连!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + else + { + ClientContext.OpcState = 0; + proy = null; + } + return mouldno; + } + #endregion + + #region 行序号 + /// + /// 行序号 + /// + /// + /// + private void DG_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGView.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGView.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + #region 添加零件 + /// + /// 添加零件 + /// + /// + /// + private void btnAdd_Click(object sender, EventArgs e) + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); + } + #endregion + + #region 采集点扫描校验 + /// + /// 采集点扫描校验 + /// + private void Operation() + { + + try + { + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + //使用登录码快速切换用户 + if (System.Text.RegularExpressions.Regex.IsMatch(txtCode.Text, "^<\\w+::\\w+>$")) + { + var ret = ClientContext.CodeLogin(txtCode.Text); + if (string.Equals(ret, "登录成功!")) + { + ClientContext.SetUserAuth(this); + if (LocalSetting.Settings["AbilityValid", "1"] == "1") + { + var userabbility = _agent.InvokeServiceFunction>("UserWithMachineBLL_GetUserAbility", ClientContext.LoginInfo.UserID); + if (!userabbility.Exists(p => p.MACHINEID == _operationServiceParam.machineInfo.PID) && !string.Equals("ADMIN", ClientContext.LoginInfo.LoginUserID)) + { + plDAI.Enabled = + txtCode.Enabled = + btnAdd.Enabled = + panel4.Enabled = + toolStrip1.Enabled = false; + MessageBox.Show("当前登录用户不具备此工位的操作能力!\r\n请更换用户或联系管理员设置能力矩阵。", "操作者能力矩阵", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + } + lblError.Text = ret; + txtCode.Text = ""; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + #region 输入条码校验 + //判断设备列表 + if (comMachine.Items.Count <= 0) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请先选择设备!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + string productCode = this.txtCode.Text.Trim().ToUpper();//窗体零件条码 + if (string.IsNullOrEmpty(productCode)) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "请输入条码!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + + #endregion + + #region 条码格式解析 + + var dai = LocateDAI(productCode); + if (dai == null) + { + txtCode.Text = ""; + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = "输入条码不是本工序可接受格式!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + #endregion + + object davalue = productCode; + //采集点输入 + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = davalue, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text), + AttachData = AttachInfo + }); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == (result.PreInput ? "PRE-" + result.MouldCode : result.MouldCode))); + if (result.PreInput) + { + string mouldcode = result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + mouldcode = _operationServiceParam.machineInfo.WORKCELL_CODE; + } + daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == "PRE-" + mouldcode)); + } + + if (!string.IsNullOrEmpty(_052printWorkloc) && + _052printWorkloc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (string.IsNullOrEmpty(processMainCode)) + { + processMainCode = productCode; + if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) + { + List list1 = + this.dgvPlan.DataSource as List; + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), result.MATERIAL_CODE); + var BomCodes = ""; + if (PbomItem != null && PbomItem.Count > 0) + { + BomCodes = PbomItem[0].PBOM_CODE; + + var SSS = _agent.InvokeServiceFunction(B9IPCService.PbomItemBLL_GetBom.ToString(), BomCodes); + if (SSS != null) + planMATERIAL_CODE = SSS.MATERIAL_CODE; + } + + //List pBomCodes1 = GetPBOMCODEValue(result.MATERIAL_CODE); + + //List filterList1 = + // list1.Where(p => pBomCodes1.Contains(p.PBOM_CODE)).ToList(); + + + //if (filterList1.Count > 0) + //{ + // planMATERIAL_CODE = filterList1[0].MATERIAL_CODE; + //} + } + } + + } + + if (!result.Success) //如果采集数据输入失败 + { + PlaySound.PlaySounds.Play(@errorSoundPath); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + + if (daiview != null) + { + if (daiview.DAResult != "通过") + { + daiview.DAResult = "未通过"; + daiview.DAValue = productCode; + daiview.MaterialType = result.MATERIAL_CODE; + } + } + + dai.MATERIAL_CODE = string.IsNullOrEmpty(result.MATERIAL_CODE) ? "" : result.MATERIAL_CODE; + dai.Result = EnumGeter.ORDERTYPE.NOK.GetHashCode().ToString(); + } + else + { + if (daiview != null) + { + daiview.DAResult = "通过"; + daiview.DAValue = productCode; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + } + + dai.MATERIAL_CODE = result.MATERIAL_CODE; + dai.Result = dai.Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(); + + //执行返回结果中包含的动作 + DoResultActions(result); + + this.txtCode.Text = ""; + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + } + try + { + #region 工位自动输入采集点信息 + //工位与配置 且经过所有的验证 + if (result.Success && !string.IsNullOrEmpty(_lowCfgAutoSwitchLoc) && _lowCfgAutoSwitchLoc.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + var ispass = false; + foreach (var str in _ipGJBarCodeRegex.Split(';')) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, str))//扫描的是过程主码 + ispass = true; + } + if (ispass)//扫描的是过程主码 + { + List list = this.dgvPlan.DataSource as List; + + var pBomcode = GetWorkOrder_MATERIAL_CODE(result.WorkOrderID); + + if (!string.IsNullOrEmpty(pBomcode)) + { + //List filterList = list.Where(p => pBomCodes.Contains(p.MATERIAL_CODE)).ToList(); + + var ScanIPConfig_list = GetSendPlcConfig(new ScanIPConfig() { MaterialCode = pBomcode, LocCode = _operationServiceParam.machineInfo.WORKLOC_CODE }); + if (ScanIPConfig_list != null && ScanIPConfig_list.Count > 0) + { + foreach (var Config in ScanIPConfig_list) + { + if (!string.IsNullOrEmpty(Config.PlcAddr)) + { + var BarCode = Config.BarCode; + var PlcAddr = Config.PlcAddr; + GetNewCode(ref BarCode, ref PlcAddr); //查询产品条码是否存在 + if (UpdateSendPlcConfig(new ScanIPConfig { PID = Config.PID, PlcAddr = PlcAddr }) ) + { + var ProductList = SelectProduct(Config.BarCode); + if (ProductList != null) + { + var PID = Guid.NewGuid().ToString(); + var ProductNew = new Product() + { + PRODUCTCODE = BarCode, + PID = PID, + MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, + MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, + PRODUCTSOURCE = "0", + MATERIAL_CODE = ProductList.MATERIAL_CODE, + STATUS = "0", + OUTFLAG = "0", + USINGSTATE = "0", + CAPACITY = 1, + USINGCOUNT = 0, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + WORKCENTER_CODE = ProductList.WORKCENTER_CODE + }; + + var ProcessRecords = new ProcessRecord() { + PID = Guid.NewGuid().ToString(), + PRODUCT_PID = ProductNew.PID, + WORKCELL_CODE = ProductList.WORKCELL_CODE, + WORKLOC_CODE = ProductList.WORKLOC_CODE, + IN_WORKCELL_TIME = DateTime.Now, + WORK_START_TIME = DateTime.Now, + WORK_END_TIME = DateTime.Now, + PROCESS_STATE = "1", + MANUAL_PASS = "", + MODULE_CODE = string.Equals(dai.DIVBY_MOULD, "0") ? _operationServiceParam.machineInfo.WORKCELL_CODE : (string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text) + }; + if (InsertProduct(ProductNew) && InsertProcessRecord(ProcessRecords)) + { + txtCode.Text = BarCode; + Operation(); + } + } + } + } + else + { + txtCode.Text = Config.BarCode; + Operation(); + } + } + } + + } + else + { + this.lblError.Text = "通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"; + this.lblError.ForeColor = Color.Black; + MessageBox.Show($"通过result.WorkOrderID({result.WorkOrderID.ToString()})未查询到WorkOrder.PBOM_CODE"); + } + + + } + } + + #endregion + + #region DP 超声焊1的工位,低配自动输入挡流板条码 + //DP叫总成焊接工位 不是扫高低配,而是扫多个配置. 扫一个本体码,在配置中,找到多个配置码,自动填写. + if (_cfgAutoInputSwitch == "true" && _cfgAutoInputLocs.Contains(_operationServiceParam.machineInfo.WORKLOC_CODE)) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, _bentiBarCodeRegex))//扫描的是本体条码 + { + List list = this.dgvPlan.DataSource as List; + + var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); + List filterList = list.Where(p => bomCodes.Contains(p.MATERIAL_CODE)).ToList(); + if (filterList.Count > 0) + { + string bomCode = filterList[0].PBOM_CODE; + + //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + + List autoInputBarCodes = _agent.InvokeServiceFunction>(B9IPCService.MaterialBomConfigBLL_GetAutoInputBarCode.ToString(), bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (string autoInputBarCode in autoInputBarCodes) + { + //LoadPreState(dai, GetMouldCode(result.MouldCode), isAutoInput, true); + //自动触发txtCode_KeyDown实现 + txtCode.Text = autoInputBarCode; + //txtCode_KeyDown(null,null); + Operation(); + } + + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + } + else + { + string s = $"没有找到物料号{result.MATERIAL_CODE}对应的计划,请检查T_MD_PBOM_ITEM是否进行了配置."; + this.lblError.Text = s; + this.lblError.ForeColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + s); + + } + + } + } + + + #endregion + } + catch (Exception ex) + { + if (_showDetailError == "true") + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show(ex.Message); + return; + } + else + { + throw ex; + } + } + + + + + //闫永刚2017-10-2发送操作命令 + dai.MOULD_CODE = string.Equals(dai.DIVBY_MOULD, "1") ? result.MouldCode : "1"; + + if (!result.PreInput) + { + SendSignal(dai); + } + + //刷新采集模式为自适应的采集数据 + if (daiList.Count(p => p.DA_MODE == "3") > 0) + { + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + foreach (var item in daiList.Where(p => p.DA_MODE == "3")) + { + var viewitem = daicache.FirstOrDefault(p => p.DACode == item.DA_CODE && (string.IsNullOrWhiteSpace(p.MouldCode) || p.MouldCode == result.MouldCode)); + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == item.DA_CODE); + if (viewitem != null) + { + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + viewitem.DAValue = cache.DA_VALUE; + viewitem.MaterialCode = cache.MATERIAL_CODE; + viewitem.MaterialName = cache.MATERIAL_NAME; + viewitem.DAResult = "通过"; + } + else + { + viewitem.DAValue = ""; + viewitem.MaterialTypeName = ""; + viewitem.MaterialCode = ""; + viewitem.MaterialName = ""; + viewitem.DAResult = ""; + } + } + } + } + + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + + GC.Collect(); + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + + } + #endregion + + #region 执行返回结果中包含的动作 + /// + /// 执行返回结果中包含的动作 + /// + /// + private void DoResultActions(DAResult result) + { + lblError.Text = string.Format("当前工位状态:{0}", result.StateName); + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + lblWorkcellState.Text = result.StateName; + foreach (var act in result.Actions) + { + switch (act) + { + case "SUBMIT": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + BindPlanView(); + break; + } + case "SUBMIT_NOPLAN": //状态变化动作为 提交数据 + { + //TODO:更细界面数据 + BindView(); + //BindPlanView(); + break; + } + case "SIGNAL_START": //状态变化动作为 发送启动信号 + { + //TODO:发送启动信号 + break; + } + case "PUSHDATA": //推送提前输入数据 + { + //TODO:发送信号 + var cachelist = _agent.InvokeServiceFunction>(B9IPCService.DAICacheBLL_GetWorklocCache.ToString(), _operationServiceParam.machineInfo.WORKLOC_CODE); + string premouldcode = "PRE-" + result.MouldCode; + if (_operationServiceParam.machineInfo.ISSTATION != 2) + { + premouldcode = "PRE-" + _operationServiceParam.machineInfo.WORKCELL_CODE; + } + + foreach (var daiview in daicache.Where(p=>(p.MouldCode==result.MouldCode||string.IsNullOrEmpty(p.MouldCode)||p.MouldCode==premouldcode))) + { + var cache = cachelist.FirstOrDefault(p => p.DA_CODE == daiview.DACode + && (string.Equals(daiview.PREINPUT, "1") + ? (p.MOULD_CODE == result.MouldCode + && p.PREINPUT == "1") + : (p.MOULD_CODE == daiview.MouldCode + && p.PREINPUT != "1"))); + if (cache != null && !string.IsNullOrWhiteSpace(cache.DA_VALUE)) + { + daiview.DAValue = cache.DA_VALUE; + daiview.MaterialCode = cache.MATERIAL_CODE; + daiview.MaterialName = cache.MATERIAL_NAME; + daiview.DAResult = "通过"; + } + else + { + daiview.DAValue = ""; + daiview.MaterialTypeName = ""; + daiview.MaterialCode = ""; + daiview.MaterialName = ""; + daiview.DAResult = ""; + } + } + Action signalaction = new Action(() => + { + string sleep = result.Actions.FirstOrDefault(p => p.StartsWith("SLEEP")); + if (sleep != null) + { + int st = 0; + int.TryParse(sleep.Replace("SLEEP_", ""), out st); + System.Threading.Thread.Sleep(st); + } + else + { + System.Threading.Thread.Sleep(10000); + } + //TODO:发送信号 + foreach (var daiview in daiviewSource) + { + if (daiview.DAResult == "通过" && !string.Equals(daiview.PREINPUT, "1")) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + }); + signalaction.BeginInvoke(null, null); + + break; + } + case "PRINT_ASSY": //状态变化动作为 打印总成码 + { + //TODO:清空界面数据 复位启动信号 + //PrintAssemblyLabe(result.ProcessCode); + Print052QRCODE(); + break; + } + + case "PRINT_PROCESS": //状态变化动作为 打印过程码 + { + //TODO:清空界面数据 复位启动信号 + PrintProcessLabel(result.ProcessCode); + break; + } + case "PRINT_PLAN": //状态变化动作为 打印计划标签 + { + //TODO:清空界面数据 复位启动信号 + PrintPlanLabel(result); + break; + } + case "RESET": //状态变化动作为 复位 + { + //TODO:清空界面数据 复位启动信号 + //SendRecoveryOrder(result.MouldCode); + Reset(result.MouldCode); + break; + } + case "SHOWMLIST": //状态变化动作为 显示装配物料清单 + { + ShowMaterialList(result.WorkOrderID); + break; + } + case "HIDEMLIST": //状态变化动作为 隐藏装配物料清单 + { + HideMaterialList(); + break; + } + default: + { + if (act.StartsWith("SIGNAL_")) + { + string dacode = act.Replace("SIGNAL_", ""); + var daiview = daiviewSource.FirstOrDefault(p => p.DACode == dacode && p.DAResult == "通过" && !string.Equals(p.PREINPUT, "1")); + if (daiview != null) + { + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = daiview.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, result.MouldCode) ? "1" : result.MouldCode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = daiview.MaterialCode + }; + SendSignal(signalDai); + } + } + break; + } + } + } + } + + private void HideMaterialList() + { + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = new List(); + plInfo.Visible = false; + } + private void ShowMaterialList(string OrderNo) + { + var mlist = _agent.InvokeServiceFunction>("PbomBLL_GetWorkingBom", _operationServiceParam.machineInfo.WORKLOC_CODE, OrderNo); + + dgvMlist.AutoGenerateColumns = false; + dgvMlist.DataSource = mlist; + dgvMlist.ClearSelection(); + if (mlist != null && mlist.Count > 0) + { + gbMlist.Visible = plInfo.Visible = true; + try + { + foreach (DataGridViewRow row in DGView.Rows) + { + FJC.Entity.View.DAIFormView dv = row.DataBoundItem as FJC.Entity.View.DAIFormView; + if (dv != null && dv.StateCode.ToUpper() == "ASSY") + { + if (!mlist.Exists(p => (p.MATERIAL_TYPE_CODE + "").StartsWith(dv.MaterialType))) + { + row.Visible = false; + continue; + } + row.Visible = true; + } + } + } + catch + { + + } + } + else + { + gbMlist.Visible = plInfo.Visible = false; + } + plInfo.AutoSize = !gbMlist.Visible; + } + + #endregion + + #region 发送信号 + /// + /// 发送信号 + /// + /// + private void SendSignal(DAI dai) + { + if (proy == null) + return; + string paraStr = JsonConvertHelper.GetSerializes(dai); + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + //闫永刚2017-10-2发送操作命令 + proy.SendOperateOrder(paraStr); + }); + task.Start(); + } + } + #endregion + + #region 发送操作命令 + /// + /// 发送操作命令 + /// + private void SendRecoveryOrder(string mouldcode) + { + DAI dai = daiList[0]; + + DAI recoveryDai = new DAI() { WORKCELL_CODE = dai.WORKCELL_CODE, WORKLOC_CODE = dai.WORKLOC_CODE, DA_CODE = "RECOVERY", MOULD_CODE = string.IsNullOrWhiteSpace(mouldcode) ? "1" : mouldcode, Result = "0" }; + + if (proy == null) + { + return; + } + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + //闫永刚2017-10-2发送操作命令 + + string paraStr = JsonConvertHelper.GetSerializes(recoveryDai); + proy.SendOperateOrder(paraStr); + } + } + #endregion + + #region 根据输入条码定位采集点 + /// + /// 根据输入条码定位采集点 + /// + /// + private DAI LocateDAI(string productCode) + { + foreach (var rule in _barcodeRules) + { + if (System.Text.RegularExpressions.Regex.IsMatch(productCode, rule.REGEX)) + { + var dai = daiList.FirstOrDefault(p => (p.MATERIAL_TYPE == rule.MATERIAL_TYPE || p.MATERIAL_TYPE == rule.PARENT_TYPE) && p.DATA_TYPE == rule.DATA_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = rule.MATERIAL_CODE; + ndai.MATERIAL_TYPE = rule.MATERIAL_TYPE; + return ndai; + } + + } + } + //条码未匹配到任何正则 + Product product = _agent.InvokeServiceFunction(B9BasicService.ProductBLL_GetOrginProduct.ToString(), productCode); + if (product != null) + { + var dai = daiList.FirstOrDefault(p => p.MATERIAL_TYPE == product.MATERIAL_TYPE); + if (dai != null) + { + var ndai = (DAI)dai.Clone(); + ndai.MATERIAL_CODE = product.MATERIAL_CODE; + return ndai; + } + + } + + return null; + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindView() + { + #region 刷新生产零件的列表 + this.DGViewProList.DataSource = new List(); + //加载当前工序,当前设备的最后几条加工记录 + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + MainOperation operationSearchModel = new MainOperation(); + //operationSearchModel.CREATEUSER = ClientContext.LoginInfo.UserID; + operationSearchModel.MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE; + //operationSearchModel.PROCESSTYPE = _operationServiceParam.processSet.PROCESSTYPE; + operationSearchModel.CURRENTPROCESS = _operationServiceParam.machineInfo.WORKLOC_CODE; + + //if (_operationServiceParam.processSet.PROCESSTYPE != EnumGeter.ProcessType.maojie.GetHashCode().ToString() + // && (this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.fengdao.GetHashCode().ToString() + // || this.comProductType.SelectedValue.ToString() != EnumGeter.ProductType.HUDfengdao.GetHashCode().ToString() + // ) + // ) + //{ + // operationSearchModel.PRODUCTTYPE = this.comProductType.SelectedValue.ToString(); + //} + + try + { + #region 服务查询 + dataPage = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_GetOperationListNew.ToString(), operationSearchModel, dataPage); + List listOperetions = JsonConvertHelper.GetDeserialize>(dataPage.Result.ToString()); + #endregion + this.DGViewProList.DataSource = listOperetions; + DGViewProList.ClearSelection(); + + } + catch (Exception ex) + { + throw ex; + } + + #endregion + } + #endregion + + #region 发送指令或者接受完成指令刷新列表 + /// + /// 发送指令或者接受完成指令刷新列表 + /// + public void BindPlanView() + { + #region 刷新生产计划 + dgvPlan.AutoGenerateColumns = false; + this.dgvPlan.DataSource = new List(); + + + try + { + DataPage dataPage = new DataPage(); + dataPage.PageSize = int.Parse(cbListRowcount.Text); + dataPage.PageIndex = 1; + dataPage.SortExpression = " ROWVALUE ASC"; + string workcellcode = daiList.Select(p => p.WORKCELL_CODE).FirstOrDefault() + ""; + #region 服务查询 + var orderlist = _agent.InvokeServiceFunction>(B9IPCService.WorkOrderBLL_GetOrderInCell.ToString(), workcellcode,cbPlanFilter.SelectedIndex, dataPage); + #endregion + this.dgvPlan.DataSource = orderlist; + //DGViewProList.ClearSelection(); + + var plancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, ""); + lblPlanCount.Text = plancount.ToString(); + + var dayplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetDayPlanCount.ToString(), _operationServiceParam.machineInfo.WORKCENTER_CODE); + lblDayPlanCount.Text = dayplancount.ToString(); + + var shiftplancount = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetOrderCountInCell.ToString(), workcellcode, _operationServiceParam.produceShift.PRODUCESHIFTTCODE); + lblShiftPlanCount.Text = shiftplancount.ToString(); + + if (!string.IsNullOrWhiteSpace(_operationServiceParam.produceShift.PID)) + { + var shift = _operationServiceParam.produceShift; + var condition = new FJC.Entity.QT.ProcessRecord(); + condition.WORKCELL_CODE = workcellcode; + condition.WORK_START_TIME = DateTime.Now.Date.Add(shift.PSSTART - shift.PSSTART.Date); + condition.WORK_END_TIME = DateTime.Now.Date.Add(shift.PSEND - shift.PSEND.Date); + if (condition.WORK_END_TIME < condition.WORK_START_TIME) + { + condition.WORK_END_TIME = condition.WORK_END_TIME.AddDays(1); + } + var shiftcompletecount = _agent.InvokeServiceFunction(B9IPCService.ProcessRecordBLL_GetCount.ToString(), condition); + lblShiftCompleteCount.Text = shiftcompletecount.ToString(); + } + else + { + lblShiftCompleteCount.Text = ""; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + } + finally + { + timecounter = 0; + } + #endregion + } + #endregion + + #region 绑定先决条件以及绑定加工记录 + /// + /// 绑定先决条件以及绑定加工记录 + /// + private void BindAll() + { + //设置当前的工序 + //_operationServiceParam.processSet = this.comProductType.SelectedItem as ProcessSet; + if (_operationServiceParam.machineInfo != null)//_operationServiceParam.processSet != null && + { + this.DGView.Refresh(); + DGViewColorBind(); + + BindView(); + BindPlanView(); + } + + } + #endregion + + #region 窗口数据重置 + /// + /// 窗口数据重置 + /// + private void Reset(string mouldcode) + { + foreach (var v in daicache.Where(p=>string.Equals(p.MouldCode,mouldcode))) + { + if (!string.IsNullOrWhiteSpace(v.StateCode)) + { + v.MaterialName = ""; + v.MaterialCode = ""; + v.DAValue = ""; + v.DAResult = ""; + } + } + _operationServiceParam = new OperationServiceParam(); + _operationServiceParam.machineInfo = this.comMachine.SelectedItem as MachineInfo; + _operationServiceParam.produceShift = ClientContext.produceShift; + BindAll(); + } + #endregion + + #region 刷新数据采集列表 + /// + /// 刷新数据采集列表 + /// + private void DGViewColorBind() + { + int panelheight = 0; + DGView.ClearSelection(); + if (DGView.Rows.Count > 0) + { + string mould = ""; + for (int i = 0; i < DGView.Rows.Count; i++) + { + + DataGridViewRow dgr = DGView.Rows[i]; + panelheight += dgr.Height; + if (!string.Equals(dgr.Cells[dgcMouldCode.Name].Value, mould)) + { + if (i > 0) + { + DataGridViewRow dgru = DGView.Rows[i - 1]; + dgru.DividerHeight = 4; + dgru.Height = dgr.Height + 4; + panelheight += 4; + } + + mould = dgr.Cells[dgcMouldCode.Name].Value + ""; + } + if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "通过") + { + dgr.DefaultCellStyle.BackColor = Color.Green; + } + else if (dgr.Cells["daresult"].Value != null && dgr.Cells["daresult"].Value.ToString() == "未通过") + { + dgr.DefaultCellStyle.BackColor = Color.Red; + } + else + { + dgr.DefaultCellStyle.BackColor = SystemColors.Window; + } + } + plDAI.Height = 27 + panelheight; + } + + } + #endregion + + #region 标签打印 + + #region 新版总工标签打印 + + GridppReport Report = null; + public string planMATERIAL_CODE = ""; + public string processMainCode = ""; + + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabe(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "ASSEMBLY" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + + #region 总成装配打印 + + rePrintBzd.barcode = main.MAINCODE; + rePrintBzd.MATERIAL_CODE = main.MATERIAL_CODE; + rePrintBzd.color = mcinit.COLOR; + + try + { + Report = new GridppReport(); + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox2); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + } + + + //新增 + private BZD rePrintBzd = new BZD(); + + private void ReadFetchRecordBox2() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + private void ReadFetchRecordBo3() + { + try + { + string e052BarCode = rePrintBzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = rePrintBzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = rePrintBzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + /// + /// 打印052标签 + /// + /// + public void Print052QRCODE() + { + try + { + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + } + catch (Exception) + { + + throw; + } + finally + { + + Report = new GridppReport(); + } + + #endregion + + + } + + + public class BZD + { + public string barcode; + public string color; + public string MATERIAL_CODE; + public string count; + }; + /// + /// 获取BZD码 + /// + /// + private BZD getBZDCode() + { + BZD bzd = new BZD(); + List list = new List(); + List paramList = new List(); + + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 start + if (string.IsNullOrEmpty(planMATERIAL_CODE)) + { + var MaterialCodes = ""; + var dataSrouce = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetMaterialCode.ToString(), processMainCode); + foreach (DataRow dataRow in dataSrouce.Rows) + { + MaterialCodes = dataRow["MATERIAL_CODE"].ToString(); + } + if (!string.IsNullOrEmpty(MaterialCodes)) + planMATERIAL_CODE = MaterialCodes; + else + throw new Exception("创建BZD码失败!缺少planMATERIAL_CODE"); + } + //张松男 20210207 总成工位打印052 缺少物料号 重新查找填充 end + + + paramList.Add(planMATERIAL_CODE); + paramList.Add(processMainCode); + + try + { + //读取BZDCONFIG配置列表 + list = _agent.InvokeServiceFunction>( + B9IPCService.BZDRecorderBLL_CreateBZDCode.ToString(), paramList); + if (list != null) + { + //将返回值赋值给bzd对象 + bzd.barcode = list[0]; + bzd.color = list[1]; + bzd.MATERIAL_CODE = list[2]; + bzd.count = list[3]; + if (bzd.count == "0") + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码失败!缺少list[3]"); + } + planMATERIAL_CODE = null; + processMainCode = null; + } + else + { + planMATERIAL_CODE = null; + processMainCode = null; + throw new Exception("创建BZD码异常!list=null"); + } + } + catch (Exception e) + { + planMATERIAL_CODE = null; + processMainCode = null; + MessageBox.Show(e.Message); + throw; + } + + return bzd; + } + + /// + /// 填充数据 + /// + private void ReadFetchRecordBox() + { + try + { + BZD bzd = getBZDCode(); + string e052BarCode = bzd.barcode; + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = bzd.color;//颜色 + + Report.FieldByName("PartDesc").Value = bzd.MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + #endregion + + #region 总成标签打印 + /// + /// 总成标签打印 + /// + /// + private void PrintAssemblyLabel(string processcode) + { + tsbPrint.Visible = true; + ///////////////////// + string selectKey = processcode; + Main main = _agent.InvokeServiceFunction
(B9IPCService.MainBLL_GetByCondition.ToString(), new Main() { EPIDERMISCODE = selectKey }); + if (main == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + MaterialCodeInit mcinit = _agent.InvokeServiceFunction(B9IPCService.MainBLL_GetMaterialSetByCondition.ToString(), new MaterialCodeInit() { MATERIAL_CODE = main.MATERIAL_CODE, WORKCELL_CODE = "LS_ASSEMBLE_VW371" }); + if (mcinit == null) + { + MessageBox.Show("获取总成条码异常!"); + return; + } + #region 总成装配打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + //ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + + //************20210413 DQZhang BC316 VAN************************************* + if (cBoxVAN.Checked) + { + ll.BarCode = main.MAINCODE + "," + "5CG.857.003.A VAN" + ","; + } + else + { + ll.BarCode = main.MAINCODE + "," + main.MATERIAL_CODE + ","; + } + //*************************************************************************** + + ll.BarCode += mcinit.HB; + //if (selectKey.ToUpper().Substring(12, 1) == "H") + //{ + // ll.BarCode += "高"; + //} + //else + //{ + // ll.BarCode += "低"; + //} + ll.BarCode += mcinit.COLOR; + //if (selectKey.Substring(13, 1) == "1") + //{ + // ll.BarCode += "黑"; + //} + //else if (selectKey.Substring(13, 1) == "2") + //{ + // ll.BarCode += "灰"; + //} + //else + //{ + // ll.BarCode += "米"; + //} + + ll.BarCode += " ";// +mcinit.PRODUCT_TYPES; + //ll.BarCode += "\r\n" + ll.BarCode;//总成标签一式两份 + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString(), + System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString()); + ///总成标签一式两份 + //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCtemPath"].ToString + // (), System.Configuration.ConfigurationManager.AppSettings["ZCdataPath"].ToString + // ()); + + #endregion + } + #endregion + + #region 过程标签打印 + /// + /// 过程标签打印 + /// + /// + private void PrintProcessLabel(string processcode) + { + ///////////////////// + string selectKey = processcode; + Product product = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = selectKey }); + if (product == null) + { + MessageBox.Show("获取产品信息异常!"); + return; + } + + #region 过程标签打印 + + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + ll.BarCode = product.PRODUCTCODE + "," + product.MATERIAL_CODE + ","; + + ll.BarCode += product.MATERIAL_CODE + "," + product.MATERIAL_CODE + "," + product.MATERIAL_TYPE; + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["ProcessCodeDATPath"].ToString + ()); + + #endregion + } + #endregion + + #region 计划标签打印 + /// + /// 计划标签打印 + /// + /// + private void PrintPlanLabel(DAResult result) + { + var labeldata = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_GetPlanLabel.ToString(), result.WorkOrderID); + labeldata.SN = result.ProcessCode; + + #region 计划标签打印 + //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ; + //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath); + //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); + QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); + + + //planno,plantype,seq,bom,vin,kin,sn,pn,prodname,plandate,project,hbtype,color + ll.BarCode = string.Format("'{0},'{1},'{2},'{3},'{4},'{5},'{6},'{7},'{8},'{9},'{10},'{11},'{12}", + labeldata.PlanNo,//计划号 + labeldata.PlanType,//计划类型(0:FIS,1:STOCK,2:INSERT) + labeldata.SEQ,//顺序号 + labeldata.BOM,//bom号 + labeldata.VIN,//底盘号 + labeldata.KIN,//车身号 + labeldata.SN,//序号 + labeldata.PN,//总成物料号 + labeldata.ProdName,//总成物料名称 + labeldata.PlanDate,//计划日期 + labeldata.ProjectCode,//项目编号 + labeldata.HBType,//车型配置 + labeldata.Color//颜色 + ); + + + + QM.Assist.PrintUtil.LabelList2.Add(ll); + QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); + pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + ()); + + #endregion + } + #endregion + + #endregion + + #region 设备下拉改变事件 + /// + /// 设备下拉改变事件 + /// + /// + /// + private void comMachine_SelectionChangeCommitted(object sender, EventArgs e) + { + Init(); + } + #endregion + + #region 重新发发送操作指令 + /// + /// 重新发发送操作指令 + /// + /// + /// + private void sendOrderButton_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要重新发送操作指令的加工信息!"); + return; + } + + + if (MessageBox.Show("确定重新发送操作指令?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString())) + { + MessageBox.Show("只有加工中的零件可以重新发送操作指令!"); + return; + } + + string molderNumber = this.DGViewProList.SelectedRows[0].Cells["MOLDNUMBER"].Value.ToString(); + + + #region 发送指令 + + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + string moldnumber = _operationServiceParam.machineInfo.MOLDNUMBER; + try + { + + _operationServiceParam.machineInfo.MOLDNUMBER = molderNumber; + DataResult reMsg = _agent.InvokeServiceFunction>(B9BasicService.MainOperationBLL_GetSendOrder.ToString(), _operationServiceParam.machineInfo, true); + if (!string.IsNullOrEmpty(reMsg.Result) && proy != null && (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened)) + { + proy.SendOperateOrder(reMsg.Result); + this.lblError.Text = "发送指令成功!"; + this.lblError.ForeColor = Color.Green; + this.lblError.BackColor = SystemColors.InactiveBorder; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + catch (Exception ex) + { + this.lblError.Text += "发送指令失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + _operationServiceParam.machineInfo.MOLDNUMBER = moldnumber; + } + } + + #endregion + + } + #endregion + + #region 锁定解锁 + /// + /// 锁定解锁 + /// + /// + /// + private void lblLock_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + else + { + LockType(true); + } + } + #endregion + + #region 设备和类别锁定 + /// + /// 设备和类别锁定 + /// + /// + private void LockType(bool lockFlag) + { + this.comMachine.Enabled = lockFlag; + //this.comProductType.Enabled = lockFlag; + if (lockFlag) + { + + this.lblLock.Text = "锁定工位"; + this.lblLock.Tag = "0"; + } + else + { + string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + System.IO.File.WriteAllText(locationfile, this.comMachine.SelectedValue.ToString()); + this.lblLock.Text = "解锁工位"; + this.lblLock.Tag = "1"; + } + + } + #endregion + + #region 回车事件 + /// + /// 回车事件 + /// + /// + /// + private void txtCode_KeyDown(object sender, KeyEventArgs e) + { + + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + txtCode.Text.Trim().ToUpper()); + Operation(); ;//触发button事件 + } + + } + + /// + /// 回车事件 + /// + /// + /// + private void OperationForm_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter)//如果输入的是回车键 + { + this.btnAdd_Click(sender, e);//触发button事件 + } + } + + #endregion + + #region OPC推送消息 + /// + /// OPC推送消息 + /// + /// 消息类型 3:模架号变化, + /// 消息内容 + public void ReturnResult(string messageType, string message) + { + this.Invoke((EventHandler)(delegate + { + try + { + if (messageType == "3") //模架号 + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, message)); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + } + else if (messageType == "4") //模具号 + { + var str_messages = message.Split(':'); + if (!(string.Equals(str_messages[str_messages.Length - 1], "0") || string.Equals(str_messages[str_messages.Length - 1].ToUpper(), "FALSE"))) + { + DAInput(message, "MN"); + } + return; + } + else if (messageType == "5") //模具号 + { + var str_messages = message.Split(':'); + if (AttachInfo.ContainsKey(str_messages[0])) + { + AttachInfo[str_messages[0]] = str_messages[1]; + } + else + { + AttachInfo.Add(str_messages[0], str_messages[1]); + } + return; + } + else if (string.Equals(messageType, "HeartBeat")) + { + opcheartbeatwaithandel.Set(); + } + else + { + DAInput(message, "PARM"); + return; + } + + } + catch (Exception ex) + { + WriteLog.WriteError(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " " + ex.Message); + this.lblError.Text = ""; + this.lblError.ForeColor = Color.Black; + this.lblError.BackColor = SystemColors.InactiveBorder; + Reset(string.IsNullOrWhiteSpace(lblMould.Text) ? _operationServiceParam.machineInfo.WORKCELL_CODE : lblMould.Text); + txtCode.SelectAll(); + txtCode.Focus(); + MessageBox.Show("系统异常,请重新扫描!"); + } + })); + } + + private void DAInput(string message,string datype) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELCODE, message.Split(':')[0])); + + var dai = daiList.FirstOrDefault(p => p.DATA_TYPE == datype); + var daiview = daicache.FirstOrDefault(p => p.DACode == dai.DA_CODE && (mould == null || p.MouldCode == mould.MODELCODE)); + //daiviews.FirstOrDefault(p => p.DACode == dai.DA_CODE); + daiview.DAValue = message; + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Input.ToString() + , new DAArgs + { + WorkCellCode = dai.WORKCELL_CODE, + WorkLocCode = dai.WORKLOC_CODE, + DACode = dai.DA_CODE, + DAValue = message, + MaterialCode = dai.MATERIAL_CODE, + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould == null ? _operationServiceParam.machineInfo.WORKCELL_CODE : mould.MODELCODE, + AttachData=AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + daiview.DAResult = "未通过"; + DGView.Refresh(); + DGViewColorBind(); + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + txtCode.SelectAll(); + txtCode.Focus(); + return; + } + else + { + daiview.DAValue = result.AnalyzedValue; + daiview.DAResult = "通过"; + daiview.MaterialCode = result.MATERIAL_CODE; + daiview.MaterialName = result.MATERIAL_NAME; + DGView.Refresh(); + DGViewColorBind(); + //TODO:更新界面数据 + } + DoResultActions(result); + + if (this.lblLock.Tag.ToString().Equals("0")) + { + LockType(false); + } + DGView.Refresh(); + DGViewColorBind(); + + this.txtCode.Text = ""; + //设置焦点 + this.ActiveControl = this.txtCode; + this.txtCode.Focus(); + + GC.Collect(); + } + #endregion + + #region 重新连接服务器 + /// + /// 重新连接服务器 + /// + private void ReContact() + { + //设置与设备双工通信 + if (_operationServiceParam.machineInfo.ISCONTROL.Equals("2") || _operationServiceParam.machineInfo.ISCONTROL.Equals("3")) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + try + { + this.lblError.BackColor = SystemColors.InactiveBorder; + this.lblError.ForeColor = Color.Black; + this.lblError.Text = "正在连接中稍后!"; + var mouldno = proy.Register(_operationServiceParam.machineInfo.MACHINECODDE); + this.lblError.Text = "服务器连接成功!"; + this.lblError.ForeColor = Color.Green; + + if (mouldList.Count <= 2) + { + SwitchMould(""); + } + else + { + if (mouldno > 0) + { + var mould = mouldList.FirstOrDefault(p => string.Equals(p.MODELSTATION, mouldno.ToString())); + if (mould != null) + { + SwitchMould(mould.MODELCODE); + } + + } + else + { + SwitchMould(""); + } + //cbMould_SelectedIndexChanged(this, EventArgs.Empty); + } + } + catch (Exception) + { + this.lblError.Text = "连接服务失败!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + } + } + } + } + #endregion + + #region 工具栏Click + + #region 重接服务器 + /// + /// 重接服务器 + /// + /// + /// + private void tsbConnect_Click(object sender, EventArgs e) + { + ReContact(); + } + /// + /// 重接服务器 + /// + /// + /// + private void tsbRecovery_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbRecovery.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbRecovery.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbRecovery.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + Recovery(mouldcode); + } + #endregion + + #region 撤销 + /// + /// 撤销 + /// + /// + private void Recovery(string mouldcode) + { + + if (MessageBox.Show("确定对该零件进行撤销操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Rollback.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(result.MouldCode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + /// + /// 撤销 + /// + /// + /// + private void tsbRecovery_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + Recovery(mouldcode); + + } + #endregion + + #region 重打总成码 + + /// + /// + /// + public string PRODUCT_CODE { get; set; } + + /// + /// 重打总成码 + /// + /// + /// + private void tsbPrint_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择打印的本体信息!"); + return; + } + + + if (MessageBox.Show("确定打印该本体的总成条码?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + ///////////////////// + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + + PRODUCT_CODE = selectKey; + + Report = new GridppReport(); + + //数据填充 + //Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox); + + + string reportPath = System.Configuration.ConfigurationManager.AppSettings["AssemblyPrintingTemplatePath"].ToString(); + + //数据填充 + Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReadFetchRecordBox3); + + Report.LoadFromFile(reportPath); + + //rep.Printer.PrinterName = "默认打印机";//调取不同的打印机 + + Report.Print(false); + + PRODUCT_CODE = null; + + //PrintAssemblyLabe(selectKey); + } + private void ReadFetchRecordBox3() + { + try + { + var record = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = PRODUCT_CODE }); + if (record != null) + { + var config = _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_Get.ToString(), new BZDConfig() { PID = record.MPID }); + string e052BarCode = record.BZDCODE; + var MATERIAL_CODE = config.Result.MATERIALCODDE; + var color = config.Result.configDetail; + + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = PRODUCT_CODE, Type = "BZD条码重打" }); + + Report.DetailGrid.Recordset.Append(); + + Report.FieldByName("BarCode").Value = string.Format("*{0}*", e052BarCode);//总装条码 + + Report.FieldByName("FullBarCode").Value = e052BarCode;//总装条码 + + Report.FieldByName("PartCode").Value = color;//颜色 + + Report.FieldByName("PartDesc").Value = MATERIAL_CODE; //物料号 + + Report.DetailGrid.Recordset.Post(); + + } + + } + catch (Exception err) + { + throw new Exception(err.Message); + } + } + + + #endregion + + #region 补打总成 + + + /// + /// 重打总成码 + /// + /// + /// + private void toolStripButton3_Click(object sender, EventArgs e) + { + BZDPasswordForm psd = new BZDPasswordForm(this); + BZDRePrintForm frm = new BZDRePrintForm(this); + + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + frm.ShowDialog(); + } + + } + + #endregion + + #region 刷新 + /// + /// 刷新 + /// + /// + /// + private void btnRefresh_Click(object sender, EventArgs e) + { + BindView(); + BindPlanView(); + } + #endregion + + #region 产品返修操作 + /// + /// 产品返修操作 + /// + /// + /// + private void btnEditProduct_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择要进行返修的表皮信息!"); + return; + } + + if (MessageBox.Show("确定要进行返修的表皮信息?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + + //判断是否已加工完成 + if (!this.DGViewProList.SelectedRows[0].Cells["OPERATESTATE"].Value.ToString().Equals(EnumGeter.OPERATESTATE.COMPLETED.GetHashCode().ToString())) + { + MessageBox.Show("只有加工完成的零件可以产品返修操作!"); + return; + } + + //获取产品条码 + string selectKey = this.DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + + string pid = this.DGViewProList.SelectedRows[0].Cells["PPID"].Value.ToString(); + MainOperation mo = new MainOperation() { PID = pid }; + + DataResult result = _agent.InvokeServiceFunction(B9BasicService.MainOperationBLL_MendProudct.ToString(), mo); + MessageBox.Show(result.Msg); + if (result.IsSuccess) + { + this.BindView(); + BindPlanView(); + } + } + #endregion + + #region 取消加工 + /// + /// 取消加工 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbCancel.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbCancel.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbCancel.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ResetClick(mouldcode); + } + + #endregion + + #region 复位 + /// + /// 撤销 + /// + /// + private void ResetClick(string mouldcode) + { + + if (MessageBox.Show("确定对本工位进行复位操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_Reset.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + MouldCode = mouldcode, + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mouldcode); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + } + #endregion + + #region 重置 + /// + /// 重置 + /// + /// + /// + private void tsbCancel_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mouldcode = e.ClickedItem.Tag.ToString(); + ResetClick(mouldcode); + + } + #endregion + + #region 打开查询界面 + /// + /// 打开查询界面 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["MainOperationStaticForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + MainOperationStaticForm form = new MainOperationStaticForm(_operationServiceParam.machineInfo, _operationServiceParam.processSet); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + #endregion + + #region 放行 + /// + /// 放行 + /// + /// + /// + private void tsbPass_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text)&&cbMould.Items.Count>1) + { + tsbPass.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbPass.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbPass.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + LetPass(mouldcode); + } + /// + /// 放行 + /// + /// + /// + private void tsbPass_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + LetPass(mould); + } + /// + /// 放行 + /// + /// + private void LetPass(string mould) + { + if (MessageBox.Show("确定对该零件进行放行操作?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + { + return; + } + + var result = _agent.InvokeServiceFunction(B9IPCService.DAI_LetPass.ToString() + , new DAArgs + { + WorkCellCode = _operationServiceParam.machineInfo.WORKCELL_CODE, + WorkLocCode = _operationServiceParam.machineInfo.WORKLOC_CODE, + DACode = "", + DAValue = "", + MaterialCode = "", + MachineCode = _operationServiceParam.machineInfo.MACHINECODDE, + MachineName = _operationServiceParam.machineInfo.MACHINENAME, + IsControl = _operationServiceParam.machineInfo.ISCONTROL, + MouldCode = mould,//string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text + AttachData = AttachInfo + }); + + if (!result.Success) //如果采集数据输入失败 + { + this.lblError.Text = result.Message; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + return; + } + SendRecoveryOrder(mould); + DoResultActions(result); + DGView.Refresh(); + DGViewColorBind(); + + //设置焦点 + this.ActiveControl = this.txtCode; + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 重发启动信号 + /// + /// 重新发送启动信号 + /// + /// + /// + private void tsbReSignal_Click(object sender, EventArgs e) + { + if (string.IsNullOrWhiteSpace(lblMould.Text) && cbMould.Items.Count > 1) + { + tsbReSignal.DropDownItems.Clear(); + foreach (MachineInfoModels mould in cbMould.Items) + { + var dditem = tsbReSignal.DropDownItems.Add(mould.MODELNAME); + dditem.Tag = mould.MODELCODE; + dditem.Padding = new Padding(0, 10, 0, 0); + } + tsbReSignal.ShowDropDown(); + return; + } + string mouldcode = string.IsNullOrWhiteSpace(lblMould.Text) ? (cbMould.Items.Count < 2 ? _operationServiceParam.machineInfo.WORKCELL_CODE : cbMould.SelectedValue.ToString()) : lblMould.Text; + ReSignal(mouldcode); + } + /// + /// 重发启动信号 + /// + /// + /// + private void tsbReSignal_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + string mould = e.ClickedItem.Tag.ToString(); + + ReSignal(mould); + } + int reSignalClickCounter = 0; + /// + /// 重发启动信号 + /// + /// + private void ReSignal(string mouldcode) + { + var result = _agent.InvokeServiceFunction>(B9IPCService.DAIBLL_GetSignalDAI.ToString(), _operationServiceParam.machineInfo.WORKCELL_CODE, string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "" : mouldcode); + + var dcache = daicache.FirstOrDefault(p => p.DACode == result.Result && p.MouldCode == mouldcode); + if (dcache == null) + { + return; + } + if (!string.Equals(dcache.DAResult, "通过")) + { + if (reSignalClickCounter < 5) + { + lblError.Text = "数据采集未通过,无法发送启动信号!"; + this.lblError.ForeColor = Color.White; + this.lblError.BackColor = Color.Red; + reSignalClickCounter += 1; + return; + } + else //连续点击重发信号5次 + { + var dresult = MessageBox.Show("数据采集未通过,是否需要强制发送启动信号?", "发送启动信号", MessageBoxButtons.YesNoCancel); + if (dresult != System.Windows.Forms.DialogResult.Yes) + { + return; + } + } + } + DAI signalDai = new DAI() + { + WORKCELL_CODE = _operationServiceParam.machineInfo.WORKCELL_CODE, + WORKLOC_CODE = _operationServiceParam.machineInfo.WORKLOC_CODE, + DA_CODE = dcache.DACode, + MOULD_CODE = string.Equals(_operationServiceParam.machineInfo.WORKCELL_CODE, mouldcode) ? "1" : mouldcode, + Result = EnumGeter.ORDERTYPE.OK.GetHashCode().ToString(), + MATERIAL_CODE = dcache.MaterialCode + + }; + SendSignal(signalDai); + reSignalClickCounter = 0; + } + #endregion + + #region 点击缺陷统计卡 + /// + /// 点击缺陷统计卡 + /// + /// + /// + private void toolStripButton1_Click(object sender, EventArgs e) + { + if (this.DGViewProList.SelectedRows.Count == 0) + { + MessageBox.Show("请选择加工记录!"); + return; + } + if (this.DGViewProList.SelectedRows.Count > 1) + { + MessageBox.Show("只能选择一条加工记录!"); + return; + } + + var temp = DGViewProList.SelectedRows[0].Cells["PRODUCTCODE"].Value.ToString(); + MendRecorderReasonForm form = new MendRecorderReasonForm(temp); + + form.ShowDialog(); + } + #endregion + + #region 安东呼叫 + /// + /// 安东呼叫 + /// + /// + /// + private void tsbAndon_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["CallManageForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + else + { + //先关闭 + f.Close(); + //重新打开 + CallManageForm form = new CallManageForm(_operationServiceParam.machineInfo.WORKCENTER_CODE, _operationServiceParam.machineInfo.WORKLOC_CODE, _operationServiceParam.machineInfo.MACHINECODDE); + form.MdiParent = this.MdiParent; + form.WindowState = FormWindowState.Maximized; + form.Show(); //重新new一个Show出来 + } + } + #endregion + #endregion + + #region 设置加工记录表列的颜色信息 + /// + /// 设置列的颜色信息 + /// + /// + /// + private void DGViewProList_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + if (e.RowIndex > DGViewProList.Rows.Count - 1) + return; + DataGridViewRow dgr = DGViewProList.Rows[e.RowIndex]; + try + { + if (dgr.Cells["OPERATESTATE"].Value.ToString() == EnumGeter.OPERATESTATE.OPERATING.GetHashCode().ToString()) + { + dgr.DefaultCellStyle.BackColor = Color.YellowGreen; + DGViewProList.ClearSelection(); + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + private void SwitchMould(string mouldcode) + { + lblMould.Text = mouldcode; + daiviewSource.Clear(); + foreach (var row in daicache) + { + if (string.IsNullOrWhiteSpace(mouldcode) || string.IsNullOrWhiteSpace(row.MouldCode) || string.Equals(row.MouldCode, daiList.FirstOrDefault().WORKCELL_CODE) || string.Equals(row.MouldCode, mouldcode) || string.Equals(row.PREINPUT, "1")) + { + if (row.DAType == "PARM") + { } + else + { + daiviewSource.Add(row); + } + } + } + DGViewColorBind(); + } + #endregion + + #region 列表定时刷新 + private void cbListRowcount_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindView(); + BindPlanView(); + } + + private void cbRefreshRate_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + } + private void cbPlanFilter_SelectedIndexChanged(object sender, EventArgs e) + { + BindPlanView(); + SaveSetting(); + } + + private void SaveSetting() + { + string filepath = ConfigurationManager.AppSettings["SaveFilePath"]; + filepath = string.Format("{0}ViewSetting.cfg", filepath); + var setting = new + { + ListRowcount = int.Parse(cbListRowcount.Text), + RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), + //PlanFilter = cbPlanFilter.SelectedIndex + }; + string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); + System.IO.File.WriteAllText(filepath, settingstring); + } + int timecounter = 0; + int opcheartbeatcount = 0; + System.Threading.AutoResetEvent opcheartbeatwaithandel = new AutoResetEvent(false); + private void timer1_Tick(object sender, EventArgs e) + { + if (!tsbOrderOperation.DropDown.Visible) + { + timecounter += 1; + if (timecounter > int.Parse(cbRefreshRate.Text.Trim('s')))//计时达到刷新时间 + { + + BindPlanView(); + + } + } + if (proy != null) + { + opcheartbeatcount += 1; + if (opcheartbeatcount > 10) + { + if (proy.State == System.ServiceModel.CommunicationState.Faulted) + { + System.ServiceModel.InstanceContext site = new System.ServiceModel.InstanceContext(this); + proy = new ServiceOpc.OpcServiceClient(site); + } + if (proy.State == System.ServiceModel.CommunicationState.Created || proy.State == System.ServiceModel.CommunicationState.Opened) + { + var task = new System.Threading.Tasks.Task(() => + { + try + { + proy.SendOperateOrder(string.Format("HeartBeat:{0}", _operationServiceParam.machineInfo.MACHINECODDE)); + //opcheartbeatwaithandel.Reset(); + if (opcheartbeatwaithandel.WaitOne(5000)) + { + ClientContext.OpcState = 1; + } + else + { + ClientContext.OpcState = 3; + } + } + catch + { + ClientContext.OpcState = 2; + } + }); + task.Start(); + } + opcheartbeatcount = 0; + } + } + } + #endregion + + #region 切换选择计划和加工记录 + /// + /// 切换选择计划和加工记录 + /// + /// + /// + private void tabView_Selected(object sender, TabControlEventArgs e) + { + tsbOrderOperation.Visible = tabView.SelectedTab == tpPlan; + //butDEFECT.Enabled = tabView.SelectedTab == tpRecord; + } + #endregion + + #region 工单操作 + + #region 取消挂起 + /// + /// 取消挂起 + /// + /// + /// + private void tsmiCancelSuspend_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行取消挂起操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可取消状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_CancelSuspend.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 删除工单 + /// + /// 删除工单 + /// + /// + /// + private void tsmiDeleteOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行删除操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可删除状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_DeleteOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 重置工单 + /// + /// 重置工单 + /// + /// + /// + private void tsmiResetOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行重置操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可重置状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_ResetOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 挂起工单 + /// + /// 挂起工单 + /// + /// + /// + private void tsmiSuspendOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行挂起操作!"); + return; + } + List ids=new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (int.Equals(order.STATE, 2)) + { + MessageBox.Show("不能挂起正在执行的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_SuspendOrder.ToString(), ids); + BindPlanView(); + } + #endregion + + #region 回收工单 + /// + /// 回收工单 + /// + /// + /// + private void tsmiTakebackOrder_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count <= 0) + { + MessageBox.Show("请选择一条工单进行回收操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.STATE, 4)) + { + MessageBox.Show("只可回收状态为挂起的工单!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_TakeBack.ToString(), ids); + BindPlanView(); + } + #endregion + + #endregion + + #region 工单列表选择发送变化时延时自动刷新 + /// + /// 工单列表选择发送变化时延时自动刷新 + /// + /// + /// + private void dgvPlan_SelectionChanged(object sender, EventArgs e) + { + timecounter = -10; + } + #endregion + + #region 设置计划工单列状态、颜色 + /// + /// 设置计划工单列状态、颜色 + /// + /// + /// + private void dgvPlan_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) + { + var WORKORDER_STATE_TEXT = new string[] {"初始","确认","执行中","完成","挂起" }; + var row = dgvPlan.Rows[e.RowIndex]; + var order = (FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (order.STATE >= 0 && order.STATE < WORKORDER_STATE_TEXT.Length) + { + row.Cells[dgcState.Name].Value = WORKORDER_STATE_TEXT[order.STATE]; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Suspended.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.LightGray; + row.DefaultCellStyle.ForeColor = Color.Gray; + } + if (order.STATE == FJC.Entity.EnumGeter.WorkOrderState.Executing.GetHashCode()) + { + row.DefaultCellStyle.BackColor = Color.YellowGreen; + dgvPlan.ClearSelection(); + } + } + #endregion + + #region 切换计划和加工记录触发动作 + /// + /// 切换计划和加工记录触发动作 + /// + /// + /// + private void tabView_SelectedIndexChanged(object sender, EventArgs e) + { + txtCode.SelectAll(); + txtCode.Focus(); + } + #endregion + + #region 采集区扫描颜色显示 + /// + /// 采集区扫描颜色显示 + /// + /// + /// + private void OperationForm_Activated(object sender, EventArgs e) + { + DGViewColorBind(); + } + #endregion + + #region 切换模具 + /// + /// 切换模具 + /// + /// + /// + private void cbMould_SelectedIndexChanged(object sender, EventArgs e) + { + if (_operationServiceParam.machineInfo.ISSTATION.Equals(1)) + { + SwitchMould(cbMould.SelectedValue + ""); + } + } + #endregion + + #region 切换设备 + /// + /// 切换设备配置文件 + /// 20181119gzf + /// + /// + /// + private void CheckFile() + { + string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + if (File.Exists(@locationfile2)) + { + this.btnChange.Visible = true; + } + else + { + this.btnChange.Visible = false; + } + } + + /// + /// 切换设备 + /// 20181119gzf + /// + /// + /// + private void btnChange_Click(object sender, EventArgs e) + { + //string locationfile = System.Configuration.ConfigurationManager.AppSettings["loactionfile"]; + //string locationfile2 = System.Configuration.ConfigurationManager.AppSettings["loactionfile2"]; + //string str1 = File.ReadAllText(@locationfile); + //string str2 = File.ReadAllText(locationfile2); + //System.IO.File.WriteAllText(locationfile, str2); + //System.IO.File.WriteAllText(locationfile2, str1); + var machineInfo = this.comMachine.SelectedItem as MachineInfo; + List machinelist = comMachine.DataSource as List; + if (machinelist != null && machineInfo != null && !string.IsNullOrEmpty(machineInfo.OPCGROUPNAME)) + { + var grouplist = machinelist.Where(p => p.OPCGROUPNAME == machineInfo.OPCGROUPNAME).ToList(); + var currentindex=grouplist.IndexOf(machineInfo); + if (currentindex < grouplist.Count - 1) + { + currentindex += 1; + } + else + { + currentindex = 0; + } + this.comMachine.SelectedValue = grouplist[currentindex].MACHINECODDE; + this.Init(); + } + } + #endregion + + private void btnCollapse_Click(object sender, EventArgs e) + { + gbMlist.Visible = !gbMlist.Visible; + plInfo.AutoSize = !gbMlist.Visible; + } + + private void tsmiIgnoreFISBreak_Click(object sender, EventArgs e) + { + if (dgvPlan.SelectedRows.Count != 1) + { + MessageBox.Show("请选择一条(且只能选择一条)工单进行忽略断号操作!"); + return; + } + List ids = new List(); + foreach (System.Windows.Forms.DataGridViewRow row in dgvPlan.SelectedRows) + { + var order = (QMAPP.FJC.Entity.ProductionPlan.WorkOrder)row.DataBoundItem; + if (!int.Equals(order.ORDER_TYPE, "0")) + { + MessageBox.Show("只可对FIS工单进行忽略断号操作!"); + return; + } + ids.Add(order.PID); + } + _agent.InvokeServiceFunction("WorkOrderBLL_IgnoreFISBreak", ids); + BindPlanView(); + } + + #region 根据配置 自动填充采集点 + + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + var AppConfig = _agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); + + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + + /// + /// 查找PbomItem + /// + /// + public List GetPBOMCODEValue(string MATERIAL_CODE) + { + var list = new List(); + var PbomItem = _agent.InvokeServiceFunction>(B9IPCService.PbomItemBLL_Get.ToString(), MATERIAL_CODE); + + if (PbomItem != null) + { + foreach (var va in PbomItem) + { + list.Add(va.PBOM_CODE); + } + return list; + } + else + return list; + } + + /// + /// 查找ScanIPConfig + /// + /// + public List GetSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Get.ToString(), ScanIPConfigs); + + return PbomItemList.OrderBy(c=>c.CFG).ToList(); + } + + /// + /// 查找Product + /// + /// + public Product SelectProduct(string Products) + { + var list = new List(); + var ProductList = _agent.InvokeServiceFunction(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); + return ProductList; + } + + /// + /// 查找ScanIPConfig + /// + /// + public bool UpdateSendPlcConfig(ScanIPConfig ScanIPConfigs) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ScanIPConfigBLL_Update.ToString(), ScanIPConfigs); + if (PbomItemList.Result > 0) + return true; + else + return false; + } + + /// + /// 插入产品信息 + /// + /// + public bool InsertProduct(Product Products) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProductBLL_Insert.ToString(), Products); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 插入加工记录信息 + /// + /// + public bool InsertProcessRecord(ProcessRecord ProcessRecords) + { + var list = new List(); + var PbomItemList = _agent.InvokeServiceFunction>(B9IPCService.ProcessRecordBLL_Insert.ToString(), ProcessRecords); + if (PbomItemList.Result >0) + return true; + else + return false; + } + + /// + /// 查找WorkOrder + /// + /// + public string GetWorkOrder_MATERIAL_CODE(string WorkOrderPID) + { + var WorkOrder = _agent.InvokeServiceFunction(B9IPCService.WorkOrderBLL_Get.ToString(), new WorkOrder() { PID = WorkOrderPID }); + if (WorkOrder != null) + return WorkOrder.PBOM_CODE; + else + return null; + } + + /// + /// 查找WorkOrder + /// + /// + public void GetNewCode(ref string Code,ref string Number) + { + var code1 = Convert.ToInt32(Code.Substring(Code.Length - 9, 9)); + Code = Code.Substring(0, Code.Length - 9) + (code1 + Convert.ToInt32(Number)).ToString().PadLeft(9, '0'); + + var ProductList = SelectProduct(Code); + if (ProductList != null ) + { + var newnumber = (Convert.ToInt32(Number) + 1).ToString(); + GetNewCode(ref Code,ref newnumber); + Number = newnumber; + } + else + Number = (Convert.ToInt32(Number) + 1).ToString(); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/.svn/pristine/c0/c0beb600180de9f20130da81f95f29d0c5ec4c61.svn-base b/.svn/pristine/c0/c0beb600180de9f20130da81f95f29d0c5ec4c61.svn-base new file mode 100644 index 0000000..2b9b1a2 --- /dev/null +++ b/.svn/pristine/c0/c0beb600180de9f20130da81f95f29d0c5ec4c61.svn-base @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; +using QMAPP.BLL; +using QMAPP.Entity; +using QMAPP.FJC.BLL.Dict; +using QMAPP.FJC.DAL.ProduceManage; +using QMAPP.FJC.Entity.ProduceManage; +using QMFrameWork.Data; +using QMFrameWork.Log; +using QMAPP.FJC.Entity; +using QMAPP.MD.Entity.Bucket; +using QMAPP.FJC.DAL.Bucket; + +namespace QMAPP.FJC.BLL.Bucket +{ + /// + /// 模块名称:注塑料筒材料绑定 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class BucketMaterialBLL : BaseBLL + { + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public DataResult Get(BucketMaterial model) + { + DataResult result = new DataResult(); + try + { + result.Result = new BucketMaterialDAL().Get(model); + result.IsSuccess = true; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取异常"; + } + + return result; + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataResult GetList(BucketMaterial condition, DataPage page) + { + DataResult result = new DataResult(); + try + { + DataPage dataPage = new BucketMaterialDAL().GetList(condition, page); + + result.IsSuccess = true; + result.Result = dataPage; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "获取列表异常!"; + } + + return result; + } + + + /// + /// 获取列表 + /// + /// 条件 + /// 全部集合 + public DataPage GetAllList(BucketMaterial condition,DataPage page) + { + try + { + //获取信息列表 + DataPage list = new BucketMaterialDAL().GetList(condition, page); + return list; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "获取列表异常!" + }); + throw ex; + } + } + + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(BucketMaterial info) + { + DataResult result = new DataResult(); + try + { + //基本信息 + info.PID = Guid.NewGuid().ToString(); + info.CREATEUSER = this.LoginUser.UserID; + info.CREATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = info.CREATEUSER; + info.UPDATEDATE = info.CREATEDATE; + info.IsCheck = "0"; + BucketMaterialDAL cmdDAL = new BucketMaterialDAL(); + result.Result = cmdDAL.Insert(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public DataResult Update(BucketMaterial model) + { + DataResult result = new DataResult(); + result.IsSuccess = true; + try + { + BucketMaterial info = new BucketMaterialDAL().Get(model); + + //基本信息 + info.IsCheck = model.IsCheck; + info.BucketCode = model.BucketCode; + info.Line = model.Line; + info.RawMaterial = model.RawMaterial; + info.CREATEUSER = model.CREATEUSER; + info.CREATEDATE = model.CREATEDATE; + info.UPDATEDATE = DateTime.Now.ToString(); + info.UPDATEUSER = this.LoginUser.UserID; + int temp = new BucketMaterialDAL().Update(info); + + if (temp == 0) + { + result.IsSuccess = false; + result.Msg = "更新失败!"; + return result; + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "更新异常!" + }); + result.IsSuccess = false; + result.Ex = ex; + result.Msg = "更新异常"; + } + return result; + } + #endregion + + #region 删除 + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int Delete(string model) + { + int count = 0; + try + { + count = new BucketMaterialDAL().Delete(model); + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + } +} diff --git a/.svn/pristine/c3/c32018995ac998b2c9b967374ff7936c6338b76a.svn-base b/.svn/pristine/c3/c32018995ac998b2c9b967374ff7936c6338b76a.svn-base new file mode 100644 index 0000000..ebd624d --- /dev/null +++ b/.svn/pristine/c3/c32018995ac998b2c9b967374ff7936c6338b76a.svn-base @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using QMAPP.Common.Web.Controllers; +using QMFrameWork.WebUI.Attribute; +using QMAPP.FJC.Web.Models.Basic; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMAPP.Entity; +using QMAPP.MD.Entity; +using QMAPP.MD.Web.Models; +using QMFrameWork.WebUI.DataSource; +using QMFrameWork.Common.Serialization; +using QMAPP.FJC.Web.Models.Bucket; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.Web.Controllers +{ + public class BucketInfoController : QController + { + #region 获取信息 + /// + /// 加载列表 + /// + /// 结果 + [HandleException] + public ActionResult List(bool? callback) + { + BucketInfoModel seachModel = new BucketInfoModel(); + if (callback == true) + TryGetSelectBuffer(out seachModel); + seachModel.rownumbers = false; + seachModel.url = "/BucketInfo/GetList"; + return View("BucketInfoList", seachModel); + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 是否回调 + /// 列表 + [HandleException] + public ActionResult GetList(bool? callBack) + { + BucketInfoModel seachModel = null; + DataPage page = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + BucketInfo condition = null; + DataResult pageResult = new DataResult(); + try + { + //获取查询对象 + seachModel = GetModel(); + #region 获取缓存值 + if (callBack != null) + { + TryGetSelectBuffer(out seachModel); + } + else + { + //保存搜索条件 + SetSelectBuffer(seachModel); + } + #endregion + //获取前台分页设置信息 + page = this.GetDataPage(seachModel); + condition = CopyToModel(seachModel); + #region wcf服务统一接口 + + pageResult = wcfAgent.InvokeServiceFunction>("BucketInfoBLL_GetList", condition, page); + if (pageResult.IsSuccess == false) + { + SetMessage(pageResult.Msg); + return List(true); + } + DateGridResult result = new DateGridResult(); + result.Total = pageResult.Result.RecordCount; + result.Rows = JsonConvertHelper.GetDeserialize>(pageResult.Result.Result.ToString()); + #endregion + return Content(result.GetJsonSource()); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 编辑 + /// + /// 编辑载入 + /// + /// 处理结果 + [HandleException] + public ActionResult Edit() + { + BucketInfoModel model = new BucketInfoModel(); + string ID = Request.Params["PID"]; + BucketInfo Entity = new BucketInfo(); + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + if (string.IsNullOrEmpty(ID) == false) + { + //修改获取原数据 + Entity.PID = ID; + result = wcfAgent.InvokeServiceFunction>("BucketInfoBLL_Get", Entity); + if (result.IsSuccess == false) + { + SetMessage(result.Msg); + return View("BucketInfoEdit", model); + } + model = CopyToModel(result.Result); + } + return View("BucketInfoEdit", model); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 保存 + /// + /// + /// 处理结果 + [HttpPost] + [HandleException] + [ValidateInput(false)] + public ActionResult Save(BucketInfoModel saveModel) + { + BucketInfo Entity = null; + ServiceAgent wcfAgent = this.GetServiceAgent(); + DataResult result = new DataResult(); + try + { + Entity = CopyToModel(saveModel); + if (string.IsNullOrEmpty(Entity.PID) == true) + { + //新增 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketInfoBLL_Insert.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketInfoEdit", saveModel); + } + } + else + { + //修改 + result = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.DictService.BucketInfoBLL_Update.ToString(), Entity); + if (result.IsSuccess == false) + { + SetMessage("工厂编码已存在!"); + return View("BucketInfoEdit", saveModel); + } + } + return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 删除 + /// + /// 删除 + /// + /// 结果 + [HttpPost] + [HandleException] + public ActionResult Delete(BucketInfo model) + { + string selectKey = Request.Form["selectKey"]; + ServiceAgent wcfAgent = this.GetServiceAgent(); + + try + { + var result = wcfAgent.InvokeServiceFunction(QMAPP.ServicesAgent.DictService.BucketInfoBLL_Delete.ToString(), selectKey); + if (result == 0) + { + SetMessage("信息有关联,删除失败!"); + return List(true); + } + SetMessage(AppResource.DeleteMessage); + return List(true); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + } +} diff --git a/.svn/pristine/c5/c55ad83aa6d6f8aab542fc77c31e78de2bfcb447.svn-base b/.svn/pristine/c5/c55ad83aa6d6f8aab542fc77c31e78de2bfcb447.svn-base new file mode 100644 index 0000000..41afecf --- /dev/null +++ b/.svn/pristine/c5/c55ad83aa6d6f8aab542fc77c31e78de2bfcb447.svn-base @@ -0,0 +1,234 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {063B6316-7154-4BD9-B546-21CCE4685235} + Library + Properties + QMAPP.FJC.DAL + QMAPP.FJC.DAL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/c5/c5a098e3039292747d02ad13584dc54542be7b53.svn-base b/.svn/pristine/c5/c5a098e3039292747d02ad13584dc54542be7b53.svn-base new file mode 100644 index 0000000..f78bd68 Binary files /dev/null and b/.svn/pristine/c5/c5a098e3039292747d02ad13584dc54542be7b53.svn-base differ diff --git a/.svn/pristine/c6/c6215860cf3128f20cfa29e2ca1480cb013a1db5.svn-base b/.svn/pristine/c6/c6215860cf3128f20cfa29e2ca1480cb013a1db5.svn-base new file mode 100644 index 0000000..2720a41 --- /dev/null +++ b/.svn/pristine/c6/c6215860cf3128f20cfa29e2ca1480cb013a1db5.svn-base @@ -0,0 +1,375 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.FJC.Entity.MD; +using QMFrameWork.Data; +using System.Data; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; + +namespace QMAPP.FJC.DAL.Bucket +{ + /// + /// 模块名称:注塑投料记录 + /// 作 者:张松男 + /// 编写日期:2021年07月13日 + /// + public class RawMaterialDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterial Get(RawMaterial info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public RawMaterial Get(string materialcode) + { + try + { + string sql = "SELECT * FROM [T_MD_RawMaterial] WHERE [MATERIAL_CODE]=@materialcode"; + List parameters = new List(); + parameters.Add(new DataParameter("materialcode", materialcode)); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var info = session.Get(sql, parameters.ToArray()); + return info; + } + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(RawMaterial condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListRaw(RawMaterial condition) + { + string sql = null; + List parameters = new List(); + var List = new List(); + try + { + sql = $"select BucketCode,PartCode, MAX(CREATEDATE) AS CREATEDATE,BatchCode from T_MD_RawMaterial where BucketCode = '{condition.BucketCode}' and PartCode = '{condition.PartCode}' group by BucketCode,PartCode,BatchCode order by CREATEDATE desc"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + List = session.GetList(sql, parameters.ToArray()).ToList(); + } + return List; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public List GetListTo(RawMaterial condition) + { + string sql = null; + List parameters = new List(); + var List = new List(); + try + { + sql = this.GetQuerySql2(condition, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + List = session.GetList(sql, parameters.ToArray()).ToList(); + } + return List; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql2(RawMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append(" SELECT R.PID,R.BucketCode,R.PartCode,R.BatchCode,R.IsCheck,R.SerialCode,R.CREATEUSER,R.CREATEDATE,R.UPDATEUSER,R.UPDATEDATE "); + sqlBuilder.Append(" FROM (SELECT BucketCode, MAX(UPDATEDATE) AS UPDATEDATE FROM T_MD_RawMaterial GROUP BY BucketCode) AS up LEFT JOIN T_MD_RawMaterial AS R ON UP.UPDATEDATE = R.UPDATEDATE AND UP.BucketCode = R.BucketCode "); + whereBuilder.Append(" AND R.IsCheck <> '1' "); + if (string.IsNullOrEmpty(condition.MaterialCode) == false) + { + + whereBuilder.Append($" AND R.PartCode in (select RawMaterial from T_MD_BucketMaterialClass where MaterialCode = '{condition.MaterialCode}') "); + } + + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(RawMaterial condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,BucketCode,PartCode,BatchCode,IsCheck,SerialCode,CREATEUSER,CREATEDATE,UPDATEUSER,UPDATEDATE,ProductLine,MaterialType,MachineCode "); + sqlBuilder.Append("FROM T_MD_RawMaterial "); + whereBuilder.Append(" AND IsCheck<> '1' "); + if (string.IsNullOrEmpty(condition.BucketCode) == false) + { + whereBuilder.Append(" AND BucketCode = @BucketCode "); + parameters.Add(new DataParameter { ParameterName = "BucketCode", DataType = DbType.String, Value = condition.BucketCode }); + } + if (string.IsNullOrEmpty(condition.PartCode) == false) + { + whereBuilder.Append(" AND PartCode = @PartCode "); + parameters.Add(new DataParameter { ParameterName = "PartCode", DataType = DbType.String, Value = condition.PartCode }); + } + if (string.IsNullOrEmpty(condition.BatchCode) == false) + { + whereBuilder.Append(" AND BatchCode = @BatchCode "); + parameters.Add(new DataParameter { ParameterName = "BatchCode", DataType = DbType.String, Value = condition.BatchCode }); + } + if (!string.IsNullOrEmpty(condition.CreateDateStart)) + { + whereBuilder.Append(" AND CreateDate >= @CreateDateStart "); + parameters.Add(new DataParameter { ParameterName = "CreateDateStart", DataType = DbType.String, Value = condition.CreateDateStart }); + } + if (!string.IsNullOrEmpty(condition.CreateDateEnd)) + { + whereBuilder.Append(" AND CreateDate <= @CreateDateEnd "); + parameters.Add(new DataParameter { ParameterName = "CreateDateEnd", DataType = DbType.String, Value = condition.CreateDateEnd }); + } + + + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(RawMaterial info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_MD_RawMaterial"); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(RawMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + count = session.Insert(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(RawMaterial info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(string info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_MD_RawMaterial "); + sqlBuilder.Append("SET IsCheck = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + + + } +} diff --git a/.svn/pristine/c6/c66491d11c25779d59434af9b6bc4f1922c51f52.svn-base b/.svn/pristine/c6/c66491d11c25779d59434af9b6bc4f1922c51f52.svn-base new file mode 100644 index 0000000..a8418a2 Binary files /dev/null and b/.svn/pristine/c6/c66491d11c25779d59434af9b6bc4f1922c51f52.svn-base differ diff --git a/.svn/pristine/c6/c6a64ebcd4f5eee6644724be41f0cd7f09e74f65.svn-base b/.svn/pristine/c6/c6a64ebcd4f5eee6644724be41f0cd7f09e74f65.svn-base new file mode 100644 index 0000000..218d26e --- /dev/null +++ b/.svn/pristine/c6/c6a64ebcd4f5eee6644724be41f0cd7f09e74f65.svn-base @@ -0,0 +1,84 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage" %> + + + 完工数量统计 + + + + <%=Html.QPSeach(80,true) %> + + + + + + + + + + + +
+ <%=Html.QV(p => p.MATERIALNO) %> + + <%=Html.QC(p => p.MATERIALNO)%> + + <%=Html.QV(p => p.DOESEXPORT) %> + + <%=Html.QC(p => p.DOESEXPORT)%> + + <%=Html.QV(p => p.SENDTIME)%> + + <%=Html.QC(p => p.SENDTIME)%> + + <%=Html.QV(p => p.EENDTIME)%> + + <%=Html.QC(p => p.EENDTIME)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("fileName") %> +
+ + + + + + +
+ <%=Html.QTButtonSearch("CompleteStatistics", "CompleteStatisticsList", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButton("exportExcel", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "ExportExcel()", QMAPP.Common.Web.SystemLimit.isLimt)%> + +
+ +
diff --git a/.svn/pristine/c6/c6fe1664553fd2b9d73549676939230f9f759820.svn-base b/.svn/pristine/c6/c6fe1664553fd2b9d73549676939230f9f759820.svn-base new file mode 100644 index 0000000..99da81e --- /dev/null +++ b/.svn/pristine/c6/c6fe1664553fd2b9d73549676939230f9f759820.svn-base @@ -0,0 +1,4438 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace QMAPP.ServicesAgent +{ + /// + /// 示例服务方法枚举 + /// + [Description("示例服务方法枚举")] + public enum ExampleService + { + /// + /// 获取用户列表 + /// + [Description("获取用户列表")] + UserManageBLL_GetList + } + + /// + /// 系统服务方法枚举 + /// + [Description("系统服务方法枚举")] + public enum SystemService + { + /// + /// 服务初始化 + /// + [Description("服务初始化")] + ServiceInit, + + #region 通知管理 + + /// + /// 获取通知信息 + /// + [Description("获取通知信息")] + NoticeManageBll_Get, + /// + /// 根据通知ID,从通知浏览记录表中,获取发送目标 + /// + [Description("根据通知ID,从通知浏览记录表中,获取发送目标 ")] + NoticeManageBll_GetSendaimIdList, + /// + /// 获取用户 + /// + [Description("获取用户")] + NoticeManageBll_GetUser, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_DeleteNotice, + + /// + /// 删除原附件 + /// + [Description("删除原附件")] + NoticeManageBll_DeleteFile, + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + NoticeManageBll_ExistsFile, + /// + /// 删除通知信息 + /// + [Description("删除通知信息")] + NoticeManageBll_Save, + + /// + /// 获取未读通知 + /// + [Description("获取未读通知")] + NoticeManageBll_GetNotReadNotice, + /// + /// 获取未读即时通知 + /// + [Description("获取未读即时通知")] + NoticeManageBll_GetNotReadInstantNotice, + /// + /// 获取通知列表 + /// + [Description("获取通知列表")] + NoticeManageBll_GetList, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowse, + /// + /// 获取通知浏览记录 + /// + [Description("获取通知浏览记录")] + NoticeManageBll_GetBrowseModel, + /// + /// 更新通知浏览记录为已浏览 + /// + [Description("更新通知浏览记录为已浏览")] + NoticeManageBll_UpdateNoticeBrowse, + /// + /// 获取通知浏览记录列表 + /// + [Description("获取通知浏览记录列表")] + NoticeManageBll_GetBrowseList, + /// + /// 获取导出通知信息 + /// + [Description("获取导出通知信息")] + NoticeManageBll_GetExportData, + /// + /// 定时删除超过六个月的通知浏览记录 + /// + [Description("定时删除超过六个月的通知浏览记录")] + NoticeManageBll_DeleteNoticeBrowse, + /// + /// 获取联系人列表 + /// + [Description("获取联系人列表")] + NoticeManageBll_GetNoticeUserList, + /// + /// 获取组织结构树形集合 + /// + [Description("获取组织结构树形集合")] + NoticeManageBll_GetAllList, + #endregion + + #region 文件管理 + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileInfoBLL_Get, + + /// + /// 判断文件路径是否存在 + /// + [Description("判断文件路径是否存在")] + FileInfoBLL_ExistsFile, + + /// + /// 获取文件信息列表 + /// + [Description("获取文件信息列表")] + FileInfoBLL_GetList, + /// + /// 删除附件 + /// + [Description("删除附件")] + FileInfoBLL_DeleteFile, + /// + /// 删除文件信息 + /// + [Description("删除文件信息")] + FileInfoBLL_Delete, + /// + /// 获取导出文件信息 + /// + [Description("获取导出文件信息")] + FileInfoBLL_GetExportData, + + + /// + /// 插入文件信息 + /// + [Description("插入文件信息")] + FileInfoBLL_Insert, + /// + /// 更新文件信息 + /// + [Description("更新文件信息")] + FileInfoBLL_Update, + + #endregion + + #region 文件类型管理 + /// + /// 获取文件类型 + /// + [Description("获取文件类型")] + FileTypeBLL_Get, + /// + /// 获取文件信息 + /// + [Description("获取文件信息")] + FileTypeBLL_Delete, + /// + /// 获取文件类型树状列表 + /// + [Description("获取文件类型树状列表")] + FileTypeBLL_GetAllList, + + /// + /// 获取文件类型列表 + /// + [Description("获取文件类型列表")] + FileTypeBLL_GetList, + + /// + /// 插入文件类型 + /// + [Description("插入文件类型")] + FileTypeBLL_Insert, + + /// + /// 修改文件类型 + /// + [Description("修改文件类型")] + FileTypeBLL_Update, + + /// + /// 获取文件分类下拉列表 + /// + [Description("获取文件分类下拉列表")] + FileTypeBLL_GetCombox + #endregion + + } + + + #region 基础数据方法枚举 + + /// + /// 基础数据方法枚举 + /// + [Description("基础数据方法枚举")] + public enum DictService + { + #region 工厂信息 + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList, + + /// + /// 获取工厂信息列表 + /// + [Description("获取工厂信息列表")] + FactoryBLL_GetList1, + + /// + /// 获取工厂信息(字典) + /// + [Description("获取工厂字典")] + FactoryBLL_GetFactorys, + + /// + /// 获取工厂信息 + /// + [Description("获取工厂信息")] + FactoryBLL_Get, + + /// + /// 根据主键获取工厂信息 + /// + [Description("根据主键获取工厂信息")] + FactoryBLL_GetFactoryByPk, + + /// + /// 插入工厂信息 + /// + [Description("插入工厂信息")] + FactoryBLL_Insert, + + /// + /// 删除工厂信息 + /// + [Description("删除工厂信息")] + FactoryBLL_Delete, + /// + /// 更新工厂信息 + /// + [Description("工厂更新信息")] + FactoryBLL_Update, + + /// + /// 工厂信息导出 + /// + [Description("工厂信息导出")] + FactoryBLL_GetExportData, + + /// + /// 工厂信息导入 + /// + [Description("工厂信息导入")] + FactoryBLL_GetImportData, + + /// + /// 检验工厂编号是否重复 + /// + [Description("检验工厂编号")] + FactoryBLL_ExistsFactory, + /// + /// 根据工位查找工厂 + /// + [Description("根据工位查找工厂")] + DictManagerBLL_GetWerksList, + /// + /// 根据工厂查找工位 + /// + [Description("根据工厂查找工位")] + DictManagerBLL_GetWorkSationListFor, + #endregion + + #region 母车信息 + + + /// + /// 获取母车信息列表 + /// + [Description("获取母车信息列表")] + MotherCarTypeBLL_GetList, + + /// + /// 获取母车信息列表 + /// + [Description("获取母车字典")] + MotherCarTypeBLL_GetMotherCarTypes, + + /// + /// 获取母车信息 + /// + [Description("获取母车信息")] + MotherCarTypeBLL_Get, + + /// + /// 插入母车信息 + /// + [Description("插入母车信息")] + MotherCarTypeBLL_Insert, + + /// + /// 删除母车信息 + /// + [Description("删除母车信息")] + MotherCarTypeBLL_Delete, + /// + /// 更新母车信息 + /// + [Description("更新母车信息")] + MotherCarTypeBLL_Update, + + /// + /// 母车信息导出 + /// + [Description("母车信息导出")] + MotherCarTypeBLL_GetExportData, + + /// + /// 母车信息数据导入 + /// + [Description("母车信息数据导入")] + MotherCarTypeBLL_GetImportData, + + /// + /// 检验母车编号是否重复 + /// + [Description("检验母车编号")] + MotherCarTypeBLL_ExistsMotherCarType, + + #endregion + + #region 子车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子车信息列表")] + SonCarTypeBLL_GetList, + + /// + /// 获取子车信息 + /// + [Description("获取子车信息")] + SonCarTypeBLL_Get, + + /// + /// 获取子车信息 + /// + [Description("获取子车字典")] + SonCarTypeBLL_GetSonCarTypes, + + /// + /// 插入子车信息 + /// + [Description("插入子车信息")] + SonCarTypeBLL_Insert, + + /// + /// 删除子车信息 + /// + [Description("删除子车信息")] + SonCarTypeBLL_Delete, + /// + /// 更新子车信息 + /// + [Description("更新子车信息")] + SonCarTypeBLL_Update, + + /// + /// 子车信息导出 + /// + [Description("子车信息导出")] + SonCarTypeBLL_GetExportData, + + /// + /// 子车信息数据导入 + /// + [Description("子车信息数据导入")] + SonCarTypeBLL_GetImportData, + + /// + /// 检验子车编号是否重复 + /// + [Description("检验子车编号")] + SonCarTypeBLL_ExistsSonCarType, + #endregion + + #region 子母车信息 + + /// + /// 获取子车信息列表 + /// + [Description("获取子母车信息列表")] + MotherSonRelationManageBLL_GetList, + + /// + /// 获取子母车信息 + /// + [Description("获取子母车信息")] + MotherSonRelationManageBLL_Get, + + // + /// 子母车信息重复检验 + /// + [Description("子母车信息重复检验")] + MotherSonRelationManageBLL_ExistsMotherSonRelation, + + /// + /// 插入子母车信息 + /// + [Description("插入子母车信息")] + MotherSonRelationManageBLL_Insert, + + /// + /// 删除子母车信息 + /// + [Description("删除子母车信息")] + MotherSonRelationManageBLL_Delete, + /// + /// 更新子母车信息 + /// + [Description("更新子母车信息")] + MotherSonRelationManageBLL_Update, + + /// + /// 子母车信息导出 + /// + [Description("子母车信息导出")] + MotherSonRelationManageBLL_GetExportData, + + /// + /// 子母车信息数据导入 + /// + [Description("子母车信息数据导入")] + MotherSonRelationManageBLL_GetImportData, + + #endregion + + #region 退货原因信息 + + /// + /// 退货原因信息列表 + /// + [Description("获取退货原因信息列表")] + ReturnReasonManageBLL_GetList, + + /// + ///退货原因信息 + /// + [Description("获取退货原因信息")] + ReturnReasonManageBLL_Get, + + /// + /// 插入退货原因信息 + /// + [Description("插入退货原因信息")] + ReturnReasonManageBLL_Insert, + + /// + /// 退货编号重复校验 + /// + [Description("退货编号重复校验")] + ReturnReasonManageBLL_ExistsReturnReason, + + /// + /// 删除退货原因信息 + /// + [Description("删除退货原因信息")] + ReturnReasonManageBLL_Delete, + /// + /// 更新退货原因信息 + /// + [Description("更新退货原因信息")] + ReturnReasonManageBLL_Update, + + /// + /// 子退货原因信息导出 + /// + [Description("退货原因信息导出")] + ReturnReasonManageBLL_GetExportData, + + /// + /// 子退货原因信息数据导入 + /// + [Description("子退货原因信息数据导入")] + ReturnReasonManageBLL_GetImportData, + #endregion + + #region 要货地信息 + + /// + /// 要货地信息列表 + /// + [Description("获取要货地信息列表")] + PlacedisManageBLL_GetList, + + /// + ///要货地信息 + /// + [Description("获取要货地信息")] + PlacedisManageBLL_Get, + + /// + /// 插入要货地信息 + /// + [Description("插入要货地信息")] + PlacedisManageBLL_Insert, + + /// + /// 删除要货地信息 + /// + [Description("删除要货地信息")] + PlacedisManageBLL_Delete, + + /// + /// Sap同步要货地信息 + /// + [Description("Sap同步要货地信息")] + PlacedisManageBLL_SapSyn, + + /// + /// 更新要货地信息 + /// + [Description("更新要货地信息")] + PlacedisManageBLL_Update, + + /// + /// 要货地信息导出 + /// + [Description("要货地信息导出")] + PlacedisManageBLL_GetImportData, + + /// + /// 要货地信息导入 + /// + [Description("要货地信息导入")] + PlacedisManageBLL_GetExportData, + + /// + /// 获要货信息列表 + /// + [Description("获要货信息列表")] + DictManagerBLL_GetPlaceDisList, + + [Description("获要货信息列表根据权限")] + DictManagerBLL_GetReqPlaceList, + + /// + /// 转换包装台和仓库对应 + /// + [Description("转换包装台和仓库对应")] + DictManagerBLL_GetCpackPlaceList2, + #endregion + + #region 仓库信息 + + /// + /// 获取仓库信息列表 + /// + [Description("获取仓库信息列表")] + CorpManageBLL_GetList, + + [Description("获取仓库信息列表")] + DictManagerBLL_GetAllCorpList, + + [Description("根据用户获取仓库信息列表")] + DictManagerBLL_GetCorpList, + /// + /// 获取仓库信息 + /// + [Description("获取仓库信息")] + CorpManageBLL_Get, + /// + /// 获取仓库信息 + /// + [Description("获取仓库相关工厂信息")] + CorpManageBLL_GetCorpRelation, + /// + /// 插入仓库信息 + /// + [Description("插入仓库信息")] + CorpManageBLL_Insert, + + /// + /// 删除仓库信息 + /// + [Description("删除仓库信息")] + CorpManageBLL_Delete, + /// + /// 更新仓库信息 + /// + [Description("仓库更新信息")] + CorpManageBLL_Update, + + /// + /// 仓库信息导出 + /// + [Description("仓库信息导出")] + CorpManageBLL_GetExportData, + + /// + /// 仓库信息入 + /// + [Description("仓库信息导入")] + CorpManageBLL_GetImportData, + + [Description("仓库权限")] + CorpManageBLL_UserCorp, + #endregion + + #region 区域信息 + + /// + /// 获取区域信息列表 + /// + [Description("获取区域信息列表")] + StorageAreaManageBLL_GetList, + + /// + /// 获取区域信息 + /// + [Description("获取区域信息")] + StorageAreaManageBLL_Get, + + /// + /// 插入区域信息 + /// + [Description("插入区域信息")] + StorageAreaManageBLL_Insert, + + /// + /// 删除区域信息 + /// + [Description("删除区域信息")] + StorageAreaManageBLL_Delete, + /// + /// 更新区域信息 + /// + [Description("区域更新信息")] + StorageAreaManageBLL_Update, + + /// + /// 区域信息导出 + /// + [Description("区域信息导出")] + StorageAreaManageBLL_GetExportData, + + /// + /// 区域信息入 + /// + [Description("区域信息导入")] + StorageAreaManageBLL_GetImportData, + #endregion + + #region 框架协议 + + /// + /// 获取框架协议列表 + /// + [Description("获取框架协议列表")] + SourceListBLL_GetList, + + /// + /// 删除框架协议列表 + /// + [Description("删除框架协议列表")] + SourceListBLL_Delete, + + /// + /// 获取框架协议 + /// + [Description("获取框架协议")] + SourceListBLL_Get, + + /// + /// 更新框架协议 + /// + [Description("更新框架协议")] + SourceListBLL_Update, + + /// + /// 添加框架协议 + /// + [Description("添加框架协议")] + SourceListBLL_Insert, + + /// + /// 单条同步 + /// + [Description("单条同步")] + SourceListBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + SourceListBLL_AllSynData, + + #endregion + + #region BESI数据 + /// + /// 获取BESI数据列表 + /// + [Description("获取框架协议列表")] + BESIBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + BESIBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + BESIBLL_AllSynData, + #endregion + + #region 零件信息 + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageBLL_StopRecover, + #endregion + + #region 零件信息ForPAD + /// + /// 获取零件信息下拉列表 + /// + [Description("获取零件信息下拉列表")] + MaterialManageForPADBLL_GetCombox, + + /// + /// 获取零件信息列表 + /// + [Description("获取零件信息列表")] + MaterialManageForPADBLL_GetList, + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + MaterialManageForPADBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + MaterialManageForPADBLL_GetMaterialByPk, + + /// + /// 插入零件信息 + /// + [Description("插入零件信息")] + MaterialManageForPADBLL_Insert, + + /// + /// 删除零件信息 + /// + [Description("删除零件信息")] + MaterialManageForPADBLL_Delete, + /// + /// 零件更新信息 + /// + [Description("零件更新信息")] + MaterialManageForPADBLL_Update, + + /// + /// 零件信息导出 + /// + [Description("零件信息导出")] + MaterialManageForPADBLL_GetExportData, + + /// + /// 零件信息导入 + /// + [Description("零件信息导入")] + MaterialManageForPADBLL_GetImportData, + + /// + /// 零件信息停用恢复 + /// + [Description("零件信息停用恢复")] + MaterialManageForPADBLL_StopRecover, + #endregion + + #region 零件类别 + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表字典")] + MaterialSortManageBLL_GetMatSorts, + + /// + /// 获取零件类别(根据用户过滤) + /// + [Description("获取零件类别(根据用户过滤)")] + DictManagerBLL_GetMaterialSort, + + [Description("获取零件类别(根据工厂、仓库、工位、路线、零件号)")] + DictManagerBLL_GetMaterialSortFor, + + /// + /// 获取零件类别信息列表 + /// + [Description("获取零件类别列表")] + MaterialSortManageBLL_GetList, + + /// + /// 获取零件类别信息 + /// + [Description("获取零件类别信息")] + MaterialSortManageBLL_Get, + + /// + /// 获取零件类别s + /// + [Description("获取零件类别")] + DictManagerBLL_GetAllMaterialSort, + + /// + /// 插入零件类别信息 + /// + [Description("插入零件类别信息")] + MaterialSortManageBLL_Insert, + + /// + /// 删除零件类别信息 + /// + [Description("删除零件类别信息")] + MaterialSortManageBLL_Delete, + /// + /// 零件类别更新信息 + /// + [Description("零件类别更新信息")] + MaterialSortManageBLL_Update, + + /// + /// 零件类别信息导出 + /// + [Description("零件类别导出")] + MaterialSortManageBLL_GetExportData, + + /// + /// 零件类别信息导入 + /// + [Description("零件类别导入")] + MaterialSortManageBLL_GetImportData, + + #endregion + + #region 工位信息 + /// + /// 获取工位信息列表(数据源) + /// + [Description("获取工位信息列表(数据源)")] + WorkStationManageBLL_GetCombox, + /// + /// 获取工位信息列表 + /// + [Description("获取工位信息列表")] + WorkStationManageBLL_GetList, + + /// + /// 获取工位信息列表 + /// + [Description("工位同步")] + WorkStationManageBLL_SapSyn, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationBLL_Get, + + /// + /// 插入工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_Insert, + + /// + /// 插入PAD工位信息 + /// + [Description("插入工位信息")] + WorkStationManageBLL_PADInsert, + + /// + /// 删除零件信息 + /// + [Description("删除工位信息")] + WorkStationManageBLL_Delete, + /// + /// 工位更新信息 + /// + [Description("工位更新信息")] + WorkStationManageBLL_Update, + + /// + /// 工位信息导出 + /// + [Description("工位信息导出")] + WorkStationManageBLL_GetExportData, + + /// + /// 获取工位信息 + /// + [Description("获取工位信息")] + WorkStationManageBLL_Get, + + [Description("工位获取导入数据")] + WorkStationManageBLL_GetImportData, + + #endregion + + #region 路线信息 + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + LineManageBLL_GetList, + + /// + /// 获取路线信息列表 + /// + [Description("获取路线信息列表")] + DictManagerBLL_GetAllLineList, + + [Description("根据用户及仓库获取路线信息列表")] + DictManagerBLL_GetLineList, + /// + /// 获取路线信息 + /// + [Description("获取路线信息")] + LineManageBLL_Get, + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + LineManageBLL_GetLineByPk, + + /// + /// 插入路线信息 + /// + [Description("插入路线信息")] + LineManageBLL_Insert, + + /// + /// 删除路线信息 + /// + [Description("删除路线信息")] + LineManageBLL_Delete, + /// + /// 路线更新信息 + /// + [Description("路线更新信息")] + LineManageBLL_Update, + + /// + /// 路线信息导出 + /// + [Description("路线信息导出")] + LineManageBLL_GetExportData, + /// + /// 路线信息导入 + /// + [Description("路线信息导入")] + LineManageBLL_GetImportData, + #endregion + + #region 库位信息 + + /// + /// 获取库位信息列表 + /// + [Description("获取库位信息列表")] + StorageBinManageBLL_GetList, + + /// + /// 获取库位信息 + /// + [Description("获取库位信息")] + StorageBinBLL_Get, + + + /// + /// 根据主键获取对象 + /// + [Description("根据主键获取对象")] + StorageBinManageBLL_GetStorageBinByPk, + + + /// + /// 插入库位信息 + /// + [Description("插入库位信息")] + StorageBinManageBLL_Insert, + + /// + /// 删除库位信息 + /// + [Description("删除库位信息")] + StorageBinManageBLL_Delete, + /// + /// 库位更新信息 + /// + [Description("库位更新信息")] + StorageBinManageBLL_Update, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn, + + [Description("库位是否有库存")] + StorageBinManageBLL_BinNoCheckIn1, + /// + /// 库位信息导出 + /// + [Description("库位信息导出")] + StorageBinManageBLL_GetExportData, + + [Description("库位检查重复项")] + StorageBinManageBLL_CheckMaterialnoSingle, + + [Description("库位获取导入数据")] + StorageBinManageBLL_GetImportData, + + [Description("库位检查删除零件")] + StorageBinManageBLL_CheckdDeleteMaterial, + #endregion + + #region 零件高低储信息 + + /// + /// 获取零件高低储信息列表 + /// + [Description("获取零件高低储信息列表")] + MatLowerUpperManageBLL_GetList, + + /// + /// 获取零件高低储信息 + /// + [Description("获取零件高低储信息")] + MatLowerUpperBLL_Get, + + /// + /// 插入零件高低储信息 + /// + [Description("插入零件高低储信息")] + MatLowerUpperManageBLL_Insert, + + /// + /// 删除零件高低储信息 + /// + [Description("删除零件高低储信息")] + MatLowerUpperManageBLL_Delete, + /// + /// 零件高低储更新信息 + /// + [Description("零件高低储更新信息")] + MatLowerUpperManageBLL_Update, + + /// + /// 零件高低储信息导出 + /// + [Description("零件高低储信息导出")] + MatLowerUpperManageBLL_GetExportData, + + /// + /// 零件高低储信息导入 + /// + [Description("零件高低储信息导入")] + MatLowerUpperManageBLL_ImportData, + + #endregion + + #region 自制件器具信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + UtenSilManageBLL_GetCombox, + + /// + /// 获取自制件器具信息列表 + /// + [Description("获取自制件器具信息列表")] + UtenSilManageBLL_GetList, + + /// + /// 获取自制件器具信息 + /// + [Description("获取自制件器具信息")] + UtenSilManageBLL_Get, + + /// + /// 插入自制件器具信息 + /// + [Description("插入自制件器具信息")] + UtenSilManageBLL_Insert, + + /// + /// 删除自制件器具信息 + /// + [Description("删除自制件器具信息")] + UtenSilManageBLL_Delete, + /// + /// 自制件器具更新信息 + /// + [Description("自制件器具更新信息")] + UtenSilManageBLL_Update, + + /// + /// 自制件器具信息导出 + /// + [Description("自制件器具信息导出")] + UtenSilManageBLL_GetExportData, + + [Description("自制件器具信息导入")] + UtenSilManageBLL_GetImportData, + + #endregion + + #region 自制件零件相关信息 + + /// + /// 获取自制件零件相关信息列表 + /// + [Description("获取自制件零件相关信息列表")] + HMaterialManageBLL_GetList, + + /// + /// 获取自制件零件相关信息 + /// + [Description("获取自制件零件相关信息")] + HMaterialManageBLL_Get, + + /// + /// 插入自制件零件相关信息 + /// + [Description("插入自制件零件相关信息")] + HMaterialManageBLL_Insert, + + /// + /// 删除自制件零件相关信息 + /// + [Description("删除自制件零件相关信息")] + HMaterialManageBLL_Delete, + /// + /// 自制件零件相关更新信息 + /// + [Description("自制件零件相关更新信息")] + HMaterialManageBLL_Update, + + /// + /// 自制件零件相关信息导出 + /// + [Description("自制件零件相关信息导出")] + HMaterialManageBLL_GetExportData, + + /// + /// 自制件零件相关信息导入 + /// + [Description("自制件零件相关信息导入")] + HMaterialManageBLL_GetImportData, + #endregion + + #region 自制件发货地信息 + + /// + /// 获取自制件器具下拉列表 + /// + [Description("获取自制件器具下拉列表")] + HMatSendPlaceManageBLL_GetCombox, + + /// + /// 获取自制件发货地信息列表 + /// + [Description("获取自制件发货地信息列表")] + HMatSendPlaceManageBLL_GetList, + + /// + /// 获取自制件发货地信息 + /// + [Description("获取自制件发货地信息")] + HMatSendPlaceManageBLL_Get, + + /// + /// 插入自制件发货地信息 + /// + [Description("插入自制件发货地信息")] + HMatSendPlaceManageBLL_Insert, + + /// + /// 删除自制件发货地信息 + /// + [Description("删除自制件发货地信息")] + HMatSendPlaceManageBLL_Delete, + /// + /// 自制件发货地更新信息 + /// + [Description("自制件发货地更新信息")] + HMatSendPlaceManageBLL_Update, + + /// + /// 自制件发货地信息导出 + /// + [Description("自制件发货地信息导出")] + HMatSendPlaceManageBLL_GetExportData, + + /// + /// 自制件发货地信息导入 + /// + [Description("自制件发货地信息导入")] + HMatSendPlaceManageBLL_GetImportData, + + #endregion + + #region 转换包装台信息 + + /// + /// 获取转换包装台信息列表 + /// + [Description("获取转换包装台信息列表")] + CpackPlaceManageBLL_GetList, + + /// + /// 获取转换包装台信息 + /// + [Description("获取转换包装台信息")] + CpackPlaceManageBLL_Get, + + /// + /// 插入转换包装台信息 + /// + [Description("插入转换包装台信息")] + CpackPlaceManageBLL_Insert, + + /// + /// 删除转换包装台信息 + /// + [Description("删除转换包装台信息")] + CpackPlaceManageBLL_Delete, + /// + /// 转换包装台更新信息 + /// + [Description("转换包装台更新信息")] + CpackPlaceManageBLL_Update, + + /// + /// 转换包装台信息导出 + /// + [Description("转换包装台信息导出")] + CpackPlaceManageBLL_GetExportData, + + /// + /// 转换包装台信息导入 + /// + [Description("转换包装台信息导入")] + CpackPlaceManageBLL_ImportData, + + #endregion + + #region 转换包装关联关系信息 + + /// + /// 获取转换包装关联关系信息列表 + /// + [Description("获取转换包装关联关系信息列表")] + CpackageManageBLL_GetList, + + /// + /// 获取转换包装关联关系信息 + /// + [Description("获取转换包装关联关系信息")] + CpackBLL_Get, + + /// + /// 插入转换包装关联关系信息 + /// + [Description("插入转换包装关联关系信息")] + CpackageManageBLL_Insert, + + /// + /// 删除转换包装关联关系信息 + /// + [Description("删除转换包装关联关系信息")] + CpackageManageBLL_Delete, + /// + /// 转换包装关联关系更新信息 + /// + [Description("转换包装关联关系更新信息")] + CpackageManageBLL_Update, + + /// + /// 转换包装关联关系信息导出 + /// + [Description("转换包装关联关系信息导出")] + CpackageManageBLL_GetExportData, + + #endregion + + #region 转换包装台与零件关系信息 + + /// + /// 获取转换包装台与零件关系信息列表 + /// + [Description("获取转换包装台与零件关系信息列表")] + CpackPlaceMatManageBLL_GetList, + + /// + /// 获取转换包装台与零件关系信息 + /// + [Description("获取转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Get, + + /// + /// 插入转换包装台与零件关系信息 + /// + [Description("插入转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Insert, + + /// + /// 删除转换包装台与零件关系信息 + /// + [Description("删除转换包装台与零件关系信息")] + CpackPlaceMatManageBLL_Delete, + /// + /// 转换包装台与零件关系更新信息 + /// + [Description("转换包装台与零件关系更新信息")] + CpackPlaceMatManageBLL_Update, + + [Description("转换包装台获取仓库信息")] + CpackPlaceMatManageBLL_GetCpackPlace, + + /// + /// 转换包装台与零件关系信息导出 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_GetExportData, + /// + /// 转换包装台与零件关系信息导入 + /// + [Description("转换包装台与零件关系信息导出")] + CpackPlaceMatManageBLL_ImportData, + + [Description("转换包装台与零件关系信息同步SAP")] + CpackPlaceMatManageBLL_SapSyn, + MatLowerUpperManageBLL_Get, + WorkStationManageBLL_CheckSame, + StorageBinManageBLL_CheckSame, + StorageBinManageBLL_Get, + + + #endregion + + #region 货位类型信息 + + /// + /// 获取货位类型信息列表 + /// + [Description("获取货位类型信息列表")] + CargoTypeManageBLL_GetList, + + /// + /// 获取货位类型信息 + /// + [Description("获取货位类型信息")] + CargoTypeManageBLL_Get, + + /// + /// 插入货位类型信息 + /// + [Description("插入货位类型信息")] + CargoTypeManageBLL_Insert, + + /// + /// 删除货位类型信息 + /// + [Description("删除货位类型信息")] + CargoTypeManageBLL_Delete, + /// + /// 货位类型更新信息 + /// + [Description("货位类型更新信息")] + CargoTypeManageBLL_Update, + + [Description("货位类型导出")] + CargoTypeManageBLL_GetExportData, + + [Description("货位类型导入")] + CargoTypeManageBLL_ImportData, + #endregion + + #region 特殊配额 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + ZspqaBLL_GetList, + /// + /// 获取特殊配额信息 + /// + [Description("获取特殊配额信息")] + ZspqaBLL_Get, + /// + /// 插入 + /// + [Description("插入")] + ZspqaBLL_Insert, + /// + /// 更新 + /// + [Description("更新")] + ZspqaBLL_Update, + /// + /// 删除 + /// + [Description("删除")] + ZspqaBLL_Delete, + /// + /// 导入 + /// + [Description("导入")] + ZspqaBLL_ImportData, + /// + /// 导出 + /// + [Description("导出")] + ZspqaBLL_GetExportData, + /// + /// 获取配额表中零件号及信息 + /// + [Description("获取配额表中零件号及信息")] + ZspqaBLL_GetMaterListByQuota, + #endregion + + #region 配额管理 + /// + /// 获取特殊配额信息列表 + /// + [Description("获取特殊配额信息列表")] + QuoTaBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + QuoTaBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + QuoTaBLL_AllSynData, + + #endregion + + #region 工位零件货位类型 + [Description("工位零件货位类型删除")] + MatstorageBinstationBLL_Delete, + + [Description("工位零件货位类型获取数据列表")] + MatstorageBinstationBLL_GetList, + + [Description("工位零件货位类型更新")] + MatstorageBinstationBLL_Update, + + [Description("工位零件货位类型添加")] + MatstorageBinstationBLL_Insert, + + [Description("工位零件货位类型导入")] + MatstorageBinstationBLL_GetImportData, + + [Description("工位零件货位类型导出")] + MatstorageBinstationBLL_GetExportData, + + [Description("删除货位类型校验")] + MatstorageBinstationBLL_CheckDeleteCargo, + + [Description("工位零件货位类型获取单条数据")] + MatstorageBinstationBLL_Get, + MatstorageBinstationBLL_GetDetail, + StorageBinManageBLL_CheckdArea, + WorkStationManageBLL_CheckMWID, + StorageBinManageBLL_Lock, + [Description("库位SAP同步")] + StorageBinManageBLL_SapSyn, + #endregion + + #region R3器具 + [Description("获取R3器具信息列表")] + R3UtenSilManageBLL_GetList, + R3UtenSilManageBLL_Insert, + R3UtenSilManageBLL_Delete, + R3UtenSilManageBLL_GetExportData, + R3UtenSilManageBLL_ImportData, + R3UtenSilManageBLL_SapSyn, + #endregion + + #region 要货类型 + [Description("获取列表")] + RequestTypeBLL_GetList, + RequestTypeBLL_Get, + RequestTypeBLL_Insert, + RequestTypeBLL_Update, + RequestTypeBLL_Delete, + RequestTypeBLL_ImportData, + RequestTypeBLL_GetExportData, + + #endregion + + #region 承运商车辆信息 + + [Description("获取列表")] + SendSplrBLL_Get, + SendSplrBLL_Search, + SendSplrBLL_Insert, + SendSplrBLL_Delete, + SendSplrBLL_Update, + SendSplrBLL_Import, + SendSplrBLL_GetExportData, + + #endregion + + #region DictManageBLL + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplrList, + + [Description("获取车辆信息")] + DictManagerBLL_GetSendSplr, + + DictManagerBLL_GetTruckNo, + + + #endregion + + #region 工位器具 + + /// + /// 获取工位器具信息列表 + /// + [Description("获取工位器具信息列表")] + WorkStationMaterialBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + WorkStationMaterialBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + WorkStationMaterialBLL_AllSynData, + + #endregion + + #region 零件同步 + + /// + /// 获取零件同步信息列表 + /// + [Description("获取零件同步信息列表")] + MatnrBLL_GetList, + + /// + /// 单条同步 + /// + [Description("单条同步")] + MatnrBLL_SingleSynData, + + /// + /// 全部同步 + /// + [Description("全部同步")] + MatnrBLL_AllSynData, + #endregion + + #region CDK库存 + /// + /// 获取CDK库存信息列表 + /// + [Description("获取CDK库存信息列表")] + CKDStockBLL_GetList, + /// + /// 单条同步 + /// + [Description("单条同步")] + CKDStockBLL_SingleSynData, + /// + /// 全部同步 + /// + [Description("全部同步")] + CKDStockBLL_AllSynData, + #endregion + + CKDBatchPriorityBLL_Get, + + CKDBatchPriorityBLL_Insert, + + CKDBatchPriorityBLL_Update, + + CKDBatchPriorityBLL_Delete, + + CKDBatchPriorityBLL_GetList, + + CKDBatchPriorityBLL_GetExportData, + + CKDBatchPriorityBLL_GetImportData, + + CKDBatchPriorityBLL_Forward, + + CKDBatchPriorityBLL_Backone, + + DictManageBLL_GetMachineListByProcessType, + + + } + + #endregion + + /// + /// 支持交互方法枚举 + /// + [Description("支持交互方法枚举")] + public enum SupportMutualService + { + [Description("获取问题类型信息")] + SIProblemTypeBLL_Get, + + [Description("获取问题类型列表")] + SIProblemTypeBLL_GetList, + + [Description("判断类型名称是否已经存在")] + SIProblemTypeBLL_CheckProblemTypeNameExist, + + + [Description("插入问题类型信息")] + SIProblemTypeBLL_Insert, + + [Description("更新问题类型信息")] + SIProblemTypeBLL_Update, + + [Description("删除问题类型信息")] + SIProblemTypeBLL_Delete, + + [Description("获取问题类型导出信息")] + SIProblemTypeBLL_GetExportData, + + [Description("搜索问题解决方案")] + SupportInteractionBLL_GetList, + + [Description("获取问题类型下拉列表")] + SupportInteractionBLL_GetTypeList, + + [Description("问题解决方案导出")] + SupportInteractionBLL_GetExportData, + + [Description("获取问题列表")] + SupportInteractionBLL_GetProblemList, + + [Description("插入问题")] + SupportInteractionBLL_Insert, + + [Description("更新问题")] + SupportInteractionBLL_Update, + + [Description("获取编辑信息")] + SupportInteractionBLL_GetInfo, + + [Description("判断选中的问题是否已经关闭")] + SupportInteractionBLL_CheckProblemClosed, + + [Description("校验选中问题的处理部门是否为当前用户部门")] + SupportInteractionBLL_CheckProblemDept, + + [Description("校验选中问题的处理人是否为当前用户")] + SupportInteractionBLL_CheckProblemUser, + + [Description("获取处理记录列表")] + SupportInteractionBLL_GetSIDealList, + + [Description("获取流程设置")] + WorkFlowBLL_GetWorkFlow, + + [Description("保存流程用户")] + WorkFlowBLL_WorkFlowBLL_SaveSelectOrganization, + + [Description("获取用户的处理机构")] + SupportInteractionBLL_GetCurrentHandleOrga, + + [Description("保存处理方法")] + SupportInteractionBLL_UpdateSupportInteraction, + + [Description("解决问题")] + SupportInteractionBLL_SloveSupportInteraction, + + [Description("获取流程设置信息")] + SIParamSetBLL_Get, + + [Description("保存支持交互参数设置")] + SIParamSetBLL_SaveSIParamSet, + + [Description(" 更新支持交互参数设置")] + SIParamSetBLL_UpdateSIParamSet, + + [Description("判断是否存在未解决的问题")] + OverTimeRemindBLL_CheckCurrenUserOverTime1Remind, + + [Description("判断是否存在未解决的问题2")] + OverTimeRemindBLL_CheckCurrenUserOverTime2Remind, + + } + + + #region 发运模块 + /// + /// 发运模块 + /// + [Description("发运模块")] + public enum FrmPlaceManage + { + /// + /// 发运模块列表查询 + /// + [Description("发运模块列表查询")] + FrmPlaceBLL_GetList, + + /// + /// 贴车单记录查询 + /// + [Description("贴车单记录查询")] + FrmPlaceBLL_GetPastecardInfoWithVin, + + /// + /// 贴车单记录明细查询 + /// + [Description("贴车单记录明细查询")] + FrmPlaceBLL_GetPasteDetails, + + /// + /// 实现校准功能 + /// + [Description(" 实现校准功能")] + FrmPlaceBLL_UpdateFisOrder, + + /// + /// 获取贴车单当天的总条数 + /// + [Description(" 获取贴车单当天的总条数")] + FrmPlaceBLL_GetPastecardNo, + + + /// + /// 获取发车信息 + /// + [Description(" 获取发车信息")] + FrmPlaceBLL_GetPastecardIndex, + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddPasteCard, + + + /// + /// 更新贴车单信息 + /// + [Description(" 更新贴车单信息")] + FrmPlaceBLL_UpdatePastecardIndex, + + + + /// + /// 获取下护板扫描表其他条码号 + /// + [Description(" 获取下护板扫描表其他条码号")] + FrmPlaceBLL_GetOhterCode, + + /// + /// 获取配置表中的规则类型值 + /// + [Description(" 获取配置表中的规则类型值")] + FrmPlaceBLL_GetRule, + + /// + /// 根据条码标识查询零件信息 + /// + [Description(" 根据条码标识查询零件信息")] + FrmPlaceBLL_GetSparepartsinfo, + + + /// + /// 判断条码是否重复 + /// + [Description(" 判断条码是否重复")] + FrmPlaceBLL_ExistBarcode, + + + /// + /// 打印条码 + /// + [Description(" 打印条码")] + FrmPlaceBLL_WriteFile, + + + + /// + /// 更新贴车单补打印时间 + /// + [Description(" 更新贴车单补打印时间")] + FrmPlaceBLL_UpdataBarcodeDate, + + + /// + /// 插入LOG + /// + [Description(" 插入LOG")] + FrmPlaceBLL_InsertLog, + + + /// + /// 获取扫取条形码是否存在 + /// + [Description(" 获取扫取条形码是否存在")] + FrmPlaceBLL_GetExitsCode, + + + /// + /// 查询是否为成品 + /// + [Description(" 查询是否为成品")] + FrmPlaceBLL_GetExitsStatus, + + + + /// + /// 添加贴车单 + /// + [Description(" 添加贴车单")] + FrmPlaceBLL_AddNewPasteCard, + + + /// + /// 获取工作中心 + /// + [Description(" 获取工作中心")] + FrmPlaceBLL_GetWORKCENTERCODE, + + + /// + /// 获取 DASPASTECARDINDEX表数据 + /// + [Description(" 获取 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_GetDaspssteCarIndexByPlanName, + + + /// + /// 插入 DASPASTECARDINDEX表数据 + /// + [Description(" 插入 DASPASTECARDINDEX表数据")] + FrmPlaceBLL_InsertDaspssteCarIndexByPlanName, + + + /// + /// GetPastecardDeatis + /// + [Description(" GetPastecardDeatis")] + FrmPlaceBLL_GetPastecardDeatis, + + + + /// + /// 根据贴车单ID获取详细 + /// + [Description(" 根据贴车单ID获取详细")] + FrmPlaceBLL_GetPascardDetailsByPid, + + + /// + /// 修改补打时间 + /// + [Description(" 修改补打时间")] + FrmPlaceBLL_UpdatePasteCardPasteCardDate2Value, + + [Description("通过产品条码获取产品")] + FrmPlaceBLL_GetProductForSend, + + + [Description("通过总成条码获取产品")] + FrmPlaceBLL_GetProductByAssembleCode, + FrmPlaceBLL_GetTimeOutSet, + + } + #endregion 发运模块 + + #region 库存盘点 + /// + /// 库存盘点 + /// + [Description("库存盘点")] + public enum StocktakingManage + { + /// + /// 库存盘点查询汇总页面 + /// + [Description("库存盘点查询汇总页面")] + StocktakingBLL_GetList, + + /// + /// 添加盘点信息 + /// + [Description("添加盘点信息")] + StocktakingBLL_Insert, + + /// + /// 获取每日最新的计划单号 + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_GetPlanNoByDate, + + + + + + /// + /// 删除子表的数据根据PLANID + /// + [Description("添加盘点信息")] + StocktakingBLL_SubDelete, + + /// + /// 删除父表数据根据ID + /// + [Description("获取每日最新的计划单号")] + StocktakingBLL_Delete, + + /// + /// 添加盘点信息 + /// + [Description("插入详细信息(单表)")] + StocktakingBLL_SubInsert, + + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PID")] + StocktakingBLL_GetModel, + + + /// + /// 获取详细信息根据PID + /// + [Description("获取详细信息根据PLANID")] + StocktakingBLL_GetSubModel, + + + + /// + /// 获取子页面详细列表 + /// + [Description("获取子页面详细列表")] + StocktakingBLL_GetSubList, + + + /// + /// 修改盘点信息页面 + /// + [Description("修改盘点信息页面")] + StocktakingBLL_Update, + + + /// + /// 获取盘点详细信息页面 + /// + [Description("获取盘点详细信息页面")] + StocktakingBLL_GetPanDetail, + + /// + /// 导出 + /// + [Description("导出")] + StocktakingBLL_GetExportData, + + + /// + /// 盘点信息对比结果 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_GetPanResultDetail, + + + /// + /// 盘点对比处理 + /// + [Description("盘点信息对比结果")] + StocktakingBLL_detailCompareResult, + + + /// + /// 获取物料号 + /// + [Description("获取物料号")] + StocktakingBLL_GetMaterialList, + + /// + /// 删除 + /// + [Description("删除")] + StocktakingBLL_EditDelete, + + + + } + + #endregion 库存盘点 + + + #region 投料管理枚举 + /// + /// 投料管理枚举 + /// + [Description("投料管理枚举")] + public enum FeedInManage + { + #region 表皮查询 + /// + /// 表皮查询 + /// + [Description("表皮查询")] + EpidermisBLL_GetList, + + [Description("中控已完成")] + EpidermisBLL_UseComplete, + + /// + /// 表皮批次号修改 + /// + [Description("表皮批次号修改")] + EpidermisBLL_UpdateMaterial, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + EpidermisBLL_Get, + + /// + /// 表皮数据导出 + /// + [Description("表皮数据导出")] + EpidermisBLL_GetExportData, + + /// + /// 表皮投料信息获取 + /// + [Description("表皮投料信息获取")] + EpidermisBLL_GetProductInfectionList, + + #endregion + + #region 注塑投料记录 + + /// + /// 注塑投料记录查询 + /// + [Description("注塑投料记录查询")] + InjectionRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + InjectionRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + InjectionRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + InjectionRecorderBLL_Get, + /// + /// 注塑投料记录删除 + /// + [Description("注塑投料记录删除")] + InjectionRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + InjectionRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + InjectionRecorderBLL_GetProduceShiftList, + #endregion + + #region 搪塑投料记录 + + /// + /// 搪塑投料记录查询 + /// + [Description("搪塑投料记录查询")] + SlushRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + SlushRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + SlushRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + SlushRecorderBLL_Get, + /// + /// 搪塑投料记录删除 + /// + [Description("搪塑投料记录删除")] + SlushRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + SlushRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + SlushRecorderBLL_GetProduceShiftList, + #endregion + + #region 浇注投料记录 + + /// + /// 浇注投料记录查询 + /// + [Description("浇注投料记录查询")] + PouringRecorderBLL_GetRecordList, + + /// + /// 批次号修改 + /// + [Description("批次号修改")] + PouringRecorderBLL_Update, + + /// + /// 修改零件投料关联表批次号 + /// + [Description("修改零件投料关联表批次号")] + PouringRecorderBLL_UpdateProductInjection, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + PouringRecorderBLL_Get, + /// + /// 浇注投料记录删除 + /// + [Description("浇注投料记录删除")] + PouringRecorderBLL_Delete, + /// + /// 获取设备编号下拉列表 + /// + [Description("获取设备编号下拉列表")] + PouringRecorderBLL_GetMachineInfoList, + /// + /// 获取班次编号下拉列表 + /// + [Description("获取班次编号下拉列表")] + PouringRecorderBLL_GetProduceShiftList, + + [Description("获取浇注投料记录")] + MainBLL_GetProductInfectionList, + + [Description("修改零件投料关联表批次号")] + MainBLL_UpdateMaterial, + #endregion + } + #endregion + + #region 生产管理枚举 + /// + /// 生产管理枚举 + /// + [Description("生产管理枚举")] + public enum ProduceManage + { + #region 生产记录维护 + /// + /// 生产记录维护查询列表 + /// + [Description("生产记录维护查询列表")] + ProducePlanBLL_GetList, + + /// + /// 统计 + /// + [Description("统计")] + ProducePlanBLL_GetTotal, + + /// + /// 获取编辑信息 + /// + [Description("获取编辑信息")] + ProducePlanBLL_Get, + + /// + /// 生产记录新建 + /// + [Description("生产记录新建")] + ProducePlanBLL_Insert, + + /// + /// 生产记录修改 + /// + [Description("生产记录修改")] + ProducePlanBLL_Update, + + /// + /// 生产记录完成 + /// + [Description("生产记录完成")] + ProducePlanBLL_ProductOver, + + /// + /// 生产记录删除 + /// + [Description("生产记录删除")] + ProducePlanBLL_Delete, + #endregion + + #region 不合格品记录查询 + /// + /// 不合格品记录查询列表 + /// + [Description("不合格品记录查询列表")] + UnQualityBLL_GetList, + + /// + /// 不合格品记录数据导出 + /// + [Description("不合格品记录数据导出")] + UnQualityBLL_GetExportData, + #endregion + } + #endregion + + #region 产品追溯 + /// + /// 产品追溯 + /// + [Description("产品追溯")] + public enum ProductPetrospect + { + #region 产品档案 + /// + /// 产品档案查询 + /// + [Description("产品档案查询")] + ProductArchivesBLL_GetProductParameter, + /// + /// 产品档案导出 + /// + [Description("产品档案导出")] + ProductArchivesBLL_GetExportData, + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + ProductArchivesBLL_GetMainInfo, + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + ProductArchivesBLL_GetMainOperationInfo, + #endregion + } + #endregion + + #region 报警管理枚举 + /// + /// 报警管理枚举 + /// + [Description("报警管理枚举")] + public enum WarnManage + { + #region 设备报警记录查询 + /// + /// 设备报警记录查询列表 + /// + [Description("不合格品记录查询列表")] + EquipMentAlarmBLL_GetList, + + /// + /// 设备报警记录数据导出 + /// + [Description("不合格品记录数据导出")] + EquipMentAlarmBLL_GetExportData, + #endregion + + #region 自动报警维护 + + #region 报警信息维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInfoList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInfoGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInfoInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInfoUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInfoDelete, + #endregion + + #region 报警类别维护 + + /// + /// 报警信息Page列表 + /// + [Description("报警信息Page列表")] + WarnManageBLL_GetAllWarnTypeList, + + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnTypeList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnTypeGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnTypeInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnTypeUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnTypeDelete, + #endregion + + #region 报警统治人员维护 + /// + /// 报警信息列表 + /// + [Description("报警信息列表")] + WarnManageBLL_GetWarnInformerList, + + /// + /// 报警信息获取编辑信息 + /// + [Description("报警信息获取编辑信息")] + WarnManageBLL_WarnInformerGet, + + /// + /// 报警信息新建 + /// + [Description("报警信息新建")] + WarnManageBLL_WarnInformerInsert, + + /// + /// 报警信息修改 + /// + [Description("报警信息修改")] + WarnManageBLL_WarnInformerUpdate, + + /// + /// 报警信息删除 + /// + [Description("报警信息删除")] + WarnManageBLL_WarnInformerDelete, + #endregion + + /// + /// 报警信息关闭 + /// + [Description("报警信息关闭")] + WarnManageBLL_WarnIsDone, + + /// + /// 报警信息发送 + /// + [Description("报警信息发送")] + WarnManageBLL_WarnIsSend, + + /// + /// 报警信息发送页面加载 + /// + [Description("报警信息发送页面加载")] + WarnManageBLL_GetWarnInformerListForSend, + + /// + /// 报警信息详情列表加载 + /// + [Description("报警信息详情列表加载")] + WarnManageBLL_GetWarnDetailList, + #endregion + + #region 设备停机记录 + /// + /// 设备停机记录查询 + /// + [Description("设备停机记录查询")] + EquipMentMaintainSearchBLL_GetList, + /// + /// 设备停机记录导出 + /// + [Description("设备停机记录导出")] + EquipMentMaintainSearchBLL_GetExportData, + #endregion + } + #endregion + + #region 视频播放枚举 + /// + /// 视频播放枚举 + /// + [Description("视频播放枚举")] + public enum VideoInfoEnum + { + #region 视频播放记录查询 + /// + /// 视频播放记录查询列表 + /// + [Description("视频播放记录查询列表")] + VideoInfoBLL_GetDataPageList, + + #endregion + + } + #endregion + + #region 在制品监控枚举 + /// + /// 在制品监控枚举 + /// + [Description("在制品监控枚举")] + public enum WIPManage + { + #region 低储报警信息 + /// + /// 低储报警信息查询 + /// + [Description("低储报警信息查询")] + StorageAlarmBLL_GetList, + /// + /// 低储报警信息导出 + /// + [Description("低储报警信息导出")] + StorageAlarmBLL_GetExportData, + #endregion + + #region 滞留品查询 + /// + /// 滞留品信息查询 + /// + [Description("滞留品信息查询")] + DetentionBLL_GetList, + /// + /// 滞留品信息导出 + /// + [Description("滞留品信息导出")] + DetentionBLL_GetExportData, + #endregion + + #region 在制品库存 + /// + /// 在制品库存 + /// + [Description("在制品库存")] + WIPInventoryBLL_GetList, + /// + /// 在制品入库信息工序列表 + /// + [Description("在制品入库信息工序列表")] + WIPInventoryBLL_GetProcessSetList, + /// + /// 在制品入库信息零件列表 + /// + [Description("在制品入库信息零件列表")] + WIPInventoryBLL_GetProductSetList, + /// + /// 在制品入库信息 + /// + [Description("在制品入库信息")] + WIPInRecorderBLL_GetList, + /// + /// 在制品出库信息 + /// + [Description("在制品出库信息")] + WIPOutRecorderBLL_GetList, + /// + /// 在制品库存导出列表 + /// + [Description("在制品库存导出列表")] + WIPInventoryBLL_GetExportData, + /// + /// 在制品入库信息导出列表 + /// + [Description("在制品入库信息导出列表")] + WIPInRecorderBLL_GetExportData, + /// + /// 在制品出库信息导出列表 + /// + [Description("在制品出库信息导出列表")] + WIPOutRecorderBLL_GetExportData, + #endregion + } + #endregion + + #region 基础信息方法枚举 + + /// + /// 基础信息方法枚举 + /// + [Description("基础信息方法枚举")] + public enum B9BasicService + { + #region 物料号信息 + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetList, + /// + /// 物料号信息查询列表 + /// + [Description("物料号信息查询列表")] + MaterielBLL_GetAllList, + /// + /// 获取物料号信息 + /// + [Description("获取物料号信息")] + MaterielBLL_Get, + /// + /// 物料号信息插入 + /// + [Description("物料号信息插入")] + MaterielBLL_Insert, + /// + /// 物料号信息更新 + /// + [Description("物料号信息更新")] + MaterielBLL_Update, + /// + /// 物料号信息删除 + /// + [Description("物料号信息删除")] + MaterielBLL_Delete, + #endregion + + #region 设备信息 + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetMachineInfoList, + + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllList, + /// + /// 设备信息查询列表 + /// + [Description("设备信息查询列表")] + MachineInfoBLL_GetAllListAndModels, + + /// + /// 获取设备信息 + /// + [Description("获取设备信息")] + MachineInfoBLL_Get, + /// + /// 设备信息插入 + /// + [Description("设备信息插入")] + MachineInfoBLL_Insert, + /// + /// 设备信息更新 + /// + [Description("设备信息更新")] + MachineInfoBLL_Update, + /// + /// 设备信息删除 + /// + [Description("设备信息删除")] + MachineInfoBLL_Delete, + + #endregion + + #region 设备模具信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MachineInfoModelBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MachineInfoModelBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MachineInfoModelBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MachineInfoModelBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MachineInfoModelBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MachineInfoModelBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MachineInfoModelBLL_GetImportData, + + #endregion + + #region 班次信息 + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetProductShiftList, + + /// + /// 班次信息查询列表 + /// + [Description("班次信息查询列表")] + ProduceShiftBLL_GetAllList, + + /// + /// 获取班次信息 + /// + [Description("获取班次信息")] + ProduceShiftBLL_Get, + /// + /// 班次信息插入 + /// + [Description("班次信息插入")] + ProduceShiftBLL_Insert, + /// + /// 班次信息更新 + /// + [Description("班次信息更新")] + ProduceShiftBLL_Update, + /// + /// 班次信息删除 + /// + [Description("班次信息删除")] + ProduceShiftBLL_Delete, + /// + /// 校验班次时间在数据库中是否存在 + /// + [Description("校验班次时间在数据库中是否存在")] + ProduceShiftBLL_ExistsProduceShiftTime, + #endregion + + #region 零件条码标识 + + /// + /// 零件条码标识信息查询列表 + /// + [Description("零件条码标识信息查询列表")] + ProductCodeIdentityBLL_GetList, + /// + /// 获取零件条码标识信息 + /// + [Description("获取零件条码标识信息")] + ProductCodeIdentityBLL_Get, + /// + /// 零件条码标识信息插入 + /// + [Description("零件条码标识信息插入")] + ProductCodeIdentityBLL_Insert, + /// + /// 零件条码标识信息更新 + /// + [Description("零件条码标识信息更新")] + ProductCodeIdentityBLL_Update, + /// + /// 零件条码标识信息删除 + /// + [Description("零件条码标识信息删除")] + ProductCodeIdentityBLL_Delete, + + #endregion + + #region 操作员信息 + + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetList, + /// + /// 操作员信息查询列表 + /// + [Description("操作员信息查询列表")] + OperatorInfoBLL_GetAllList, + /// + /// 获取操作员信息 + /// + [Description("获取操作员信息")] + OperatorInfoBLL_Get, + /// + /// 操作员信息插入 + /// + [Description("操作员信息插入")] + OperatorInfoBLL_Insert, + /// + /// 操作员信息更新 + /// + [Description("操作员信息更新")] + OperatorInfoBLL_Update, + /// + /// 操作员信息删除 + /// + [Description("操作员信息删除")] + OperatorInfoBLL_Delete, + /// + /// daochu + /// + [Description("daochu")] + OperatorInfoBLL_GetExportData, + + /// + /// 获取所有人员 + /// + [Description("获取所有人员")] + OperatorInfoBLL_GetAllUserList, + #endregion + + #region 工序名称信息 + + /// + /// 工序名称信息查询列表 + /// + [Description("工序名称信息查询列表")] + ProcessInfoBLL_GetList, + /// + /// 获取工序名称信息 + /// + [Description("获取工序名称信息")] + ProcessInfoBLL_Get, + /// + /// 工序名称信息插入 + /// + [Description("工序名称信息插入")] + ProcessInfoBLL_Insert, + /// + /// 工序名称信息更新 + /// + [Description("工序名称信息更新")] + ProcessInfoBLL_Update, + /// + /// 工序名称信息删除 + /// + [Description("工序名称信息删除")] + ProcessInfoBLL_Delete, + + #endregion + + #region 工序设置信息 + + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetList, + /// + /// 工序设置信息查询列表 + /// + [Description("工序设置信息查询列表")] + ProcessSetBLL_GetAllList, + /// + /// 获取工序设置信息 + /// + [Description("获取工序设置信息")] + ProcessSetBLL_Get, + /// + /// 工序设置信息保存 + /// + [Description("工序设置信息保存")] + ProcessSetBLL_Save, + /// + /// 工序设置信息插入 + /// + [Description("工序设置信息插入")] + ProcessSetBLL_Insert, + /// + /// 工序设置信息更新 + /// + [Description("工序设置信息更新")] + ProcessSetBLL_Update, + /// + /// 工序设置信息删除 + /// + [Description("工序设置信息删除")] + ProcessSetBLL_Delete, + /// + /// 根据工序ID获取工序信息 + /// + [Description("根据工序ID获取工序信息")] + ProcessSetBLL_GetProcessInfo, + /// + /// 根据工序ID获取工序信息集合 + /// + [Description("根据工序ID获取工序信息集合")] + ProcessSetBLL_GetProcessInfoList, + /// + /// 根据零件类别获取应添加的工序顺序 + /// + [Description("根据零件类别获取应添加的工序顺序")] + ProcessSetBLL_GetProcessIndex, + + #endregion + + #region 工序先决条件 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetList, + + [Description("信息列表")] + ProcessRuleBLL_GetListForSet, + /// + /// 信息列表 + /// + [Description("信息列表")] + ProcessRuleBLL_GetAllList, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProcessRuleBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProcessRuleBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProcessRuleBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProcessRuleBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProcessRuleBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProcessRuleBLL_GetImportData, + + #endregion + + + #region 加工参数标准值设定信息 + + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetList, + /// + /// 加工参数标准值设定信息查询列表 + /// + [Description("加工参数标准值设定信息查询列表")] + ProcessParameterBLL_GetAllList, + /// + /// 获取加工参数标准值设定信息 + /// + [Description("获取加工参数标准值设定信息")] + ProcessParameterBLL_Get, + /// + /// 加工参数标准值设定信息插入 + /// + [Description("加工参数标准值设定信息插入")] + ProcessParameterBLL_Insert, + /// + /// 加工参数标准值设定信息更新 + /// + [Description("加工参数标准值设定信息更新")] + ProcessParameterBLL_Update, + /// + /// 加工参数标准值设定信息删除 + /// + [Description("加工参数标准值设定信息删除")] + ProcessParameterBLL_Delete, + /// + /// 获取设备编号下拉列表数据 + /// + [Description("获取设备编号下拉列表数据")] + ProcessParameterBLL_GetMachineInfoList, + /// 根据设备ID获取对应设备的工序类别 + /// + [Description("获取设备信息(获取设备对应的工序类别)")] + ProcessParameterBLL_GetMachineInfo, + + #endregion + + #region 投料配置规则信息 + + /// + /// 投料配置规则信息查询列表 + /// + [Description("投料配置规则信息查询列表")] + ProductMderuleBLL_GetList, + /// + /// 获取投料配置规则信息 + /// + [Description("获取投料配置规则信息")] + ProductMderuleBLL_Get, + /// + /// 投料配置规则信息插入 + /// + [Description("投料配置规则信息插入")] + ProductMderuleBLL_Insert, + /// + /// 投料配置规则信息更新 + /// + [Description("投料配置规则信息更新")] + ProductMderuleBLL_Update, + /// + /// 投料配置规则信息删除 + /// + [Description("投料配置规则信息删除")] + ProductMderuleBLL_Delete, + + #endregion + + #region 物料架类型信息 + + /// + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetList, + /// 物料架类型信息查询列表 + /// + [Description("物料架类型信息查询列表")] + MaterialShelfTypeBLL_GetAllList, + /// + /// 获取物料架类型信息 + /// + [Description("获取物料架类型信息")] + MaterialShelfTypeBLL_Get, + /// + /// 物料架类型信息插入 + /// + [Description("物料架类型信息插入")] + MaterialShelfTypeBLL_Insert, + /// + /// 物料架类型信息更新 + /// + [Description("物料架类型信息更新")] + MaterialShelfTypeBLL_Update, + /// + /// 物料架类型信息删除 + /// + [Description("物料架类型信息删除")] + MaterialShelfTypeBLL_Delete, + + #endregion + + #region 投料搪塑注塑投料 + + /// + /// 投料信息查询列表 + /// + [Description("投料信息查询列表")] + InjectionRecorderBLL_GetList, + /// + /// 获取投料信息 + /// + [Description("获取投料信息")] + InjectionRecorderBLL_Get, + /// + /// 投料信息插入 + /// + [Description("投料信息插入")] + InjectionRecorderBLL_Insert, + /// + /// 投料信息更新 + /// + [Description("投料信息更新")] + InjectionRecorderBLL_Update, + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_Delete, + + /// + /// 投料信息删除 + /// + [Description("投料信息删除")] + InjectionRecorderBLL_DeleteSingle, + #endregion + + #region 加工参数配置信息 + + /// + /// 获取加工参数配置信息 + /// + [Description("获取加工参数配置信息")] + ParameterConfigBLL_GetList, + + #endregion + + #region 零件类别 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBasicBLL_GetList, + + [Description("信息列表")] + ProductBasicBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBasicBLL_GetByCode, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBasicBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBasicBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBasicBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBasicBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBasicBLL_GetImportData, + + #endregion + + #region 零件条码 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductBLL_GetAllList, + + + /// + /// 信息和属性列表 + /// + [Description("信息和属性列表")] + ProductBLL_GetListAndAttribute, + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductBLL_GetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_Insert, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertInjection, + + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertForBundle, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductBLL_InsertEpidermis, + [Description("插入信息")] + ProductBLL_InsertListEpidermis, + + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductBLL_Update, + + /// + /// 更新信息状态 + /// + [Description("更新信息状态")] + ProductBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_Delete, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_ScarpProduct, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductBLL_DeleteSingle, + + /// + /// 判断名称是否存在 + /// + [Description("判断名称是否存在")] + ProductBLL_ExistsProduct, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductBLL_GetImportData, + + /// + /// 更新零件状态信息(工控机) + /// + [Description("更新零件状态信息(工控机)")] + ProductBLL_MendUpdate, + + /// + /// 获取零件信息(工控机) + /// + [Description("获取零件信息(工控机)")] + ProductBLL_GetProductInfo, + + [Description("更新产品信息")] + ProductBLL_ModifyProductCode, + /// + /// 获取原始产品信息 + /// + ProductBLL_GetOrginProduct, + #endregion + + #region 零件属性 + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetList, + /// + /// 零件属性信息查询列表 + /// + [Description("零件属性信息查询列表")] + ProductAttributeBLL_GetAllList, + /// + /// 获取零件属性信息 + /// + [Description("获取零件属性信息")] + ProductAttributeBLL_Get, + /// + /// 零件属性信息插入 + /// + [Description("零件属性信息插入")] + ProductAttributeBLL_Insert, + /// + /// 零件属性信息更新 + /// + [Description("零件属性信息更新")] + ProductAttributeBLL_Update, + /// + /// 零件属性信息删除 + /// + [Description("零件属性信息删除")] + ProductAttributeBLL_Delete, + #endregion + + #region 设备停机维护 + + /// + /// 信息列表 + /// + [Description("信息列表")] + EquipmentMaintainBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + EquipmentMaintainBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + EquipmentMaintainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + EquipmentMaintainBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + EquipmentMaintainBLL_Delete, + + /// + /// 删除信息并更新设备表 + /// + [Description("删除信息并更新设备表")] + EquipmentMaintainBLL_DeleteEquipmentMaintainAndUpdateMachine, + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + EquipmentMaintainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + EquipmentMaintainBLL_GetImportData, + + #endregion + + + #region 投料与零件关联 + + /// + /// 信息列表 + /// + [Description("信息列表")] + ProductInjectionBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + ProductInjectionBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + ProductInjectionBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + ProductInjectionBLL_Update, + + /// + /// 判断投料信息是否存在 + /// + [Description("判断投料信息是否存在")] + ProductInjectionBLL_ExistsInjection, + + /// + /// 删除信息 + /// + [Description("删除信息")] + ProductInjectionBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + ProductInjectionBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + ProductInjectionBLL_GetImportData, + + #endregion + + #region 产品批次追溯 + + /// + /// 获取列表(产品批次追溯) + /// + [Description("获取列表(产品批次追溯)")] + ProductInjectionBLL_GetProductInjectionList, + + /// + /// 导出信息列表(产品批次追溯) + /// + [Description("导出信息列表(产品批次追溯)")] + ProductInjectionBLL_GetExportDataForPI, + #endregion + + #region 产品加工追溯 + + /// + /// 设备加工操作 + /// + [Description("设备加工操作")] + MainOperationBLL_MachineOperation, + + /// + /// 获取列表(产品加工追溯) + /// + [Description("获取列表(产品加工追溯)")] + MainOperationBLL_GetMainOperationReviewList, + + /// + /// 导出信息列表(产品加工追溯) + /// + [Description("导出信息列表(产品加工追溯)")] + MainOperationBLL_GetExportDataForMOR, + #endregion + + #region 加工记录信息 + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetListWithParameter, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetAllList, + + /// + /// 获取加工记录信息 + /// + [Description("获取加工记录信息")] + MainOperationBLL_GetList, + + /// + /// 工控机获取加工记录信息 + /// + [Description("工控机获取加工记录信息")] + MainOperationBLL_GetOperationList, + + /// + /// 工控机获取加工记录信息Q5新增 + /// + [Description("工控机获取加工记录信息Q5新增")] + MainOperationBLL_GetOperationListNew, + + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_Operation, + + /// + /// 获取打印条码 + /// + [Description("获取打印条码")] + MainOperationBLL_GetPrintCode, + + /// + /// 加工 + /// + [Description("加工并发送指令")] + MainOperationBLL_OperationForReturn, + + /// + /// 获取指令 + /// + [Description("获取指令")] + MainOperationBLL_GetSendOrder, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPassProcess, + + /// + /// 产品返修 + /// + [Description("产品返修")] + MainOperationBLL_MendProudct, + + /// + /// 放行 + /// + [Description("放行")] + MainOperationBLL_SetPunchingPassProcess, + + /// + /// 撤销 + /// + [Description("撤销")] + MainOperationBLL_SetRecovery, + /// + /// 加工 + /// + [Description("加工")] + MainOperationBLL_SaveAndSendOrder, + + + /// + /// 获取加工记录信息统计 + /// + [Description("获取加工记录信息统计")] + MainOperationBLL_GetListForstatistic, + + /// + /// 获取加工记录信息(web) + /// + [Description("获取加工记录信息(web)")] + MainOperationBLL_GetListWithParameterForWeb, + + + + + + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetListWithParameterForWebTitle, + + /// + /// 获取加工记录列头(web) + /// + [Description("获取加工记录列头(web)")] + MainOperationBLL_GetParameterForWebTitle, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupBy, + + /// + /// 统计(web) + /// + [Description("统计(web)")] + MainOperationBLL_GetListGroupByStauts, + + MainOperationBLL_GetListForstatisticWithColor, + + + #endregion + + #region 文件复制 + /// + /// 文件复制 + /// + [Description("文件复制")] + FileCopyRecordBLL_GetBarcode, + + + + #endregion + + #region 模具模腔 + + [Description("获取模具号配置")] + MoldConfigBLL_GetList, + + [Description("获取模具号配置")] + MoldConfigBLL_Get, + + [Description("获取模具号和模架号最大值")] + MoldConfigBLL_GetMaxMold, + + [Description("删除模具号配置")] + MoldConfigBLL_DeleteSingle, + + [Description("修改模具号配置")] + MoldConfigBLL_Update, + + [Description("新增模具号配置")] + MoldConfigBLL_Insert, + + [Description("新增模具号配置")] + MoldConfigBLL_UpdateNextUsed, + + [Description("删除模具号配置")] + MoldConfigBLL_Delete, + + [Description("获取模腔号配置")] + MoldSetBLL_GetList, + + [Description("更新模腔号配置")] + MoldSetBLL_SaveMoldSet, + + [Description("获取浇注配置")] + CastCounterBLL_Get, + + [Description("更新浇注配置")] + CastCounterBLL_Update, + + + MaterialCodeBLL_GetMaterialCode, + ProductBasicBLL_GetProductBasicList, + FactoryBLL_GetFactoryList, + ProductInfoBLL_GetImportData, + ProductInfoBLL_GetExportData, + ProductInfoBLL_Delete, + ProductInfoBLL_Update, + ProductInfoBLL_Insert, + ProductInfoBLL_Get, + ProductInfoBLL_GetList, + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + /// + /// 获取当前工作班次 + /// + ProduceShiftBLL_GetWorkingShift, + ProductBLL_GetProductByPart, + ProductBLL_CreateAssy, + + + #endregion + + } + #endregion + + /// + /// 工控机方法枚举 + /// + [Description("工控机方法枚举")] + public enum B9IPCService + { + #region 配置 + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + LocSwitchHelperBLL_GetPBomItemCodes, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + MaterialBomConfigBLL_GetAutoInputBarCode, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetList, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDConfigBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDConfigBLL_Insert, + + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAllList, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDConfigBLL_GetAppConfigValue, + /// + /// 获取物料号 + /// + [Description("获取物料号")] + BZDConfigBLL_GetMaterialCode, + /// + /// 配置细查询列表 + /// + [Description("BZD条码配置")] + BZDRecorderBLL_Get, + /// + /// BZD条码配置插入 + /// + [Description("BZD条码配置插入")] + BZDRecorderBLL_Insert, + /// + /// BZD条码配置插入 + /// + [Description("创建BZD条码并记录")] + BZDRecorderBLL_CreateBZDCode, + /// + /// 查询BZD记录 + /// + [Description("查询BZD记录")] + BZDRecorderBLL_GetRecord, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_Update, + /// + /// BZD条码配置更新 + /// + [Description("BZD条码配置更新")] + BZDRecorderBLL_getMaxSeq, + /// + /// 配置细查询列表 + /// + [Description("配置细查询列表")] + PROCESSPARAMETERBLL_GetAllList, + /// + /// 获取配置细信息 + /// + [Description("配置细信息")] + PROCESSPARAMETERBLL_Get, + /// + /// 配置细信息插入 + /// + [Description("配置细信息插入")] + PROCESSPARAMETERBLL_Insert, + /// + /// 配置细信息更新 + /// + [Description("配置细信息更新")] + PROCESSPARAMETERBLL_Update, + /// + /// 配置细信息删除 + /// + [Description("配置细信息删除")] + PROCESSPARAMETERBLL_Delete, + /// + /// 报废走势图 + /// + [Description("报废走势图")] + PROCESSPARAMETERBLL_GetMainList, + #endregion + + #region 查询配置 + + /// + /// 查询配置 + /// + [Description("查询配置信息")] + AppConfigBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + PbomItemBLL_Get, + + /// + /// 查询配置信息 + /// + [Description("查询配置信息")] + ScanIPConfigBLL_Get, + + /// + /// 修改配置信息 + /// + [Description("修改配置信息")] + ScanIPConfigBLL_Update, + + #endregion + + #region SPC监控 + + /// + /// 获得监控信息 + /// + [Description("获得监控信息")] + SPCControlBLL_GetData, + + #endregion + + #region 贴车单 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + SendPlanInfoBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + SendPlanInfoBLL_Insert, + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_InsertAndUpdateMain, + + + /// + /// 插入信息并更新本体表 + /// + [Description("插入信息并更新本体表")] + SendPlanInfoBLL_UpdateMain, + + /// + /// 更新信息 + /// + [Description("更新信息")] + SendPlanInfoBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + SendPlanInfoBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + SendPlanInfoBLL_GetImportData, + + /// + /// 贴车单查询 + /// + [Description("贴车单查询")] + SendPlanRecordBLL_GetList, + /// + /// 贴车单查询 + /// + [Description("贴车单详细查询")] + SendPlanRecordBLL_GetItem, + + /// + /// 贴车单查询导出列表 + /// + [Description("贴车单查询导出列表")] + SendPlanRecordBLL_GetExportData, + + #endregion + + #region 发车统计分析 + + /// + /// 信息列表 + /// + [Description("信息列表")] + SendPlanInfoBLL_GetSendStatisticsList, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + SendPlanInfoBLL_GetSendStatisticsExportData, + + #endregion + + #region 加工本体 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainBLL_GetAllList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_Get, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetByCondition, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainBLL_GetMaterialSetByCondition, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_Update, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainBLL_UpdateStatus, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainBLL_GetImportData, + /// + /// 创建本体信息 + /// + MainBLL_CreateMain, + + #endregion + + #region 主体与零件关系 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetAllList, + + + /// + /// 信息列表 + /// + [Description("信息列表")] + MainProductBLL_GetListWithProduct, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MainProductBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MainProductBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MainProductBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MainProductBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MainProductBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MainProductBLL_GetImportData, + + #endregion + + #region 返修记录 + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetList, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetExportDatas, + + /// + /// 信息列表 + /// + [Description("信息列表")] + MendRecorderBLL_GetLists, + + MendRecorderBLL_GetMenderReasonList, + + /// + /// 获取信息 + /// + [Description("获取信息")] + MendRecorderBLL_Get, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_Insert, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_Update, + + /// + /// 删除信息 + /// + [Description("删除信息")] + MendRecorderBLL_Delete, + + /// + /// 导出信息列表 + /// + [Description("导出信息列表")] + MendRecorderBLL_GetExportData, + + /// + /// 导入信息列表 + /// + [Description("导入信息列表")] + MendRecorderBLL_GetImportData, + + + /// + /// 获取返修信息(工控机) + /// + [Description("获取返修信息")] + MendRecorderBLL_GetMendRecorderInfo, + + /// + /// 返修登记(工控机) + /// + [Description("返修登记")] + MendRecorderBLL_RegisterMendRecorder, + + /// + /// 返修完成(工控机) + /// + [Description("返修完成")] + MendRecorderBLL_MendRecorderFinish, + + /// + /// 插入信息 + /// + [Description("插入信息")] + MendRecorderBLL_InsertMendRecorder, + + /// + /// 更新信息 + /// + [Description("更新信息")] + MendRecorderBLL_UpdateMendRecorder, + + MendRecorderBLL_CheckProductCode, + + MendRecorderBLL_InsertMendRecordItem, + + /// + /// 获取返修统计信息 + /// + [Description("获取返修统计信息")] + MendRecorderBLL_GetMendRecorderStatistics, + + /// + /// 导出返修统计信息 + /// + [Description("导出返修统计信息")] + MendRecorderBLL_ExportMendRecorderStatistics, + + + #endregion + + #region FIS M100生产信息 + + /// + /// 信息列表 + /// + [Description("信息列表")] + FISInfoBLL_GetList, + + #endregion + + #region 出库 + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + OutWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + OutWarehouseBLL_GetMainInfo, + + /// + /// 出库操作(本体) + /// + [Description("出库操作(本体)")] + OutWarehouseBLL_MainOutWarehouse, + + /// + /// 出库操作(零件) + /// + [Description("出库操作(零件)")] + OutWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 入库 + + /// + /// 获取零件信息 + /// + [Description("获取零件信息")] + InWarehouseBLL_GetProductInfo, + + /// + /// 获取本体信息 + /// + [Description("获取本体信息")] + InWarehouseBLL_GetMainInfo, + + /// + /// 入库操作(本体) + /// + [Description("出库操作(本体)")] + InWarehouseBLL_MainOutWarehouse, + + /// + /// 入库操作(零件) + /// + [Description("出库操作(零件)")] + InWarehouseBLL_ProductOutWarehouse, + #endregion + + #region 获取产品信息 + + ProductBLL_GetByCondition, + /// + /// 获取信息PID PRODUCTCODE + /// public Product Get(Product model) + /// + ProductBLL_Get, + + /// + /// 插入产品信息 + /// + ProductBLL_Insert, + + #endregion + + #region 查验 + + InjectionCheckBLL_Insert, + + InjectionCheckBLL_GetList, + + InjectionCheckBLL_Delete, + + #endregion + + #region 缺陷类型 + + DefectTypeBLL_GetDefectType, + MendRecorderBLL_GetListForstatistic, + + #endregion + + #region 获取打印模板路径 + + PrintModelCopyBLL_GetPrintModelCopyList, + + #endregion + + #region 获取采集点信息 + + DAIBLL_GetList, + DAIBLL_GetSignalDAI, + DAICacheBLL_GetWorklocCache, + /// + /// 采集点输入 + /// + DAI_Input, + /// + /// 工位放行 + /// + DAI_LetPass, + /// + /// 撤销回滚 + /// + DAI_Rollback, + DAI_RollbackWithOrder, + DAI_Reset, + + + + #endregion + + #region 新增基础数据 + BarcodeRulesBLL_GetAllList, + #endregion + + #region 生产计划 + + WorkOrderBLL_GetOrderInCell, + WorkOrderBLL_GetOrderCountInCell, + /// + /// 获取加工记录数 + /// + ProcessRecordBLL_GetCount, + WorkOrderBLL_Get, + WorkOrderBLL_GetPlanLabel, + WorkOrderBLL_SuspendOrder, + WorkOrderBLL_CancelSuspend, + WorkOrderBLL_DeleteOrder, + WorkOrderBLL_TakeBack, + WorkOrderBLL_ResetOrder, + WorkOrderBLL_GetPlanLabelBindProdut, + WorkOrderBLL_GetDayPlanCount, + /// + /// 插入产品信息 + /// + ProcessRecordBLL_Insert, + + /// + /// 抽检 + /// + ProductCheckBLL_GetList, + ProductCheckBLL_Delete, + + /// + /// + /// + MainCodeChangeBLL_GetList, + MainCodeChangeBLL_Insert, + MainCodeChangeBLL_Generate, + + + + + + #endregion + + } +} diff --git a/.svn/pristine/c7/c7250da10171eb5d83f38ebd93a48ea5f87eeba0.svn-base b/.svn/pristine/c7/c7250da10171eb5d83f38ebd93a48ea5f87eeba0.svn-base new file mode 100644 index 0000000..b2665b2 --- /dev/null +++ b/.svn/pristine/c7/c7250da10171eb5d83f38ebd93a48ea5f87eeba0.svn-base @@ -0,0 +1,71 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + +
+ <%=Html.QV(p => p.Name)%> + + <%=Html.QC(p => p.Name)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("ID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("AppConfig", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("AppConfig", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/c7/c759860ea11d1937c7c7daa9d8c37dbf6663ea8c.svn-base b/.svn/pristine/c7/c759860ea11d1937c7c7daa9d8c37dbf6663ea8c.svn-base new file mode 100644 index 0000000..8f95cd6 --- /dev/null +++ b/.svn/pristine/c7/c759860ea11d1937c7c7daa9d8c37dbf6663ea8c.svn-base @@ -0,0 +1,133 @@ +using System; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Text; +using System.Windows.Forms; +using System.Xml; + +namespace QMAPP.WinForm +{ + public class AutoUpdater + { + private string _serverUrl; + private string _softwareName; + private string _newVersion; + private string _filePath; + private string _fileName; + private string _lastUpdateTime; + private string _desc; + + //"http://127.0.0.1/", "PcUpdate.xml" + public bool CheckUpdateLoad(string serverUrl, string updateXmlFileName) + { + bool result = false; + _serverUrl = serverUrl; + try + { + if (CheckUpdate(serverUrl,updateXmlFileName)) + { + var sb = new StringBuilder(); + sb.AppendLine("当前版本:" + Assembly.LoadFrom(_softwareName).GetName().Version); + sb.AppendLine("检查到新版本:" + _newVersion); + sb.AppendLine("更新时间:" + _lastUpdateTime); + sb.AppendLine("更新说明:" + _desc); + sb.AppendLine(); + sb.AppendLine("是否更新?"); + // var dr = MessageBox.Show(sb.ToString(), @"发现新版本:"+_newVersion, MessageBoxButtons.YesNo, MessageBoxIcon.Question); + // if (dr == DialogResult.Yes) + var form = new FormFoundUpdate(sb.ToString()); + + if(form.ShowDialog()==DialogResult.OK) + { + //string path = Application.StartupPath.Replace("program", ""); + var path = Application.StartupPath; + var args = new StringBuilder(); + args.Append($"\'{_serverUrl}\',"); + args.Append($"\'{_softwareName}\',"); + args.Append($"\'{_newVersion}\',"); + args.Append($"\'{_filePath}\',"); + args.Append($"\'{_fileName}\',"); + args.Append($"\'{_lastUpdateTime}\',"); + args.Append($"\'{_desc}\'"); + + var process = new System.Diagnostics.Process + { + StartInfo = + { + FileName = "WorkLineForms.Updater.exe", + WorkingDirectory = path, + CreateNoWindow = true, + Arguments = args.ToString(), + } + }; +// MessageBox.Show(process.StartInfo.FileName+" "+process.StartInfo.Arguments); + process.Start(); + result = true; + } + } + + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + result = false; + } + return result; + } + + + private bool CheckUpdate(string serverUrl, string updateXmlFileName) + { + + var fullFileName = serverUrl + updateXmlFileName; + try + { + var wc = new WebClient(); + var stream = wc.OpenRead(fullFileName); + //http://127.0.0.1/PcUpdate.xml + var xmlDoc = new XmlDocument(); + if (stream != null) xmlDoc.Load(stream); + XmlNode rootNode = xmlDoc.SelectSingleNode("AutoUpdate"); + if (rootNode != null) + foreach (XmlNode node in rootNode.ChildNodes.Cast().Where(node => node.Name == "SoftWare")) + { + if (node.Attributes != null) _softwareName = node.Attributes["Name"].Value; + foreach (XmlNode n in node.ChildNodes) + { + switch (n.Name) + { + case "Version": + _newVersion = n.InnerText; + break; + case "FilePath": + _filePath = n.InnerText; + break; + case "FileName": + _fileName = n.InnerText; + break; + case "LastUpdateTime": + _lastUpdateTime = n.InnerText; + break; + case "Desc": + _desc = n.InnerText; + break; + } + } + } + + + Version newVersion = new Version(_newVersion); + Version oldVersion = Assembly.LoadFrom(_softwareName).GetName().Version; + var tm = oldVersion.CompareTo(newVersion); + + var hasUpdate = tm < 0; + return hasUpdate; + } + catch (Exception ex) + { + throw new Exception($"更新出现错误,请确认网络连接无误后重试!\n{fullFileName}\n{ex.Message}"); + } + } + } +} \ No newline at end of file diff --git a/.svn/pristine/c8/c804defbb404303e312380b2a6eb86daac7f14e5.svn-base b/.svn/pristine/c8/c804defbb404303e312380b2a6eb86daac7f14e5.svn-base new file mode 100644 index 0000000..302c05d --- /dev/null +++ b/.svn/pristine/c8/c804defbb404303e312380b2a6eb86daac7f14e5.svn-base @@ -0,0 +1,206 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using QMAPP.WinForm.Common; +using QMAPP.FJC.Entity.Basic; +using QMAPP.ServicesAgent; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.Operation; +using QMFrameWork.Common.Serialization; +using QMAPP.Entity; + +namespace QMAPP.WinForm.Forms.Operation +{ + /// + /// 描述:回冲统计 + /// 作者:张德泉 + /// 时间:2021年9月7日 + /// + public partial class MainOperationCompleteForm : Form + { + private ServiceAgent wcfAgent = null; + private MachineInfo _machine = null; + private ProcessSet _pSet = null; + public MainOperationCompleteForm() + { + InitializeComponent(); + if (ClientContext.MachineInfo != null) + { + _machine = ClientContext.MachineInfo; + } + + Init(); + } + + public MainOperationCompleteForm(MachineInfo machine) + { + InitializeComponent(); + _machine = machine; + Init(); + } + + public MainOperationCompleteForm(MachineInfo machine,ProcessSet pSet) + { + InitializeComponent(); + _machine = machine; + _pSet = pSet; + Init(); + } + + private void Init() + { + + DGData.AutoGenerateColumns = false; + + wcfAgent = ClientContext.GetServiceAgent(); + + DateTime dtStart = DateTime.Now; + if (dtStart < Convert.ToDateTime(dtStart.ToShortDateString() + " 7:30:00")) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart; + + comHourStart.Text = "0"; + comHourEnd.Text = "7"; + comMinuteStart.Text = "0"; + comMinuteEnd.Text = "30"; + } + + else if (dtStart > Convert.ToDateTime(dtStart.ToShortDateString() + " 7:30:00") && dtStart.Hour < 16) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart; + + comHourStart.Text = "7"; + comMinuteStart.Text = "30"; + comHourEnd.Text = "16"; + comMinuteEnd.Text = "0"; + } + + else if (dtStart.Hour >= 16) + { + dpOpeStart.Value = dtStart; + dpOpeEnd.Value = dtStart.AddDays(1); + + comHourStart.Text = "16"; + comHourEnd.Text = "0"; + comMinuteStart.Text = "0"; + comMinuteEnd.Text = "0"; + } + + + + //this.dateOpeStart.ValueX = dtStart; + //this.dateOpeEnd.ValueX = dtEnd; + BindDataGrid(); + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindDataGrid() + { + MainOperation condtion = new MainOperation(); + condtion.CREATEUSER = ClientContext.LoginInfo.UserID; + condtion.MACHINECODDE = _machine.MACHINECODDE; + condtion.DATEOPESTART = Convert.ToDateTime(dpOpeStart.Value.ToString("yyyy-MM-dd") + " " + comHourStart.Text.ToString() + ":" + comMinuteStart.Text.ToString() + ":00"); + condtion.DATEOPEEND = Convert.ToDateTime(dpOpeEnd.Value.ToString("yyyy-MM-dd") + " " + comHourEnd.Text.ToString() + ":" + comMinuteEnd.Text.ToString() + ":00"); + var dataResult = wcfAgent.InvokeServiceFunction>(QMAPP.ServicesAgent.B9BasicService.MainOperationBLL_GetListForstatisticWithColor2.ToString(), + condtion); + + //new MainOperation + // { + // DATEOPESTART = String.IsNullOrEmpty(dateOpeStart.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()) ? DateTime.MinValue : Convert.ToDateTime(dateOpeStart.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()), + // DATEOPEEND = String.IsNullOrEmpty(dateOpeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()) ? DateTime.MinValue : Convert.ToDateTime(dateOpeEnd.Value.ToString("yyyy-MM-dd HH:mm:ss").Trim()), + // CREATEUSER = ClientContext.LoginInfo.UserID, + // MACHINECODDE = _machine.MACHINECODDE + // } + + if (!dataResult.IsSuccess) + { + MessageBox.Show(dataResult.Msg); + } + + DataTable dt = dataResult.Result; + + if (dt.Rows.Count > 0) + { + int sum = 0; + foreach (DataRow dr in dt.Rows) + { + sum += Convert.ToInt32(dr["加工数量"]); + } + + DataRow ndr = dt.NewRow(); + //ndr["颜色"] = "合计"; + ndr["加工数量"] = sum; + dt.Rows.Add(ndr); + } + + + DGData.DataSource = dt; + + DGData.ClearSelection(); + + //设置数值型局右显示 + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + private void tsbSearch_Click(object sender, EventArgs e) + { + + BindDataGrid(); + } + #endregion + + #region 窗体加载事件 + private void MainOperationStaticForm_Load(object sender, EventArgs e) + { + this.WindowState = FormWindowState.Maximized; + } + #endregion + + #region 设置序号 + private void DGData_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, this.DGData.RowHeadersWidth - 4, e.RowBounds.Height); + TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), new Font("宋体", 12, FontStyle.Bold), rectangle, this.DGData.RowHeadersDefaultCellStyle.ForeColor, TextFormatFlags.VerticalCenter | TextFormatFlags.Right); + } + #endregion + + + private void tbtnSearch_Click(object sender, EventArgs e) + { + Form f = Application.OpenForms["OperationForm"]; //查找是否打开过Form1窗体 + if (f == null) //没打开过 + { + OperationForm form = new OperationForm(); + form.MdiParent = this.ParentForm; + form.Show(); //重新new一个Show出来 + } + else + { + f.WindowState = FormWindowState.Normal; + f.Focus(); //打开过就让其获得焦点 + } + } + + private void toolStripButton1_Click(object sender, EventArgs e) + { + this.Close(); + } + + } +} diff --git a/.svn/pristine/c8/c88a1f5308d93cbdbc6b01bae50f1c908cd73f3a.svn-base b/.svn/pristine/c8/c88a1f5308d93cbdbc6b01bae50f1c908cd73f3a.svn-base new file mode 100644 index 0000000..3d6ea06 Binary files /dev/null and b/.svn/pristine/c8/c88a1f5308d93cbdbc6b01bae50f1c908cd73f3a.svn-base differ diff --git a/.svn/pristine/c9/c93e45fdd41d6f8219f6f8bea4c8d46d81d9946e.svn-base b/.svn/pristine/c9/c93e45fdd41d6f8219f6f8bea4c8d46d81d9946e.svn-base new file mode 100644 index 0000000..3305eaf Binary files /dev/null and b/.svn/pristine/c9/c93e45fdd41d6f8219f6f8bea4c8d46d81d9946e.svn-base differ diff --git a/.svn/pristine/c9/c97e8bd567f5be84733b56414c981ac618f7edf0.svn-base b/.svn/pristine/c9/c97e8bd567f5be84733b56414c981ac618f7edf0.svn-base new file mode 100644 index 0000000..0e85182 Binary files /dev/null and b/.svn/pristine/c9/c97e8bd567f5be84733b56414c981ac618f7edf0.svn-base differ diff --git a/.svn/pristine/ca/ca450a8d6666a3c0bc0a8b6c270ffa59d462ee3b.svn-base b/.svn/pristine/ca/ca450a8d6666a3c0bc0a8b6c270ffa59d462ee3b.svn-base new file mode 100644 index 0000000..6809a32 --- /dev/null +++ b/.svn/pristine/ca/ca450a8d6666a3c0bc0a8b6c270ffa59d462ee3b.svn-base @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using QMAPP.ServicesAgent; +using QMAPP.WinForm.Common; +using QMAPP.Entity; +using QMAPP.MD.Entity.Bucket; +using System.Threading; +using Stone.WinModuleTransWare; + +namespace QMAPP.WinForm.Forms.Injection +{ + /// + /// 模块编号:M11-1 + /// 作 用:投料记录 + /// 作 者:王庆男 + /// 编写日期:2015年05月26日 + /// + public partial class InjectionMoldingNEWEditForm : Form + { + RawMaterial recorder = new RawMaterial();//编辑保存实体 + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + private bool IsCntinueSpeakMsg = true; + + /// + /// 新建 + /// + public InjectionMoldingNEWEditForm() + { + InitializeComponent(); + } + + /// + /// 编辑 + /// + /// + public InjectionMoldingNEWEditForm(string pid) + { + recorder.PID = pid; + InitializeComponent(); + } + + /// + /// 窗体加载 + /// + /// + /// + private void Form_Load(object sender, EventArgs e) + { + new KeyEvent().SetKeyToTxt(this); + #region 绑定下拉列表 + BasicData basicData = new BasicData(); + //加载是否有条码列表 + //加载搪塑设备列表 + + #endregion + + #region 加载编辑 + //判断是否为编辑加载编辑数据 + if (string.IsNullOrEmpty(recorder.PID) == false) + { + recorder = agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Get.ToString(), recorder).Result; + //一定是存在的物料 + this.txtPartCode.Text = recorder.PartCode; + this.txtBatchCode.Text = recorder.BatchCode; + this.txtSerialCode.Text = recorder.SerialCode; + this.txtBucketCode.Text = recorder.BucketCode; + } + #endregion + } + + /// + /// 窗体保存事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + //窗体数据校验 + string errorMessae = ErrorCheck(); + if (errorMessae != "") + { + MessageBox.Show(errorMessae, Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + #region 加载保存信息 + + recorder.PartCode = this.txtPartCode.Text.Trim(); + recorder.BatchCode = this.txtBatchCode.Text.Trim(); + recorder.SerialCode = this.txtSerialCode.Text.Trim(); + recorder.BucketCode = this.txtBucketCode.Text.Trim(); + + #endregion + + #region 保存 + + DataResult result;//判断是否成功 + if (string.IsNullOrEmpty(recorder.PID) == true) + { + result = agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Insert.ToString(), recorder); + } + else + { + result = agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_Update.ToString(), recorder); + } + //保存成功 + if (result.IsSuccess) + { + this.DialogResult = System.Windows.Forms.DialogResult.OK; + this.Close(); + } + #endregion + } + + /// + /// 窗体关闭 + /// + /// + /// + private void tsbClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + /// + ///错误检测 + /// + /// + private string ErrorCheck() + { + #region 校验 + string strMessage = ""; + + if (!string.IsNullOrEmpty(this.txtBucketCode.Text) && !string.IsNullOrEmpty(this.txtPartCode.Text)) + { + var List = agent.InvokeServiceFunction>(DictService.BucketMaterialBLL_GetBucketMaterialList.ToString(), new BucketMaterial() { BucketCode = this.txtBucketCode.Text }); + if (List != null && List.Count > 0) + { + var count = 0; + foreach (var t in List) + { + if (System.Text.RegularExpressions.Regex.IsMatch(this.txtPartCode.Text, t.RawMaterial)) + count++; + } + if (count == 0) + { + strMessage += this.txtBucketCode.Text + "原料上料错误 \r\n"; + } + } + } + + //批次 + if (this.txtBatchCode.Text == string.Empty) + { + strMessage += Resource1.MaterialBatchNullValidate + "\r\n"; + } + + //料筒 + if (this.txtBucketCode.Text == string.Empty) + { + strMessage += "料筒不能为空\r\n"; + } + + //零件号 + if (this.txtPartCode.Text == string.Empty) + { + strMessage += "零件号不能为空\r\n"; + } + + return strMessage; + #endregion + } + + private void PartCode_TextChanged(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "txtPartCode") + { + if (!string.IsNullOrEmpty(this.txtBucketCode.Text) && !string.IsNullOrEmpty(this.txtPartCode.Text)) + { + var List = agent.InvokeServiceFunction>(DictService.BucketMaterialBLL_GetBucketMaterialList.ToString(), new BucketMaterial() { BucketCode = this.txtBucketCode.Text }); + if (List != null && List.Count > 0) + { + var count = 0; + foreach (var t in List) + { + if (this.txtPartCode.Text == t.RawMaterial) + count++; + + } + if (count == 0) + { + IsCntinueSpeakMsg = true; + timer1.Enabled = true; + _Msg = this.txtBucketCode.Text + "号筒,原料上料错误"; + InjectionMoldingPasswordForm psd = new InjectionMoldingPasswordForm(_Msg); + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + IsCntinueSpeakMsg = false; + txtPartCode.Focus(); + this.txtPartCode.Text = ""; + timer1.Enabled = false; + } + } + else + txtBatchCode.Focus(); + } + else + txtBatchCode.Focus(); + } + else + { + MessageBox.Show("请优先扫描料筒号", Resource1.ConfirmTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning); + txtBucketCode.Focus(); + } + } + } + + private void BucketCode_TextChanged(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "txtBucketCode") + { + txtPartCode.Focus(); + } + + } + private void BatchCode_TextChanged(object sender, KeyEventArgs e) + { + //MessageBox.Show(e.KeyValue.ToString()); + if (e.KeyCode == Keys.Enter && (sender as TextBox).Name == "txtBatchCode") + { + var List = agent.InvokeServiceFunction>(DictService.RawMaterialBLL_GetListRaw.ToString(), new RawMaterial() { BucketCode = this.txtBucketCode.Text, PartCode = this.txtPartCode.Text }); + if (List != null && List.Count > 0) + { + var list = List.Where(p=>p.BatchCode == this.txtBatchCode.Text); + if (list.Count() == 0) + { + string state = string.Empty; + IsCntinueSpeakMsg = true; + timer1.Enabled = true; + _Msg = this.txtBucketCode.Text + "号筒,批次号变更"; + //弹出输入密码 + InjectionMoldingPasswordForm psd = new InjectionMoldingPasswordForm(_Msg); + var result = psd.ShowDialog(); + if (result.ToString() == "OK") + { + IsCntinueSpeakMsg = false; + timer1.Enabled = false; + txtSerialCode.Focus(); + } + else + { + this.txtBatchCode.Text = ""; + IsCntinueSpeakMsg = false; + timer1.Enabled = false; + txtBatchCode.Focus(); + } + } + else + txtSerialCode.Focus(); + } + else + txtSerialCode.Focus(); + } + + } + + private string _Msg = String.Empty; + private void buttonRecord_Click() + { + if (IsCntinueSpeakMsg) + { + new Form1().Speek(_Msg); + } + } + + private void timer1_Tick(object sender, EventArgs e) + { + Thread thread = new Thread(buttonRecord_Click); + thread.Start(); + } + } +} diff --git a/.svn/pristine/ca/caaa0a33d07b60ba3120661ad7f66ef2c4bb9cc6.svn-base b/.svn/pristine/ca/caaa0a33d07b60ba3120661ad7f66ef2c4bb9cc6.svn-base new file mode 100644 index 0000000..53bc78e --- /dev/null +++ b/.svn/pristine/ca/caaa0a33d07b60ba3120661ad7f66ef2c4bb9cc6.svn-base @@ -0,0 +1,297 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + 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 + + + + True + + + True + + + True + + + True + + + 127, 17 + + \ No newline at end of file diff --git a/.svn/pristine/ca/caddc5b0c26d31a88a01172c89c6ddb97419da30.svn-base b/.svn/pristine/ca/caddc5b0c26d31a88a01172c89c6ddb97419da30.svn-base new file mode 100644 index 0000000..6ffb1cd Binary files /dev/null and b/.svn/pristine/ca/caddc5b0c26d31a88a01172c89c6ddb97419da30.svn-base differ diff --git a/.svn/pristine/cc/ccaac4799af2231f42cbdbfb9ebd895fb8bce00e.svn-base b/.svn/pristine/cc/ccaac4799af2231f42cbdbfb9ebd895fb8bce00e.svn-base new file mode 100644 index 0000000..0a59839 --- /dev/null +++ b/.svn/pristine/cc/ccaac4799af2231f42cbdbfb9ebd895fb8bce00e.svn-base @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Windows.Forms; +using QMAPP.FJC.Entity.Operation; +using QMAPP.ServicesAgent; +using QMAPP.FJC.Entity.BZD; + +namespace QMAPP.WinForm.Forms.Operation +{ + public partial class BZDRePrintForm : Form + { + //获取服务代理 + QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); + + List _bzdConfig = null; + + Product _CurrentProduct = null; + private OperationForm _parentForm; + + + public BZDRePrintForm(OperationForm parentForm) + { + InitializeComponent(); + infolabel.Text = ""; + infolabel.ForeColor = Color.Red; + _parentForm = parentForm; + } + + #region 打印按钮 + + /// + /// 打印按钮 + /// + /// + /// + private void button1_Click(object sender, EventArgs e) + { + try + { + + if (string.IsNullOrWhiteSpace(cbMaterial.Text)) + { + infolabel.Text = "请选择总成零件号!"; + cbMaterial.Focus(); + return; + } + + if (string.IsNullOrEmpty(txtMainCode.Text)) + { + infolabel.Text = "请扫描或填写装配码!"; + + txtMainCode.Focus(); + return; + } + + //***************************** + var _Product = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = txtMainCode.Text }); + + if (_Product == null) + { + string BZDRule = ""; + DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "BZDRule"); + if (dataTable.Rows.Count > 0) + { + BZDRule = dataTable.Rows[0]["Value"].ToString(); + } + if (string.IsNullOrEmpty(BZDRule)) + { + MessageBox.Show("未配置总成规则!"); + return; + } + string MATERIAL_CODE = cbMaterial.Text.Split('|')[0]; + + if (System.Text.RegularExpressions.Regex.IsMatch(txtMainCode.Text, BZDRule)) + { + //添加补打记录 + _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtMainCode.Text, Type = "BZD条码补打" }); + + _parentForm.planMATERIAL_CODE = MATERIAL_CODE; + _parentForm.processMainCode = txtMainCode.Text; + _parentForm.Print052QRCODE(); + } + + else + { + MessageBox.Show("条码规则不符合!"); + } + + } + else + MessageBox.Show("条码已存在!"); + } + catch (Exception exception) + { + MessageBox.Show("打印失败!"); + throw; + } + } + + #endregion + + + #region 初始界面 + + /// + /// + /// + /// + /// + private void PrintForm_Load(object sender, EventArgs e) + { + _bzdConfig = + _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),""); + foreach (var t in _bzdConfig) + { + t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail; + } + LoadAssyMaterial(); + } + + #endregion + + #region 加载总成物料 + + /// + /// 加载总成物料 + /// + private void LoadAssyMaterial() + { + + //模腔号 + this.cbMaterial.DataSource = _bzdConfig; + this.cbMaterial.DisplayMember = "MATERIALCODDE"; + this.cbMaterial.ValueMember = "PID"; + } + + + + #endregion + + private void label2_Click(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/.svn/pristine/cc/ccca93a70c656c7cb20fee967fadde1cba9f0442.svn-base b/.svn/pristine/cc/ccca93a70c656c7cb20fee967fadde1cba9f0442.svn-base new file mode 100644 index 0000000..037587a --- /dev/null +++ b/.svn/pristine/cc/ccca93a70c656c7cb20fee967fadde1cba9f0442.svn-base @@ -0,0 +1,412 @@ +namespace QMAPP.WinForm.Forms.Injection +{ + partial class InjectionMoldingNEWForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InjectionMoldingNEWForm)); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.label3 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.txtBatch = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbSearch = new System.Windows.Forms.ToolStripButton(); + this.tsbAdd = new System.Windows.Forms.ToolStripButton(); + this.DGView = new System.Windows.Forms.DataGridView(); + this.BucketCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PartCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BatchCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.SerialCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.CreateDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Pid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panelSearchTitle = new System.Windows.Forms.Panel(); + this.lblSearchTitle = new System.Windows.Forms.Label(); + this.panelSearch = new System.Windows.Forms.Panel(); + this.txtBucketCode = new System.Windows.Forms.TextBox(); + this.dtpCreateUserEnd = new DateTimePickerA(); + this.dtpCreateUserStart = new DateTimePickerA(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pager1 = new QMAPP.WinForm.Controls.Pager(); + this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).BeginInit(); + this.panelSearchTitle.SuspendLayout(); + this.panelSearch.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(317, 17); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(69, 20); + this.label3.TabIndex = 4; + this.label3.Text = "投料批次"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(339, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(24, 20); + this.label5.TabIndex = 2; + this.label5.Text = "至"; + // + // txtBatch + // + this.txtBatch.Font = new System.Drawing.Font("宋体", 11F); + this.txtBatch.Location = new System.Drawing.Point(414, 15); + this.txtBatch.Name = "txtBatch"; + this.txtBatch.Size = new System.Drawing.Size(169, 24); + this.txtBatch.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(39, 18); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(69, 20); + this.label2.TabIndex = 2; + this.label2.Text = "料筒编号"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(36, 59); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(69, 20); + this.label4.TabIndex = 0; + this.label4.Text = "投料日期"; + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbSearch, + this.tsbAdd}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(984, 70); + this.toolStrip1.Stretch = true; + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbSearch + // + this.tsbSearch.AutoSize = false; + this.tsbSearch.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbSearch.Image = ((System.Drawing.Image)(resources.GetObject("tsbSearch.Image"))); + this.tsbSearch.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSearch.Name = "tsbSearch"; + this.tsbSearch.Size = new System.Drawing.Size(100, 60); + this.tsbSearch.Text = "查询"; + this.tsbSearch.Click += new System.EventHandler(this.tsbSearch_Click); + // + // tsbAdd + // + this.tsbAdd.AutoSize = false; + this.tsbAdd.Font = new System.Drawing.Font("微软雅黑", 12F); + this.tsbAdd.Image = ((System.Drawing.Image)(resources.GetObject("tsbAdd.Image"))); + this.tsbAdd.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tsbAdd.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbAdd.Name = "tsbAdd"; + this.tsbAdd.Size = new System.Drawing.Size(100, 60); + this.tsbAdd.Text = "投料"; + this.tsbAdd.Click += new System.EventHandler(this.tsbAdd_Click); + // + // DGView + // + this.DGView.AllowUserToAddRows = false; + this.DGView.AllowUserToDeleteRows = false; + this.DGView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; + this.DGView.BackgroundColor = System.Drawing.SystemColors.ButtonFace; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.DGView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.DGView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.BucketCode, + this.PartCode, + this.BatchCode, + this.SerialCode, + this.CreateDate, + this.Pid}); + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.DGView.DefaultCellStyle = dataGridViewCellStyle7; + this.DGView.Dock = System.Windows.Forms.DockStyle.Fill; + this.DGView.Location = new System.Drawing.Point(0, 0); + this.DGView.Name = "DGView"; + this.DGView.ReadOnly = true; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.DGView.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; + this.DGView.RowTemplate.Height = 23; + this.DGView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.DGView.Size = new System.Drawing.Size(984, 397); + this.DGView.TabIndex = 3; + this.DGView.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.DG_RowPostPaint); + // + // BucketCode + // + this.BucketCode.DataPropertyName = "BucketCode"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F); + this.BucketCode.DefaultCellStyle = dataGridViewCellStyle2; + this.BucketCode.HeaderText = "料筒编号"; + this.BucketCode.Name = "BucketCode"; + this.BucketCode.ReadOnly = true; + this.BucketCode.Width = 111; + // + // PartCode + // + this.PartCode.DataPropertyName = "PartCode"; + dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F); + this.PartCode.DefaultCellStyle = dataGridViewCellStyle3; + this.PartCode.HeaderText = "零件号"; + this.PartCode.Name = "PartCode"; + this.PartCode.ReadOnly = true; + this.PartCode.Width = 94; + // + // BatchCode + // + this.BatchCode.DataPropertyName = "BatchCode"; + dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F); + this.BatchCode.DefaultCellStyle = dataGridViewCellStyle4; + this.BatchCode.HeaderText = "投料批次"; + this.BatchCode.Name = "BatchCode"; + this.BatchCode.ReadOnly = true; + this.BatchCode.Width = 111; + // + // SerialCode + // + this.SerialCode.DataPropertyName = "SerialCode"; + dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F); + this.SerialCode.DefaultCellStyle = dataGridViewCellStyle5; + this.SerialCode.HeaderText = "流水号"; + this.SerialCode.Name = "SerialCode"; + this.SerialCode.ReadOnly = true; + this.SerialCode.Width = 94; + // + // CreateDate + // + this.CreateDate.DataPropertyName = "CreateDate"; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 15.75F); + dataGridViewCellStyle6.Format = "f"; + dataGridViewCellStyle6.NullValue = null; + this.CreateDate.DefaultCellStyle = dataGridViewCellStyle6; + this.CreateDate.HeaderText = "投料时间"; + this.CreateDate.Name = "CreateDate"; + this.CreateDate.ReadOnly = true; + this.CreateDate.Width = 111; + // + // Pid + // + this.Pid.DataPropertyName = "PID"; + this.Pid.HeaderText = "Pid"; + this.Pid.Name = "Pid"; + this.Pid.ReadOnly = true; + this.Pid.Visible = false; + this.Pid.Width = 70; + // + // panelSearchTitle + // + this.panelSearchTitle.BackColor = System.Drawing.SystemColors.ScrollBar; + this.panelSearchTitle.Controls.Add(this.lblSearchTitle); + this.panelSearchTitle.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearchTitle.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearchTitle.Location = new System.Drawing.Point(0, 70); + this.panelSearchTitle.Name = "panelSearchTitle"; + this.panelSearchTitle.Size = new System.Drawing.Size(984, 35); + this.panelSearchTitle.TabIndex = 8; + // + // lblSearchTitle + // + this.lblSearchTitle.AutoSize = true; + this.lblSearchTitle.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSearchTitle.Location = new System.Drawing.Point(15, 7); + this.lblSearchTitle.Name = "lblSearchTitle"; + this.lblSearchTitle.Size = new System.Drawing.Size(69, 20); + this.lblSearchTitle.TabIndex = 0; + this.lblSearchTitle.Text = "查询条件"; + // + // panelSearch + // + this.panelSearch.BackColor = System.Drawing.SystemColors.InactiveBorder; + this.panelSearch.Controls.Add(this.txtBucketCode); + this.panelSearch.Controls.Add(this.dtpCreateUserEnd); + this.panelSearch.Controls.Add(this.dtpCreateUserStart); + this.panelSearch.Controls.Add(this.label4); + this.panelSearch.Controls.Add(this.label2); + this.panelSearch.Controls.Add(this.txtBatch); + this.panelSearch.Controls.Add(this.label5); + this.panelSearch.Controls.Add(this.label3); + this.panelSearch.Dock = System.Windows.Forms.DockStyle.Top; + this.panelSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelSearch.Location = new System.Drawing.Point(0, 105); + this.panelSearch.Name = "panelSearch"; + this.panelSearch.Size = new System.Drawing.Size(984, 100); + this.panelSearch.TabIndex = 9; + // + // txtBucketCode + // + this.txtBucketCode.Font = new System.Drawing.Font("宋体", 11F); + this.txtBucketCode.Location = new System.Drawing.Point(124, 16); + this.txtBucketCode.Name = "txtBucketCode"; + this.txtBucketCode.Size = new System.Drawing.Size(169, 24); + this.txtBucketCode.TabIndex = 9; + // + // dtpCreateUserEnd + // + this.dtpCreateUserEnd.CustomFormat = " "; + this.dtpCreateUserEnd.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.dtpCreateUserEnd.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserEnd.FormatString = "yyyy年MM月dd日"; + this.dtpCreateUserEnd.Location = new System.Drawing.Point(413, 56); + this.dtpCreateUserEnd.Name = "dtpCreateUserEnd"; + this.dtpCreateUserEnd.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserEnd.Size = new System.Drawing.Size(169, 26); + this.dtpCreateUserEnd.TabIndex = 8; + this.dtpCreateUserEnd.ValueX = null; + // + // dtpCreateUserStart + // + this.dtpCreateUserStart.CustomFormat = " "; + this.dtpCreateUserStart.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold); + this.dtpCreateUserStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserStart.FormatString = "yyyy年MM月dd日"; + this.dtpCreateUserStart.Location = new System.Drawing.Point(123, 56); + this.dtpCreateUserStart.Name = "dtpCreateUserStart"; + this.dtpCreateUserStart.OriginalFormat = System.Windows.Forms.DateTimePickerFormat.Custom; + this.dtpCreateUserStart.Size = new System.Drawing.Size(169, 26); + this.dtpCreateUserStart.TabIndex = 7; + this.dtpCreateUserStart.ValueX = null; + // + // panel1 + // + this.panel1.Controls.Add(this.DGView); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 205); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(984, 397); + this.panel1.TabIndex = 10; + // + // pager1 + // + this.pager1.DataPage = ((QMFrameWork.Data.DataPage)(resources.GetObject("pager1.DataPage"))); + this.pager1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pager1.Location = new System.Drawing.Point(0, 602); + this.pager1.Name = "pager1"; + this.pager1.OSearch = null; + this.pager1.Size = new System.Drawing.Size(984, 40); + this.pager1.TabIndex = 7; + this.pager1.EventPaging += new QMAPP.WinForm.Controls.EventPagingHandler(this.pager1_EventPaging); + // + // InjectionMoldingNEWForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 642); + this.Controls.Add(this.panel1); + this.Controls.Add(this.panelSearch); + this.Controls.Add(this.panelSearchTitle); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.pager1); + this.Name = "InjectionMoldingNEWForm"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "注塑投料"; + this.Load += new System.EventHandler(this.Form_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.DGView)).EndInit(); + this.panelSearchTitle.ResumeLayout(false); + this.panelSearchTitle.PerformLayout(); + this.panelSearch.ResumeLayout(false); + this.panelSearch.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tsbSearch; + private System.Windows.Forms.ToolStripButton tsbAdd; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtBatch; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.DataGridView DGView; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private Controls.Pager pager1; + private System.Windows.Forms.Panel panelSearchTitle; + private System.Windows.Forms.Label lblSearchTitle; + private System.Windows.Forms.Panel panelSearch; + private System.Windows.Forms.Panel panel1; + private DateTimePickerA dtpCreateUserStart; + private DateTimePickerA dtpCreateUserEnd; + private System.Windows.Forms.TextBox txtBucketCode; + private System.Windows.Forms.DataGridViewTextBoxColumn BucketCode; + private System.Windows.Forms.DataGridViewTextBoxColumn PartCode; + private System.Windows.Forms.DataGridViewTextBoxColumn BatchCode; + private System.Windows.Forms.DataGridViewTextBoxColumn SerialCode; + private System.Windows.Forms.DataGridViewTextBoxColumn CreateDate; + private System.Windows.Forms.DataGridViewTextBoxColumn Pid; + } +} \ No newline at end of file diff --git a/.svn/pristine/cd/cd9718ff4ea962b6e132a6ac33501894c5b37b8c.svn-base b/.svn/pristine/cd/cd9718ff4ea962b6e132a6ac33501894c5b37b8c.svn-base new file mode 100644 index 0000000..c4f0ef7 --- /dev/null +++ b/.svn/pristine/cd/cd9718ff4ea962b6e132a6ac33501894c5b37b8c.svn-base @@ -0,0 +1,236 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {063B6316-7154-4BD9-B546-21CCE4685235} + Library + Properties + QMAPP.FJC.DAL + QMAPP.FJC.DAL + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\DLL\oracle32\Oracle.DataAccess.dll + + + ..\..\QMFrameWork\QMFrameWork.Common.dll + + + False + ..\..\QMFrameWork\QMFrameWork.Data.dll + + + ..\..\QMFrameWork\QMFrameWork.Data.Attributes.dll + + + ..\..\QMFrameWork\QMFrameWork.Log.dll + + + ..\..\DLL\SapInterface.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {A80DFEE4-F3D0-4234-A2CC-E4DCE5000E7E} + QMAPP.MD.Entity + + + {407204CD-0256-4EDD-8A89-26EBF83D19A7} + QMAPP.DAL + + + {604FB24F-7706-497C-BEC7-27D7B6B5A82C} + QMAPP.Entity + + + {17123CDD-0BA7-496F-8E4E-FCBABE0463CA} + QMAPP.FJC.Entity + + + + + + + + \ No newline at end of file diff --git a/.svn/pristine/ce/ce8489a2dfe39b760eae03b2a1191bdbe9d3c4a4.svn-base b/.svn/pristine/ce/ce8489a2dfe39b760eae03b2a1191bdbe9d3c4a4.svn-base new file mode 100644 index 0000000..79f9826 --- /dev/null +++ b/.svn/pristine/ce/ce8489a2dfe39b760eae03b2a1191bdbe9d3c4a4.svn-base @@ -0,0 +1 @@ +b:dU}jdԜ閄媎򞾕핅χ삝󯉿挌򼸷 \ No newline at end of file diff --git a/.svn/pristine/cf/cf486acc2518fe7a53fa32959e44d4bd24de9382.svn-base b/.svn/pristine/cf/cf486acc2518fe7a53fa32959e44d4bd24de9382.svn-base new file mode 100644 index 0000000..7377586 --- /dev/null +++ b/.svn/pristine/cf/cf486acc2518fe7a53fa32959e44d4bd24de9382.svn-base @@ -0,0 +1,73 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + + 工厂信息列表 + + + + <%=Html.QPSeach(80,true) %> + + + + + + +
+ <%=Html.QV(p => p.BucketCode)%> + + <%=Html.QC(p => p.BucketCode)%> +
+ <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("PID")%> + +
+ + + + + + +
+ <%=Html.QTButtonSearch("BucketMaterial", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("BucketMaterial", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("BucketMaterial", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("BucketMaterial", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> +
+
diff --git a/.svn/pristine/cf/cff442add1f8559108b168b11c9ff0fe24f21a87.svn-base b/.svn/pristine/cf/cff442add1f8559108b168b11c9ff0fe24f21a87.svn-base new file mode 100644 index 0000000..67bef56 Binary files /dev/null and b/.svn/pristine/cf/cff442add1f8559108b168b11c9ff0fe24f21a87.svn-base differ diff --git a/.svn/pristine/d0/d049636438ec5bac55dbb4d04d6034d8dd889aba.svn-base b/.svn/pristine/d0/d049636438ec5bac55dbb4d04d6034d8dd889aba.svn-base new file mode 100644 index 0000000..089e3ea --- /dev/null +++ b/.svn/pristine/d0/d049636438ec5bac55dbb4d04d6034d8dd889aba.svn-base @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc.Html; +using QMFrameWork.WebUI.Attribute; +using QMFrameWork.WebUI; + +namespace QMAPP.MD.Web.Models +{ + /// + /// 模块名称:缺陷表 + /// 作 者:张松男 + /// 编写日期:2021年5月26日 + /// + public class DefectDictModel : QDGModel + { + /// + /// 缺陷表主键 + /// + [Description("缺陷表主键")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 36)] + [InputType(inputType.hidden)] + [DGColumn(Hidden = true, PrimaryKey = true)] + public string PID { get; set; } + + /// + /// 作废编号 + /// + [Description("作废编号")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] + [InputType(inputType.text)] //输入框类型 + [DGColumn(frozenColumns = true, Sortable = false, Width = 200, DataAlign = DataAlign.center)] + public string MFGCODE { get; set; } + + /// + /// 作废名称 + /// + [Description("作废名称")] + [HTMLInput(UpdateRead = false, required = true, MaxLength = 20)] + [InputType(inputType.text)] + [DGColumn(frozenColumns = false, Sortable = true, Width = 200, DataAlign = DataAlign.center)] + public string MFGNAME { get; set; } + + + /// + /// 备用字段 + /// + [Description("")] + [HTMLInput(UpdateRead = true, required = true, MaxLength = 20)] + //[InputType(inputType.text)] + [DGColumn(Hidden = true, frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.left)] + [InputType(inputType.hidden)] + public string MFGCODETYPE { get; set; } + + /// + /// 备用字段 + /// + [Description("")] + [HTMLInput(UpdateRead = true, required = true, MaxLength = 20)] + //[InputType(inputType.text)] + [DGColumn(Hidden = true, frozenColumns = false, Sortable = true, Width = 140, DataAlign = DataAlign.left)] + [InputType(inputType.hidden)] + public string TYPE_CODE { get; set; } + + /// + /// 备用字段 + /// + [Description("")] + [HTMLInput(UpdateRead = true, required = true, MaxLength = 20)] + //[InputType(inputType.text)] + [DGColumn(Hidden = true, frozenColumns = true, Sortable = true, Width = 140, DataAlign = DataAlign.left)] + [InputType(inputType.hidden)] + public string MFGCODETYPENAME { get; set; } + + } +} \ No newline at end of file diff --git a/.svn/pristine/d1/d140fd39f9c28d381a6c93a2e8155ff381a1ec43.svn-base b/.svn/pristine/d1/d140fd39f9c28d381a6c93a2e8155ff381a1ec43.svn-base new file mode 100644 index 0000000..148c130 --- /dev/null +++ b/.svn/pristine/d1/d140fd39f9c28d381a6c93a2e8155ff381a1ec43.svn-base @@ -0,0 +1,105 @@ + <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" + Inherits="System.Web.Mvc.ViewPage" %> + + <%--缺陷信息列表--%> + + + + <%=Html.QPSeach(100,true) %> + + + + + +
+ <%=Html.QV(p=>p.MFGCODE) %> + + <%=Html.QC(p => p.MFGCODE)%> +
+
+ + <%=Html.QPEnd()%> + <%=Html.QPList() %> + <%=Html.QDateGrid(Model)%> + <%=Html.QPEnd() %> + <%=Html.Hidden("PID")%> + <%=Html.Hidden("selectKey")%> + <%=Html.Hidden("fileName")%> + +
+ + + + + +
+ <%=Html.QTButtonSearch("DefectDict", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonAdd("DefectDict", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonUpdate("DefectDict", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButtonDelete("DefectDict", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%-- <%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%> + <%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%> --%> + +
+
+ diff --git a/.svn/pristine/d1/d1a734a7868ce798ee13b5ee710ef60a2450ae51.svn-base b/.svn/pristine/d1/d1a734a7868ce798ee13b5ee710ef60a2450ae51.svn-base new file mode 100644 index 0000000..380ba35 --- /dev/null +++ b/.svn/pristine/d1/d1a734a7868ce798ee13b5ee710ef60a2450ae51.svn-base @@ -0,0 +1,557 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +