| | |
| | | /// </summary> |
| | | /// <param name="_fGx">工序</param> |
| | | /// <param name="_fBc">班次</param> |
| | | public Frm_Work01(string _fGx, string _fBc) |
| | | /// <param name="_strinOther">目前为电检路径</param> |
| | | public Frm_Work01(string _fGx, string _fBc, string _strinOther) |
| | | { |
| | | InitializeComponent(); |
| | | txt_gx.Text = _fGx; |
| | | txt_bc.Text = _fBc; |
| | | this.Text = "工序采集 - " + _fGx + " - " + _fBc; |
| | | if (!getConfig()) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("读取配置文件失败,请联系管理员!"); |
| | | } |
| | | txt_dianJianPath.Text = _strinOther; |
| | | dianJianPath= _strinOther; |
| | | this.Text = "工序采集【" + _fGx + " - " + _fBc + "】"; |
| | | addColumn(); |
| | | txt_barCode.KeyDown += (s, e) => |
| | | { |
| | |
| | | }; |
| | | btnBad.Click += (s, e) => |
| | | { |
| | | UcDictionarySelect frm = new UcDictionarySelect("缺陷描述", " s_type='工序采集不良项目'"); |
| | | UcDictionarySelect frm = new UcDictionarySelect("不良描述", " s_type='工序采集不良项目' and pid<>'00000000-0000-0000-0000-000000000000'"); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 先读取配置 |
| | | /// 根据工序,构造不同类型的实体 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | private bool getConfig() |
| | | { |
| | | string _where = " and 1=1 and defect_code='7001'"; |
| | | var pgq = new PageQueryModel(1, 999999, "a.defect_code", "asc", "", _where); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", "MesDefectCodeManager/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = dd.rtnData.list; |
| | | if (dt != null && dt.Rows.Count > 0) |
| | | { |
| | | dianJianPath = dt.Rows[0]["defectName"].ToString(); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取实体 |
| | | /// </summary> |
| | | /// <param name="_barCode"></param> |
| | | /// <param name="_checkResult"></param> |
| | | /// <param name="_badReson"></param> |
| | | /// <param name="_barCode">条码</param> |
| | | /// <param name="_checkResult">结果</param> |
| | | /// <param name="_badReson">原因</param> |
| | | /// <returns></returns> |
| | | private dynamic getObj(string _barCode, string _checkResult, string _badReson = "") |
| | | { |