Пример #1
0
        //}
        ///// <summary>
        ///// 电芯绑定到托盘
        ///// </summary>
        ///// <returns></returns>
        //public static miBindSFCintoTrayResponse BindingPalletAddress(string sfc)
        //{
        //    miBindSFCintoTrayResponse miBindSFCintoTrayResponseAddress = new miBindSFCintoTrayResponse();

        //    try
        //    {
        //        MiCheckProcessLotServiceClient Client = new MiCheckProcessLotServiceClient();
        //        var uname = Client.ClientCredentials.UserName;
        //        uname.UserName = ConfigureHelp.BindingPalletUser;// "SUP_TEST01";//用户
        //        uname.Password = ConfigureHelp.BindingPalletPassword; //"test12345";//密码
        //        MiBindSFCintoTrayServiceService MiBindSFCintoTrayServiceServiceAddress = new MiBindSFCintoTrayServiceService();
        //        miBindSFCintoTray miBindSFCintoTrayAddress = new miBindSFCintoTray();
        //        MiBindSFCintoTrayServiceServiceAddress.Url = "";
        //        miBindSFCintoTrayAddress.BindSFCintoTrayRequest.site = ConfigureHelp.BindingPalletSite;//所在的站点
        //        miBindSFCintoTrayAddress.BindSFCintoTrayRequest.mode = ND.BindingPallt.ModeTrayMatrix.COLUMNFIRST;//模式
        //        miBindSFCintoTrayAddress.BindSFCintoTrayRequest.position = ConfigureHelp.BindingPalletOperation;//所在的位置
        //        miBindSFCintoTrayAddress.BindSFCintoTrayRequest.trayId = ConfigureHelp.BindingPalletTrayId;//托盘号
        //        miBindSFCintoTrayAddress.BindSFCintoTrayRequest.sfc = sfc;//电芯号号
        //        miBindSFCintoTrayResponseAddress = MiBindSFCintoTrayServiceServiceAddress.miBindSFCintoTray(miBindSFCintoTrayAddress);
        //    }
        //    catch (Exception ex)
        //    {


        //    }
        //    return miBindSFCintoTrayResponseAddress;
        //}
        ///// <summary>
        ///// 获取托盘中的列表
        ///// </summary>
        ///// <returns></returns>
        //public static getCellListByTrayIdResponse ElectricCoreListAddress()
        //{
        //    getCellListByTrayIdResponse getCellListByTrayIdResponseAddress = new getCellListByTrayIdResponse();
        //    try
        //    {
        //        MiCheckProcessLotServiceClient Client = new MiCheckProcessLotServiceClient();
        //        var uname = Client.ClientCredentials.UserName;
        //        uname.UserName = ConfigureHelp.BindingPalletUser;// "SUP_TEST01";//用户
        //        uname.Password = ConfigureHelp.BindingPalletPassword; //"test12345";//密码
        //        CellTestIntegrationServiceService CellTestIntegrationServiceServiceAddress = new CellTestIntegrationServiceService();
        //        CellTestIntegrationServiceServiceAddress.Url = "";

        //        getCellListByTrayId getCellListByTrayIdAddress = new getCellListByTrayId();
        //        getCellListByTrayIdAddress.CellListRequest.site = "";//所在的站点
        //        getCellListByTrayIdAddress.CellListRequest.processLot = "";//托盘号
        //        getCellListByTrayIdAddress.CellListRequest.mode = ND.CoreList.ModeTrayMatrix.COLUMNFIRST;
        //        getCellListByTrayIdResponseAddress = CellTestIntegrationServiceServiceAddress.getCellListByTrayId(getCellListByTrayIdAddress);

        //    }
        //    catch (Exception ex)
        //    {

        //    }
        //    return getCellListByTrayIdResponseAddress;
        //}



        //
        /// <summary>
        ///  WebService接口参数配置:获取托盘中电芯列表
        /// </summary>
        /// <param name="barcode">小车条形码</param>
        /// <param name="resource">资源号</param>
        /// <param name="door">门</param>
        /// <returns></returns>
        public static getCellListByTrayIdResponse ChargeNumberAddess(string barcode, string resource, int door)
        {
            CellTestIntegrationServiceService cell    = new CellTestIntegrationServiceService();
            getCellListByTrayIdResponse       getCell = new getCellListByTrayIdResponse();

            try
            {
                cell.Url         = ConfigureHelp.ElectricCoreMES_WSDL;                                                                          //"http://172.26.11.3:50000/atlmeswebservice/CellTestIntegrationServiceService?wsdl";
                cell.Timeout     = ConfigureHelp.ElectricCoreTimeOut;                                                                           //超时时间
                cell.Credentials = new System.Net.NetworkCredential(ConfigureHelp.ElectricCoreUser, ConfigureHelp.ElectricCoretPassword, null); //Baiduhai7     //验证信息
                getCellListByTrayId getId = new getCellListByTrayId();

                cellListRequest cellListRequest = new cellListRequest();
                cellListRequest.site = ConfigureHelp.ElectricCoreSite;

                cellListRequest.processLot = barcode;//托盘号;
                cellListRequest.mode       = ND.CoreList.ModeTrayMatrix.ROWFIRST;
                getId.CellListRequest      = cellListRequest;
                getCell = cell.getCellListByTrayId(getId);
            }
            catch (Exception ex)
            {
                ConfigureHelp.SaveInfoToCSVFile(barcode, door.ToString(), resource, ex.Message);
                Common.Msg.Warning("MES返回报错:" + ex.Message);//返回信息
            }
            return(getCell);
        }
