Esempio n. 1
0
        private string Result_18J80_ToXml(ResultParent result)
        {
            Vehicle_18J80_Result m_18J80_Result = (Vehicle_18J80_Result)result;
            ModelReflection      mR             = new ModelReflection();
            string strRet = mR.ResultModelToXML(m_18J80_Result, "vehispara");

            return(strRet);
        }
Esempio n. 2
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("");
        }
Esempio n. 3
0
        /// <summary>
        /// 18J80 Result
        /// </summary>
        /// <param name="result"></param>
        /// <param name="strResultContent"></param>
        /// <returns></returns>
        private Vehicle_18J80_Result Result_18J80_ToModel(ResultParent result, string strResultContent)
        {
            Vehicle_18J80_Result m_Result = (Vehicle_18J80_Result)result;

            if (string.IsNullOrEmpty(strResultContent))
            {
                m_Result.code    = "0";
                m_Result.message = "";
                return(m_Result);
            }
            ModelReflection mR = new ModelReflection();

            m_Result = mR.ResultSetModelValue(m_Result, "vehispara", strResultContent);

            return(m_Result);
        }
Esempio n. 4
0
        public ResultParent Result_XmlToModel(string strType, string strResultContent)
        {
            switch (strType)
            {
            case "18C49":
                Vehicle_18C49_Result m_18C49_result = new Vehicle_18C49_Result();
                m_18C49_result = Result_18C49_ToModel(m_18C49_result, strResultContent);
                return(m_18C49_result);

            case "18C50":
                Vehicle_18C50_Result m_18C50_result = new Vehicle_18C50_Result();
                m_18C50_result = Result_18C50_ToModel(m_18C50_result, strResultContent);
                return(m_18C50_result);

            case "18J11":
                Vehicle_18J11_Result m_18J11_result = new Vehicle_18J11_Result();
                m_18J11_result = Result_18J11_ToModel(m_18J11_result, strResultContent);
                return(m_18J11_result);

            case "18J12":
                Vehicle_18J12_Result m_18J12_result = new Vehicle_18J12_Result();
                m_18J12_result = Result_18J12_ToModel(m_18J12_result, strResultContent);
                return(m_18J12_result);

            case "18J52":
                Vehicle_18J52_Result m_18J52_result = new Vehicle_18J52_Result();
                m_18J52_result = Result_18J52_ToModel(m_18J52_result, strResultContent);
                return(m_18J52_result);

            case "18C66":
                Vehicle_18C66_Result m_18C66_result = new Vehicle_18C66_Result();
                m_18C66_result = Result_18C66_ToModel(m_18C66_result, strResultContent);
                return(m_18C66_result);

            case "18C82":
                Vehicle_18C82_Result m_18C82_result = new Vehicle_18C82_Result();
                m_18C82_result = Result_18C82_ToModel(m_18C82_result, strResultContent);
                return(m_18C82_result);

            case "18C55":
                Vehicle_18C55_Result m_18C55_result = new Vehicle_18C55_Result();
                m_18C55_result = Result_18C55_ToModel(m_18C55_result, strResultContent);
                return(m_18C55_result);

            case "18C58":
                Vehicle_18C58_Result m_18C58_result = new Vehicle_18C58_Result();
                m_18C58_result = Result_18C58_ToModel(m_18C58_result, strResultContent);
                return(m_18C58_result);

            case "18C80":
                Vehicle_18C80_Result m_18C80_result = new Vehicle_18C80_Result();
                m_18C80_result = Result_18C80_ToModel(m_18C80_result, strResultContent);
                return(m_18C80_result);

            case "18C81":
                Vehicle_18C81_Result m_18C81_result = new Vehicle_18C81_Result();
                m_18C81_result = Result_18C81_ToModel(m_18C81_result, strResultContent);
                return(m_18C81_result);

            case "18J31":
                Vehicle_18J31_Result m_18J31_result = new Vehicle_18J31_Result();
                m_18J31_result = Result_18J31_ToModel(m_18J31_result, strResultContent);
                return(m_18J31_result);

            case "18C62":
                Vehicle_18C62_Result m_18C62_result = new Vehicle_18C62_Result();
                m_18C62_result = Result_18C62_ToModel(m_18C62_result, strResultContent);
                return(m_18C62_result);

            case "18C59":
                Vehicle_18C59_Result m_18C59_result = new Vehicle_18C59_Result();
                m_18C59_result = Result_18C59_ToModel(m_18C59_result, strResultContent);
                return(m_18C59_result);

            case "18C65":
                Vehicle_18C65_Result m_18C65_result = new Vehicle_18C65_Result();
                m_18C65_result = Result_18C65_ToModel(m_18C65_result, strResultContent);
                return(m_18C65_result);

            case "18C51":
                Vehicle_18C51_Result m_18C51_result = new Vehicle_18C51_Result();
                m_18C51_result = Result_18C51_ToModel(m_18C51_result, strResultContent);
                return(m_18C51_result);

            case "18C52":
                Vehicle_18C52_Result m_18C52_result = new Vehicle_18C52_Result();
                m_18C52_result = Result_18C52_ToModel(m_18C52_result, strResultContent);
                return(m_18C52_result);

            case "18C72":
                Vehicle_18C72_Result m_18C72_result = new Vehicle_18C72_Result();
                m_18C72_result = Result_18C72_ToModel(m_18C72_result, strResultContent);
                return(m_18C72_result);

            case "18J80":
                Vehicle_18J80_Result m_18J80_result = new Vehicle_18J80_Result();
                m_18J80_result = Result_18J80_ToModel(m_18J80_result, strResultContent);
                return(m_18J80_result);

            case "18X01":
                Vehicle_18X01_Result m_18X01_result = new Vehicle_18X01_Result();
                m_18X01_result = Result_18X01_ToModel(m_18X01_result, strResultContent);
                return(m_18X01_result);

            case "18X02":
                Vehicle_18X02_Result m_18X02_result = new Vehicle_18X02_Result();
                m_18X02_result = Result_18X02_ToModel(m_18X02_result, strResultContent);
                return(m_18X02_result);

            case "18X03":
                Vehicle_18X03_Result m_18X03_result = new Vehicle_18X03_Result();
                m_18X03_result = Result_18X03_ToModel(m_18X03_result, strResultContent);
                return(m_18X03_result);

            case "18C54":
                Vehicle_18C54_Result m_18C54_result = new Vehicle_18C54_Result();
                m_18C54_result = Result_18C54_ToModel(m_18C54_result, strResultContent);
                return(m_18C54_result);

            case "18X04":
                Vehicle_18X04_Result m_18X04_result = new Vehicle_18X04_Result();
                m_18X04_result = Result_18X04_ToModel(m_18X04_result, strResultContent);
                return(m_18X04_result);

            case "18C63":
                Vehicle_18C63_Result m_18C63_result = new Vehicle_18C63_Result();
                m_18C63_result = Result_18C63_ToModel(m_18C63_result, strResultContent);
                return(m_18C63_result);

            case "18X05":
                Vehicle_18X05_Result m_18X05_result = new Vehicle_18X05_Result();
                m_18X05_result = Result_18X05_ToModel(m_18X05_result, strResultContent);
                return(m_18X05_result);

            case "18W05":
                Vehicle_18W05_Result m_18W05_result = new Vehicle_18W05_Result();
                m_18W05_result = Result_18W05_ToModel(m_18W05_result, strResultContent);
                return(m_18W05_result);

            case "18W06":
                Vehicle_18W06_Result m_18W06_result = new Vehicle_18W06_Result();
                m_18W06_result = Result_18W06_ToModel(m_18W06_result, strResultContent);
                return(m_18W06_result);
            }

            return(null);
        }
