Exemplo n.º 1
0
        private Vehicle_18W06_Result Query_18W06(Vehicle_18W06_Para para_18W06)
        {
            AJ_ReadProcess       readProcess  = new AJ_ReadProcess();
            Vehicle_18W06_Result result_18W06 = readProcess.AJ_Read_18W06(para_18W06);

            return(result_18W06);
        }
Exemplo n.º 2
0
        private Vehicle_18W06_Para Para_18W06_ToModel(ParaParent para, string strPataContent)
        {
            Vehicle_18W06_Para _para = (Vehicle_18W06_Para)para;
            ModelReflection    _mr   = new ModelReflection();

            _para = _mr.ParaSetModelValue(_para, "QueryCondition", strPataContent);
            return(_para);
        }
Exemplo n.º 3
0
        public Vehicle_18W06_Result AJ_Read_18W06(Vehicle_18W06_Para para)
        {
            Vehicle_18W06_Result _18W06_RESULT = new Vehicle_18W06_Result();
            AJ_IRead             aj_18W06      = new AJ_Read_WebServices();

            _18W06_RESULT = aj_18W06.Read_18W06(para);
            return(_18W06_RESULT);
        }
Exemplo n.º 4
0
        private string Para_18W06_ToXml(ParaParent para)
        {
            Vehicle_18W06_Para _18W06_Para = (Vehicle_18W06_Para)para;
            ModelReflection    _mr         = new ModelReflection();
            string             _result     = _mr.ParaModelToXML(_18W06_Para, "QueryCondition");

            return(_result);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Dictionary change to 18C51 Para
        /// </summary>
        /// <param name="dic"></param>
        /// <returns></returns>
        private Vehicle_18W06_Para Get_18W06_FromDic(Dictionary <string, string> dic)
        {
            ModelReflection    m_ModelReflection = new ModelReflection();
            Vehicle_18W06_Para m_18W06_Para      = new Vehicle_18W06_Para();

            m_18W06_Para = m_ModelReflection.DictionaryToModel(m_18W06_Para, dic);

            return(m_18W06_Para);
        }
Exemplo n.º 6
0
        public string queryObjectOut(string xtlb, string jkxlh, string jkid, string xmlDoc)
        {
            AJ_ReadProcess readProcess = new AJ_ReadProcess();
            AJ_XMLToModel  xmlToModel  = new AJ_XMLToModel();
            AJ_ModelToXML  modelToXML  = new AJ_ModelToXML();

            switch (jkid)
            {
            case "18J52":
                Vehicle_18J52_Para para_18J52 = new Vehicle_18J52_Para(jkid, jkxlh, xtlb);
                para_18J52 = (Vehicle_18J52_Para)xmlToModel.Para_XmlToModel(para_18J52, xmlDoc);

                Vehicle_18J52_Result result_18J52 = readProcess.AJ_Read_18J52(para_18J52);

                string strRet_18J52 = modelToXML.ModelToXml("18J52", result_18J52);
                return(strRet_18J52);

            case "18C49":
                Vehicle_18C49_Para para_18C49 = new Vehicle_18C49_Para(jkid, jkxlh, xtlb);
                para_18C49 = (Vehicle_18C49_Para)xmlToModel.Para_XmlToModel(para_18C49, xmlDoc);

                Vehicle_18C49_Result result_18C49 = readProcess.AJ_Read_18C49(para_18C49);

                string strRet_18C49 = modelToXML.ModelToXml("18C49", result_18C49);
                return(strRet_18C49);

            case "18C50":
                Vehicle_18C50_Para para_18C50 = new Vehicle_18C50_Para(jkid, jkxlh, xtlb);
                para_18C50 = (Vehicle_18C50_Para)xmlToModel.Para_XmlToModel(para_18C50, xmlDoc);

                Vehicle_18C50_Result result_18C50 = readProcess.AJ_Read_18C50(para_18C50);

                string strRet_18C50 = modelToXML.ModelToXml("18C50", result_18C50);
                return(strRet_18C50);

            case "18J80":
                Vehicle_18J80_Para para_18J80 = new Vehicle_18J80_Para(jkid, jkxlh, xtlb);
                para_18J80 = (Vehicle_18J80_Para)xmlToModel.Para_XmlToModel(para_18J80, xmlDoc);

                Vehicle_18J80_Result result_18J80 = readProcess.AJ_Read_18J80(para_18J80);

                string strRet_18J80 = modelToXML.ModelToXml("18J80", result_18J80);
                return(strRet_18J80);

            case "18W06":
                Vehicle_18W06_Para para_18W06 = new Vehicle_18W06_Para();
                para_18W06 = (Vehicle_18W06_Para)xmlToModel.Para_XmlToModel(para_18W06, xmlDoc);
                Vehicle_18W06_Result result_18W06 = readProcess.AJ_Read_18W06(para_18W06);
                string strRet_18W06 = modelToXML.ModelToXml("18W06", result_18W06);
                return(strRet_18W06);

            default:
                break;
            }

            return("");
        }
Exemplo n.º 7
0
        public ReturnInfo QueryByJKId(QueryCondition queryCondition)
        {
            ReturnInfo retInfo = new ReturnInfo();

            try
            {
                string strJKID = queryCondition.DicQueryPara["jkid"];
                switch (strJKID)
                {
                case "18W06":
                    Vehicle_18W06_Para m_18W06 = Get_18W06_FromDic(queryCondition.DicQueryPara);

                    Vehicle_18W06_Result m_Result_18W06 = Query_18W06(m_18W06);
                    retInfo.IsSucessful = m_Result_18W06.code == "1" ? true : false;
                    if (retInfo.IsSucessful)
                    {
                        Dictionary <string, string> dicRet = new Dictionary <string, string>();
                        dicRet.Add("jclsh ", m_Result_18W06.jclsh);
                        dicRet.Add("sbbh", m_Result_18W06.sbbh);
                        dicRet.Add("hpzl", m_Result_18W06.hpzl);
                        dicRet.Add("hphm", m_Result_18W06.hphm);
                        dicRet.Add("lsh", m_Result_18W06.lsh);
                        dicRet.Add("jycs", m_Result_18W06.jycs);
                        dicRet.Add("jyxm", m_Result_18W06.jyxm);
                        dicRet.Add("clsbdh", m_Result_18W06.clsbdh);
                        dicRet.Add("cllx", m_Result_18W06.cllx);
                        if (m_Result_18W06.zll != null)
                        {
                            dicRet.Add("zll", m_Result_18W06.zll.ToString());
                        }
                        if (m_Result_18W06.zs != null)
                        {
                            dicRet.Add("zs", m_Result_18W06.zs.ToString());
                        }

                        dicRet.Add("success", m_Result_18W06.success);
                        dicRet.Add("bzwkc", m_Result_18W06.bzwkc.ToString());
                        dicRet.Add("bzwkg", m_Result_18W06.bzwkg.ToString());
                        dicRet.Add("bzwkk", m_Result_18W06.bzwkk.ToString());
                        if (m_Result_18W06.clwkc != null)
                        {
                            dicRet.Add("clwkc", m_Result_18W06.clwkc.ToString());
                        }
                        if (m_Result_18W06.clwkg != null)
                        {
                            dicRet.Add("clwkg", m_Result_18W06.clwkg.ToString());
                        }
                        if (m_Result_18W06.clwkk != null)
                        {
                            dicRet.Add("clwkk", m_Result_18W06.clwkk.ToString());
                        }
                        if (m_Result_18W06.wkcjdwc != null)
                        {
                            dicRet.Add("wkcjdwc", m_Result_18W06.wkcjdwc.ToString());
                        }
                        if (m_Result_18W06.wkcxdwc != null)
                        {
                            dicRet.Add("wkcxdwc", m_Result_18W06.wkcxdwc.ToString());
                        }
                        if (m_Result_18W06.wkgjdwc != null)
                        {
                            dicRet.Add("wkgjdwc", m_Result_18W06.wkgjdwc.ToString());
                        }
                        if (m_Result_18W06.wkgxdwc != null)
                        {
                            dicRet.Add("wkgxdwc", m_Result_18W06.wkgxdwc.ToString());
                        }
                        if (m_Result_18W06.wkkjdwc != null)
                        {
                            dicRet.Add("wkkjdwc", m_Result_18W06.wkkjdwc.ToString());
                        }
                        if (m_Result_18W06.wkkxdwc != null)
                        {
                            dicRet.Add("wkkxdwc", m_Result_18W06.wkkxdwc.ToString());
                        }

                        dicRet.Add("clwkcpd", m_Result_18W06.clwkcpd.ToString());
                        dicRet.Add("clwkgpd", m_Result_18W06.clwkgpd.ToString());
                        dicRet.Add("clwkkpd", m_Result_18W06.clwkkpd.ToString());
                        if (m_Result_18W06.bzlbgd != null)
                        {
                            dicRet.Add("bzlbgd", m_Result_18W06.bzlbgd.ToString());
                        }
                        if (m_Result_18W06.cllbgd != null)
                        {
                            dicRet.Add("cllbgd", m_Result_18W06.cllbgd.ToString());
                        }
                        if (m_Result_18W06.lbgdjdwc != null)
                        {
                            dicRet.Add("lbgdjdwc", m_Result_18W06.lbgdjdwc.ToString());
                        }
                        if (m_Result_18W06.lbgdxdwc != null)
                        {
                            dicRet.Add("lbgdxdwc", m_Result_18W06.lbgdxdwc.ToString());
                        }
                        dicRet.Add("lbgdpd", m_Result_18W06.lbgdpd.ToString());
                        if (m_Result_18W06.zj1 != null)
                        {
                            dicRet.Add("zj1", m_Result_18W06.zj1.ToString());
                        }
                        if (m_Result_18W06.zj2 != null)
                        {
                            dicRet.Add("zj2", m_Result_18W06.zj2.ToString());
                        }
                        if (m_Result_18W06.zj3 != null)
                        {
                            dicRet.Add("zj3", m_Result_18W06.zj3.ToString());
                        }
                        if (m_Result_18W06.zj4 != null)
                        {
                            dicRet.Add("zj4", m_Result_18W06.zj4.ToString());
                        }

                        dicRet.Add("qx", m_Result_18W06.qx.ToString());
                        dicRet.Add("hx", m_Result_18W06.hx.ToString());
                        dicRet.Add("jckssj", m_Result_18W06.jckssj.ToString());
                        dicRet.Add("jcjssj", m_Result_18W06.jcjssj.ToString());
                        dicRet.Add("jcrq", m_Result_18W06.jcrq.ToString());
                        dicRet.Add("zcpd", m_Result_18W06.zcpd.ToString());
                        dicRet.Add("wkcwcxz", m_Result_18W06.wkcwcxz.ToString());
                        dicRet.Add("wkkwcxz", m_Result_18W06.wkkwcxz.ToString());
                        dicRet.Add("wkgwcxz", m_Result_18W06.wkgwcxz.ToString());

                        retInfo.DicRet = dicRet;
                    }
                    else
                    {
                        retInfo.Message = m_Result_18W06.message;
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                retInfo.IsSucessful = false;
                retInfo.Message     = ex.Message;
            }

            return(retInfo);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 查詢外廓尺寸測量結果
        /// </summary>
        /// <param name="para"></param>
        /// <returns></returns>
        public Vehicle_18W06_Result Read_18W06(Vehicle_18W06_Para para)
        {
            Vehicle_18W06_Result _RESULT_18W06 = new Vehicle_18W06_Result();

            try
            {
                AJ_ModelToXML model2XML    = new AJ_ModelToXML();
                string        _QueryXMLDoc = model2XML.ModelToXml("18W06", para);

                string strResult = "";

                var client = new VehicleForNetWebService.ctwkService.JcxlwServerSoapClient();

                client.Open();
                client.InnerChannel.OperationTimeout = new TimeSpan(0, 0, TimeOut);
                strResult = client.queryObjectOut(para.xtlb, para.jkxlh, para.jkid, _QueryXMLDoc);
                if (client.State != System.ServiceModel.CommunicationState.Closed || client.State != System.ServiceModel.CommunicationState.Closing)
                {
                    client.Close();
                }

                AJ_XMLToModel xmlToModel = new AJ_XMLToModel();
                _RESULT_18W06 = (Vehicle_18W06_Result)xmlToModel.Result_XmlToModel("18W06", strResult);

                #region 联网日志记录
                NETLOG_INFO log = new NETLOG_INFO();
                log.LWLSH    = para.lsh;
                log.JYXM     = "DC";
                log.LWType   = "AJ";
                log.SendInfo = _QueryXMLDoc;
                log.RevcInfo = strResult;
                log.JKName   = para.jkid;
                if (_RESULT_18W06 == null || string.IsNullOrEmpty(_RESULT_18W06.code))
                {
                    log.IsSuc = "0";
                }
                else
                {
                    log.IsSuc = _RESULT_18W06.code;
                }
                log.LogTime = DateTime.Now;

                bool b = LogHelper.Log.WriteJKLog(log);
                #endregion
            }
            catch (Exception ex)
            {
                string   strCategory = Log.LogType.NetFail.ToString();
                LOG_INFO logInfo     = new LOG_INFO();
                logInfo.Category  = strCategory;
                logInfo.HostName  = System.Net.Dns.GetHostName();
                logInfo.IPAddress = System.Net.Dns.GetHostAddresses(logInfo.HostName).GetValue(1).ToString();
                logInfo.LogTime   = DateTime.Now;
                logInfo.FS_Infor  = "";
                logInfo.JS_Infor  = "";
                logInfo.Log_Infor = "18X03->" + ex.Message;
                logInfo.Name      = "上传下载";
                logInfo.FunName   = "AJ_Read_WebServices.cs -> Read_18W06";

                Log.WriteLog(logInfo);
            }

            return(_RESULT_18W06);
        }