Пример #2
0
        public static int  SolitaryHandbarrow2(string HandbarrowBarCode2)
        {
            DateTime beginTime = DateTime.Now;
            DateTime endTime   = DateTime.Now;
            TimeSpan timeS     = new TimeSpan();

            try
            {
                getCell = Interface.ChargeNumberAddess(HandbarrowBarCode2, Number, DoorInfo); //调用接口
                Meg     = [email protected];                                            //返回信息
                Code    = [email protected];                                               //code
            }
            catch (Exception ex)
            {
                Meg  = ex.Message;
                Code = 1001;
            }
            finally
            {
                if (string.IsNullOrEmpty(Meg) && [email protected] == 0)
                {
                    BarcodeList2 = "";
                    endTime      = DateTime.Now;
                    timeS        = endTime - beginTime;
                    ControlHelp.ControlHelp.listBoxInfo("MES返回:" + [email protected] + "信息:" + [email protected] + "  耗时:" + timeS.Milliseconds.ToString());//返回信息
                    List <string> list = strToNull([email protected]);
                    for (int i = 0; i < list.Count; i++)
                    {
                        BarcodeList2 += list[i] + ",";
                    }
                    if (!string.IsNullOrEmpty(BarcodeList2))
                    {
                        BarcodeList2 = InterceptStringHelp.Delectlast(BarcodeList2);
                        //写CSV文件
                        ConfigureHelp.SaveInfoToCSVFileAtLog(beginTime.ToString("yyyy-MM-dd hh:mm:ss"), endTime.ToString("yyyy-MM-dd hh:mm:ss"), timeS.TotalMilliseconds.ToString(),
                                                             string.Format("开始时间代码Error [BeginTime]({0}、{1})", HandbarrowBarCode2, Number),
                                                             Code + "", Meg, 1);
                    }
                }
                else
                {
                    ControlHelp.ControlHelp.listBoxInfo("MES返回:" + [email protected] + "信息:" + [email protected] + "  耗时:" + timeS.Milliseconds.ToString());//返回信息
                    //写CSV文件
                    ConfigureHelp.SaveInfoToCSVFileAtLog(beginTime.ToString("yyyy-MM-dd hh:mm:ss"), endTime.ToString("yyyy-MM-dd hh:mm:ss"), timeS.TotalMilliseconds.ToString(),
                                                         string.Format("开始时间代码Error [BeginTime]({0}、{1})", HandbarrowBarCode2, Number),
                                                         Code + "", Meg, 1);
                    Common.Msg.Warning("条码号:" + HandbarrowBarCode2 + "获取小车内的托盘失败,请重新两个绑定小车");
                }
                //扫到的条形码写入数据库
                string Sql = string.Format(@"UPDATE [db_ND10L].[dbo].[dbo.tb_RnuInfo] SET  Barcode2 ='{0}',BarcodeInclude2='{1}'  WHERE Door='{2}'", HandbarrowBarCode2, BarcodeList2, DoorInfo);
                SqlServerHelp.ExecuteSql(Sql);
            }
            return(Code);
        }
Пример #3
0
 /// <summary>
 /// 开机自检接口
 /// </summary>
 /// <param name="HandbarrowBarCode"></param>
 public static void  CheckupMES(string HandbarrowBarCode = null)
 {
     try
     {
         getCell = Interface.ChargeNumberAddess(HandbarrowBarCode, SySetHeip.ResourceNumberOne, 1);//调用接口
         if (getCell.@return == null)
         {
             Common.Msg.Warning("MES开机自检失败,请检查");
         }
     }
     catch (Exception) { }
 }