Esempio n. 5
0
        public Vehicle_18J80_Result AJ_Read_18J80(Vehicle_18J80_Para para)
        {
            Vehicle_18J80_Result aj_18J80_Result = new Vehicle_18J80_Result();
            AJ_IRead             aj_18J80        = new AJ_Read_WebServices();
            AdapterHelper        adapter         = new AdapterHelper();

#if RZLD
            string[] strAryJYXM;
            if (para.jyxm.Contains(","))
            {
                strAryJYXM = para.jyxm.Split(',');
            }
            else
            {
                strAryJYXM    = new string[1];
                strAryJYXM[0] = para.jyxm;
            }


            Vehicle_18X01_Para m_18X01_Para = null;
            Vehicle_18X02_Para m_18X02_Para = null;
            Vehicle_18X03_Para m_18X03_Para = null;

            if (strAryJYXM.Contains("F1"))
            {
                m_18X01_Para        = new Vehicle_18X01_Para("18X01", para.jkxlh, para.xtlb);
                m_18X01_Para.cllx   = para.cllx;
                m_18X01_Para.clsbdh = para.clsbdh;
                m_18X01_Para.hphm   = para.hphm;
                m_18X01_Para.hpzl   = para.hpzl;
                m_18X01_Para.jycs   = para.jycs;
                m_18X01_Para.jyjgbh = para.jyjgbh;
                m_18X01_Para.jylsh  = para.jylsh;
            }

            if (strAryJYXM.Contains("C1"))
            {
                m_18X02_Para        = new Vehicle_18X02_Para("18X02", para.jkxlh, para.xtlb);
                m_18X02_Para.cllx   = para.cllx;
                m_18X02_Para.clsbdh = para.clsbdh;
                m_18X02_Para.hphm   = para.hphm;
                m_18X02_Para.hpzl   = para.hpzl;
                m_18X02_Para.jycs   = para.jycs;
                m_18X02_Para.jyjgbh = para.jyjgbh;
                m_18X02_Para.jylsh  = para.jylsh;
            }

            if (strAryJYXM.Contains("DC"))
            {
                m_18X03_Para        = new Vehicle_18X03_Para("18X03", para.jkxlh, para.xtlb);
                m_18X03_Para.cllx   = para.cllx;
                m_18X03_Para.clsbdh = para.clsbdh;
                m_18X03_Para.hphm   = para.hphm;
                m_18X03_Para.hpzl   = para.hpzl;
                m_18X03_Para.jycs   = para.jycs;
                m_18X03_Para.jyjgbh = para.jyjgbh;
                m_18X03_Para.jylsh  = para.jylsh;
            }

            Func <object, ResultParent> action = (object obj) =>
            {
                ResultParent result = null;
                if (obj is Vehicle_18X01_Para && m_18X01_Para != null)
                {
                    result = aj_18J80.Read_18X01(m_18X01_Para);
                }
                else if (obj is Vehicle_18X02_Para && m_18X02_Para != null)
                {
                    //result = aj_18J80.Read_18X02(m_18X02_Para);
                }
                else if (obj is Vehicle_18X03_Para && m_18X03_Para != null)
                {
                    result = aj_18J80.Read_18X03(m_18X03_Para);
                }
                return(result);
            };


            Task <ResultParent> tk_18X01 = Task.Factory.StartNew(action, m_18X01_Para);
            Task <ResultParent> tk_18X02 = Task.Factory.StartNew(action, m_18X02_Para);
            Task <ResultParent> tk_18X03 = Task.Factory.StartNew(action, m_18X03_Para);

            Task <ResultParent>[] tasks = new Task <ResultParent>[3] {
                tk_18X01, tk_18X02, tk_18X03
            };
            Task.WaitAll(tasks);

            aj_18J80_Result.jkid  = para.jkid;
            aj_18J80_Result.jkxlh = para.jkxlh;
            aj_18J80_Result.xtlb  = para.xtlb;

            bool bIsSuc = true;
            for (int i = 0; i < 3; i++)
            {
                var vResult = tasks[i].Result;
                if (vResult != null)
                {
                    if (vResult is Vehicle_18X01_Result)
                    {
                        Vehicle_18X01_Result m_18X01_Result = (Vehicle_18X01_Result)vResult;
                        aj_18J80_Result.rgjybhgx = adapter.UpdateWJDP_Net_To_IY(m_18X01_Result.pre_GaWjfjx);
                        aj_18J80_Result.rgjybjcx = adapter.UpdateWJDP_Net_To_IY(m_18X01_Result.pre_GawjPbx);

                        aj_18J80_Result.wgjcczy = m_18X01_Result.ass_wjy;
                        if (m_18X01_Result.code != "1")
                        {
                            aj_18J80_Result.message = " 外检失败 ";
                            bIsSuc = false;
                        }
                        else
                        {
                            if (string.IsNullOrEmpty(m_18X01_Result.ass_wjy))
                            {
                                bIsSuc = false;
                                aj_18J80_Result.message = " 外检未检 ";
                            }
                            else
                            {
                                aj_18J80_Result.message = " 外检成功 ";
                            }
                        }
                    }
                    else if (vResult is Vehicle_18X02_Result)
                    {
                        Vehicle_18X02_Result m_18X02_Result = (Vehicle_18X02_Result)vResult;


                        aj_18J80_Result.dgjybhgx = adapter.UpdateWJDP_Net_To_IY(m_18X02_Result.pre_GaDjfjx);
                        aj_18J80_Result.dgjybjcx = adapter.UpdateWJDP_Net_To_IY(m_18X02_Result.pre_GaDjpbx);
                        aj_18J80_Result.dpbjczy  = m_18X02_Result.ass_xfjcy;

                        if (m_18X02_Result.code != "1")
                        {
                            bIsSuc = false;
                            aj_18J80_Result.message += "  底盘部件失败 ";
                        }
                        else
                        {
                            if (string.IsNullOrEmpty(m_18X02_Result.ass_xfjcy))
                            {
                                bIsSuc = false;
                                aj_18J80_Result.message += " 底盘部件未检 ";
                            }
                            else
                            {
                                aj_18J80_Result.message += "  底盘部件成功 ";
                            }
                        }
                    }
                    else if (vResult is Vehicle_18X03_Result)
                    {
                        Vehicle_18X03_Result m_18X03_Result = (Vehicle_18X03_Result)vResult;

                        aj_18J80_Result.dgjybhgx += adapter.UpdateWJDP_Net_To_IY(m_18X03_Result.pre_GaDpdtfjx);
                        aj_18J80_Result.dgjybjcx += adapter.UpdateWJDP_Net_To_IY(m_18X03_Result.pre_GaDpdtpbx);
                        aj_18J80_Result.dtdpczy   = m_18X03_Result.diPDTJCY;

                        if (m_18X03_Result.code != "1")
                        {
                            bIsSuc = false;
                            aj_18J80_Result.message += "  动态底盘失败 ";
                        }
                        else
                        {
                            if (string.IsNullOrEmpty(m_18X03_Result.diPDTJCY))
                            {
                                bIsSuc = false;
                                aj_18J80_Result.message += " 动态底盘未检 ";
                            }
                            else
                            {
                                aj_18J80_Result.message += "  动态底盘成功 ";
                            }
                        }
                    }
                }
            }

            aj_18J80_Result.code = bIsSuc ? "1" : "0";
#endif

            return(aj_18J80_Result);
        }
Esempio n. 6
0
        public Vehicle_18J80_Result Read_18J80(Vehicle_18J80_Para para)
        {
            Vehicle_18J80_Result m_Vehicle_18J80_Result = new Vehicle_18J80_Result();

            return(m_Vehicle_18J80_Result);
        }