/// <summary>
        /// 钢坯改判
        /// </summary>
        /// <param name="row">选中的数据</param>
        /// <param name="strGrd">钢种</param>
        /// <param name="strStdCode">执行标准</param>
        /// <param name="strMatCode">物料编码</param>
        /// <param name="strMatName">物料描述</param>
        /// <param name="strZrdwID">责任单位代码</param>
        /// <param name="strZrdwName">责任代为描述</param>
        /// <param name="strPDDJ">判定等级</param>
        /// <param name="strZYX1">自由项1</param>
        /// <param name="strZYX2">自由项2</param>
        /// <param name="strGPYY">改判原因</param>
        /// <param name="strLen">定尺</param>
        /// <param name="strISSH">是否审核</param>
        /// <returns></returns>
        public string TPGP_Slab(string strs, string strGrd, string strStdCode, string strMatCode, string strMatName, string strZrdwID, string strZrdwName, string strPDDJ, string strZYX1, string strZYX2, string strGPYY, string strLen, decimal strISSH)
        {
            string result = "1";

            try
            {
                Dal_TQC_TP_SLAB_COMMUTE dalTP     = new Dal_TQC_TP_SLAB_COMMUTE();
                Dal_TSC_SLAB_MAIN       dal_slab  = new Dal_TSC_SLAB_MAIN();
                Dal_TQD_DESIGN          dalDesign = new Dal_TQD_DESIGN();

                TransactionHelper.BeginTransaction();

                string   strUserID = RV.UI.UserInfo.userID;
                DateTime time      = RV.UI.ServerTime.timeNow();
                string   stove     = "";

                string strDesignNo = dalDesign.Get_Design_No(strStdCode, strGrd);
                if (string.IsNullOrEmpty(strDesignNo))
                {
                    return("改判失败,没有找到对应的执行标准信息!");
                }
                string[] strs_Slab_ID = strs.Substring(0, strs.Length - 1).Split(',');

                Bll_TB_MATRL_MAIN bll_matrl = new Bll_TB_MATRL_MAIN();

                for (int i = 0; i < strs_Slab_ID.Length; i++)
                {
                    Mod_TSC_SLAB_MAIN mod_slab = dal_slab.GetModel(strs_Slab_ID[i]);
                    stove = mod_slab.C_STOVE;
                    if (mod_slab != null)
                    {
                        Mod_TB_MATRL_MAIN mod_matrl = bll_matrl.GetModel(strMatCode);
                        stove = mod_slab.C_STOVE;
                        Mod_TQC_TP_SLAB_COMMUTE mod = new Mod_TQC_TP_SLAB_COMMUTE();
                        mod.C_STA_ID              = mod_slab.C_STA_DESC;
                        mod.C_SLAB_MAIN_ID        = strs_Slab_ID[i];
                        mod.C_STOVE               = mod_slab.C_STOVE;
                        mod.C_BATCH_NO            = mod_slab.C_BATCH_NO;
                        mod.N_WGT                 = mod_slab.N_WGT;
                        mod.N_LEN_BEFORE          = mod_slab.N_LEN;
                        mod.C_STL_GRD_BEFORE      = mod_slab.C_STL_GRD;
                        mod.C_STD_CODE_BEFORE     = mod_slab.C_STD_CODE;
                        mod.C_SPEC_BEFORE         = mod_slab.C_SPEC;
                        mod.C_MAT_CODE_BEFORE     = mod_slab.C_MAT_CODE;
                        mod.C_MAT_DESC_BEFORE     = mod_slab.C_MAT_NAME;
                        mod.C_ZYX1_BEFORE         = mod_slab.C_ZYX1;
                        mod.C_ZYX2_BEFORE         = mod_slab.C_ZYX2;
                        mod.C_JUDGE_LEV_BP_BEFORE = mod_slab.C_MAT_TYPE;
                        mod.C_STL_GRD_AFTER       = strGrd;
                        mod.C_STD_CODE_AFTER      = strStdCode;
                        mod.C_SPEC_AFTER          = mod_matrl.C_SLAB_SIZE;
                        mod.N_LEN_AFTER           = Convert.ToDecimal(strLen);
                        mod.C_MAT_CODE_AFTER      = strMatCode;
                        mod.C_MAT_DESC_AFTER      = strMatName;
                        mod.C_REASON_DEPMT_ID     = strZrdwID;
                        mod.C_REASON_DEPMT_DESC   = strZrdwName;
                        mod.C_EMP_ID              = RV.UI.UserInfo.UserName;
                        mod.C_ZYX1_AFTER          = strZYX1;
                        mod.C_ZYX2_AFTER          = strZYX2;
                        mod.C_JUDGE_LEV_BP_AFTER  = strPDDJ;
                        mod.C_COMMUTE_SQ          = strGPYY;
                        mod.N_IS_SH               = strISSH;
                        mod.C_REMARK2             = mod_slab.C_MOVE_TYPE;
                        mod.C_REMARK3             = mod_slab.C_SLABWH_CODE;
                        if (dalTP.Add_Trans(mod))
                        {
                            if (!dal_slab.UpdateTP_Trans(mod_slab.C_ID, mod_slab.C_BATCH_NO))
                            {
                                TransactionHelper.RollBack();
                                return("改判失败,修改钢坯实绩状态时错误!");
                            }
                        }
                        else
                        {
                            TransactionHelper.RollBack();
                            return("改判失败,添加改判记录时错误!");
                        }
                    }
                }

                TransactionHelper.Commit();
            }
            catch (Exception ex)
            {
                TransactionHelper.RollBack();
                return(ex.Message);
            }

            return(result);
        }
        /// <summary>
        /// 钢坯改判
        /// </summary>
        /// <param name="row">选中的数据</param>
        /// <param name="strGrd">钢种</param>
        /// <param name="strStdCode">执行标准</param>
        /// <param name="strMatCode">物料编码</param>
        /// <param name="strMatName">物料描述</param>
        /// <param name="strZrdwID">责任单位代码</param>
        /// <param name="strZrdwName">责任代为描述</param>
        /// <param name="strPDDJ">判定等级</param>
        /// <param name="strRemark">备注</param>
        /// <param name="strUrl">地址</param>
        /// <param name="strZYX1">自由项1</param>
        /// <param name="strZYX2">自由项2</param>
        /// <param name="strGPYY">改判原因</param>
        /// <param name="strLen">定尺</param>
        /// <returns></returns>
        public string GP_Slab(string strs, string strGrd, string strStdCode, string strMatCode, string strMatName, string strZrdwID, string strZrdwName, string strPDDJ, string strRemark, string strUrl, string strZYX1, string strZYX2, string strGPYY, string strLen)
        {
            string result = "1";

            try
            {
                Dal_TSC_SLAB_MAIN          dal_slab      = new Dal_TSC_SLAB_MAIN();
                Dal_TQC_SLAB_COMMUTE       dal_commute   = new Dal_TQC_SLAB_COMMUTE();
                Dal_Interface_NC_SLAB_KC4N dal_interface = new Dal_Interface_NC_SLAB_KC4N();
                Dal_TPB_LGGYK     dalTpbLggyk            = new Dal_TPB_LGGYK();
                Dal_TMO_ORDER     dalTmoOrder            = new Dal_TMO_ORDER();
                Dal_TQD_DESIGN    dalDesign      = new Dal_TQD_DESIGN();
                Dal_TB_STD_CONFIG dalTbStdConfig = new Dal_TB_STD_CONFIG();

                TransactionHelper.BeginTransaction();

                string   strUserID          = RV.UI.UserInfo.userID;
                DateTime time               = RV.UI.ServerTime.timeNow();
                string   stove              = "";
                string   max_C_MASTER_ID    = "";
                string   max_C_GP_BEFORE_ID = "";
                string   max_C_GP_AFTER_ID  = "";
                string   slabCode           = "";
                string   strLGJH            = "";
                string   strDesignNo        = dalDesign.Get_Design_No(strStdCode, strGrd);
                if (string.IsNullOrEmpty(strDesignNo))
                {
                    return("改判失败,没有找到对应的执行标准信息!");
                }
                string[] strs_Slab_ID = strs.Substring(0, strs.Length - 1).Split(',');

                //Mod_TSC_SLAB_MAIN modSlabMain = dal_slab.GetModel(strs_Slab_ID[0]);
                //Mod_TPB_LGGYK modLggyk = dalTpbLggyk.GetModel_Trans(modSlabMain.C_LGJH);

                //if (modLggyk == null)
                //{
                //    TransactionHelper.RollBack();
                //    return "改判失败,获取炼钢记号时错误!";
                //}

                //DataTable dtLGJH = dalTpbLggyk.Get_LGJH(modLggyk.C_BOF_TYPE, modLggyk.C_LF_TYPE, modLggyk.C_RH_TYPE, modLggyk.C_CASTER_TYPE, strStdCode, strGrd).Tables[0];

                //if (dtLGJH.Rows.Count > 1)
                //{
                //    TransactionHelper.RollBack();
                //    return "标准:" + strStdCode + ";钢种:" + strGrd + "找到多个炼钢记号,请核查!";
                //}
                //else if (dtLGJH.Rows.Count == 0)
                //{
                //    TransactionHelper.RollBack();
                //    return "标准:" + strStdCode + ";钢种:" + strGrd + "没有找到炼钢记号!";
                //}

                //strLGJH = dtLGJH.Rows[0]["C_STEEL_SIGN"].ToString();



                DataTable dt = dal_commute.GetList_max().Tables[0];
                max_C_MASTER_ID    = dt.Rows[0]["C_MASTER_ID"].ToString();
                max_C_GP_BEFORE_ID = dt.Rows[0]["C_GP_BEFORE_ID"].ToString();
                max_C_GP_AFTER_ID  = dt.Rows[0]["C_GP_AFTER_ID"].ToString();

                if (string.IsNullOrEmpty(max_C_MASTER_ID))
                {
                    max_C_MASTER_ID = "GPsj" + RV.UI.ServerTime.timeNow().ToString("yyMMdd00001");
                }
                else
                {
                    max_C_MASTER_ID = "GPsj" + (Convert.ToInt64(max_C_MASTER_ID) + 1).ToString();
                }
                if (string.IsNullOrEmpty(max_C_GP_BEFORE_ID))
                {
                    max_C_GP_BEFORE_ID = "GPpq" + RV.UI.ServerTime.timeNow().ToString("yyMMdd00001");
                }
                else
                {
                    max_C_GP_BEFORE_ID = "GPpq" + (Convert.ToInt64(max_C_GP_BEFORE_ID) + 1).ToString();
                }
                if (string.IsNullOrEmpty(max_C_GP_AFTER_ID))
                {
                    max_C_GP_AFTER_ID = "GPph" + RV.UI.ServerTime.timeNow().ToString("yyMMdd00001");
                }
                else
                {
                    max_C_GP_AFTER_ID = "GPph" + (Convert.ToInt64(max_C_GP_AFTER_ID) + 1).ToString();
                }
                Bll_TB_MATRL_MAIN bll_matrl = new Bll_TB_MATRL_MAIN();

                for (int i = 0; i < strs_Slab_ID.Length; i++)
                {
                    Mod_TSC_SLAB_MAIN mod_slab = dal_slab.GetModel(strs_Slab_ID[i]);
                    stove = mod_slab.C_STOVE;
                    if (mod_slab != null)
                    {
                        Mod_TB_MATRL_MAIN mod_matrl = bll_matrl.GetModel(strMatCode);
                        stove    = mod_slab.C_STOVE;
                        slabCode = mod_slab.C_SLABWH_CODE;
                        Mod_TQC_SLAB_COMMUTE mod = new Mod_TQC_SLAB_COMMUTE();
                        mod.C_STA_ID              = mod_slab.C_STA_DESC;
                        mod.C_STOVE               = mod_slab.C_STOVE;
                        mod.C_BATCH_NO            = mod_slab.C_BATCH_NO;
                        mod.N_WGT                 = mod_slab.N_WGT;
                        mod.N_LEN                 = mod_slab.N_LEN;
                        mod.C_STL_GRD_BEFORE      = mod_slab.C_STL_GRD;
                        mod.C_STD_CODE_BEFORE     = mod_slab.C_STD_CODE;
                        mod.C_SPEC_BEFORE         = mod_slab.C_SPEC;
                        mod.C_MAT_CODE_BEFORE     = mod_slab.C_MAT_CODE;
                        mod.C_MAT_DESC_BEFORE     = mod_slab.C_MAT_NAME;
                        mod.C_ZYX1_BEFORE         = mod_slab.C_ZYX1;
                        mod.C_ZYX2_BEFORE         = mod_slab.C_ZYX2;
                        mod.C_JUDGE_LEV_BP_BEFORE = mod_slab.C_MAT_TYPE;
                        mod.D_COMMUTE_DATE        = RV.UI.ServerTime.timeNow();
                        mod.C_STL_GRD_AFTER       = strGrd;
                        mod.C_STD_CODE_AFTER      = strStdCode;
                        mod.C_SPEC_AFTER          = mod_matrl.C_SLAB_SIZE;
                        mod.C_MAT_CODE_AFTER      = strMatCode;
                        mod.C_MAT_DESC_AFTER      = strMatName;
                        mod.C_REASON_DEPMT_ID     = strZrdwID;
                        mod.C_REASON_DEPMT_DESC   = strZrdwName;
                        mod.C_EMP_ID              = RV.UI.UserInfo.UserID;
                        mod.C_REMARK              = strRemark;
                        mod.C_MASTER_ID           = max_C_MASTER_ID;
                        mod.C_GP_BEFORE_ID        = max_C_GP_BEFORE_ID;
                        mod.C_GP_AFTER_ID         = max_C_GP_AFTER_ID;
                        mod.C_ZYX1_AFTER          = strZYX1;
                        mod.C_ZYX2_AFTER          = strZYX2;
                        mod.C_JUDGE_LEV_BP_AFTER  = strPDDJ;
                        mod.C_COMMUTE_REASON      = strGPYY;
                        if (dal_commute.Add_Trans(mod))
                        {
                            if (!dal_slab.Update_Trans(mod_slab.C_ID, mod_slab.C_BATCH_NO, strGrd, strStdCode, strMatCode, strMatName, mod_matrl.C_SLAB_SIZE, max_C_MASTER_ID, max_C_GP_BEFORE_ID, max_C_GP_AFTER_ID, strLGJH, strPDDJ, strZYX1, strZYX2, strGPYY, strLen, strDesignNo))
                            {
                                TransactionHelper.RollBack();
                                return("改判失败,请检查修改后的内容!");
                            }
                        }
                        else
                        {
                            TransactionHelper.RollBack();
                            return("改判失败,添加改判记录时错误!");
                        }
                    }
                }
                string interface_nc = dal_interface.SendXml_GP(strUrl, max_C_MASTER_ID, max_C_GP_BEFORE_ID, max_C_GP_AFTER_ID, slabCode);
                if (interface_nc != "1")
                {
                    TransactionHelper.RollBack();
                    return(interface_nc);
                }
                TransactionHelper.Commit();
            }
            catch (Exception ex)
            {
                TransactionHelper.RollBack();
                return(ex.Message);
            }

            return(result);
        }