예제 #1
0
파일: Class81.cs 프로젝트: hkloudou/HX-Base
 public byte[] method_13(byte[] byte_0, string string_0)
 {
     byte[] array = new byte[byte_0.Length];
     if (!string.IsNullOrEmpty(string_0) && (byte_0.Length >= 1))
     {
         string text1 = string_0 + "#";
         try
         {
             byte_0.CopyTo(array, 0);
             Class100 class2   = new Class100();
             string[] strArray = string_0.Split(new char[] { ';' });
             if ((strArray != null) && (strArray.Length >= 1))
             {
                 array = this.method_16(array, new byte[] { Convert.ToByte(strArray.Length) });
                 for (int i = 0; i < strArray.Length; i++)
                 {
                     string[] strArray2 = strArray[i].Split(new char[] { ',' });
                     if ((strArray2 != null) && (strArray2.Length > 0))
                     {
                         Class96 class3 = new Class96 {
                             FPDM = strArray2[0],
                             FPNO = strArray2[1]
                         };
                         class3 = class2.method_3(Class97.dataTable_0, class3.FPNO, class3.FPDM);
                         string dZSYH = "0";
                         if ((class3 != null) && !string.IsNullOrEmpty(class3.DZSYH))
                         {
                             dZSYH = class3.DZSYH;
                             Class101.smethod_0("组装密文地址索引号:fpdm:" + strArray2[0] + "   fphm:" + strArray2[1] + "   dzsyh:" + dZSYH);
                         }
                         else
                         {
                             Class101.smethod_0("组装密文地址索引号--fprow为null或者空:fpdm:" + strArray2[0] + "   fphm:" + strArray2[1]);
                             dZSYH = this.method_12(strArray2[1], strArray2[0]);
                             if (string.IsNullOrEmpty(dZSYH))
                             {
                                 Class101.smethod_0("组装密文无地址索引号--补0:fpdm:" + strArray2[0] + "   fphm:" + strArray2[1]);
                                 dZSYH = "0";
                             }
                         }
                         byte[] bytes = BitConverter.GetBytes(Convert.ToInt32(dZSYH));
                         bytes = this.method_17(bytes);
                         array = this.method_16(array, bytes);
                     }
                 }
                 return(array);
             }
             Class101.smethod_1("(发票下载)组装地址索引号异常:受理序列号为空");
             return(array);
         }
         catch (Exception exception)
         {
             Class101.smethod_1("(发票下载)组装地址索引号异常:" + exception.ToString());
             array = byte_0;
         }
         return(array);
     }
     Class101.smethod_1("(发票下载)组装地址索引号异常:受理序列号为空");
     return(array);
 }
예제 #2
0
 public void method_1(bool bool_2, bool bool_3)
 {
     try
     {
         this.dateTime_0 = DateTime.Now;
         string str = string.Empty;
         if (bool_2 || (Class97.dataTable_0.Rows.Count < Class87.int_0))
         {
             if (((Class94.dictionary_0 != null) && bool_2) && (HttpsSender.TestConnect(Class94.dictionary_0, out str) != 0))
             {
                 Class101.smethod_0("(发票上传)不进行发票上传,原因:" + str);
             }
             else
             {
                 Class101.smethod_0("(上传线程)开始,是否在主线程运行:" + bool_2);
                 this.method_0(bool_2, bool_3, string.Empty, string.Empty, string.Empty, string.Empty);
                 Class101.smethod_0("(上传线程)结束,是否在主线程运行:" + bool_2);
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_1("发票上传异常!" + exception.ToString());
     }
 }
예제 #3
0
파일: Class81.cs 프로젝트: hkloudou/HX-Base
        public string method_19(string string_0)
        {
            string str = "s";

            if (!string.IsNullOrEmpty(string_0))
            {
                Class101.smethod_0("(发票下载)通过受理序列号查询fpzl:" + string_0);
                try
                {
                    Dictionary <string, object> parameter = new Dictionary <string, object>();
                    parameter.Add("SLXLH", string_0);
                    str = this.ibaseDAO_0.queryValueSQL <string>("Aisino.Framework.MainForm.UpDown.GetFPZLBySLXLH", parameter);
                    switch (str)
                    {
                    case null:
                    case "":
                        Class101.smethod_0("(发票下载)通过受理序列号查询fpzl不存在!初始化为s");
                        str = "s";
                        break;
                    }
                    Class101.smethod_0("(发票下载)通过受理序列号查询fpzl:" + str);
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("获取发票上传时间异常!" + exception.ToString());
                }
            }
            return(str);
        }
예제 #4
0
        public Dictionary <string, string> method_4(DataRow dataRow_0, string string_0)
        {
            if (dataRow_0 == null)
            {
                return(null);
            }
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            try
            {
                dictionary.Add("FPDM", dataRow_0["FPDM"].ToString());
                dictionary.Add("FPHM", dataRow_0["FPNO"].ToString());
                dictionary.Add("BSZT", dataRow_0["FPStatus"].ToString());
                if (string_0 == "up")
                {
                    dictionary.Add("BSRZ", this.method_5(dataRow_0["FPDM"].ToString(), int.Parse(dataRow_0["FPNO"].ToString()).ToString()));
                }
                else
                {
                    dictionary.Add("BSRZ", this.method_6(dataRow_0["FPDM"].ToString(), int.Parse(dataRow_0["FPNO"].ToString()).ToString()));
                }
                string str = string.Empty;
                if (dataRow_0["Fplx"].ToString().Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "s";
                }
                else if (dataRow_0["Fplx"].ToString().Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "c";
                }
                else if (dataRow_0["Fplx"].ToString().Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "f";
                }
                else if (dataRow_0["Fplx"].ToString().Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "j";
                }
                else if (dataRow_0["Fplx"].ToString().Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "p";
                }
                else if (dataRow_0["Fplx"].ToString().Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "q";
                }
                else
                {
                    str = dataRow_0["Fplx"].ToString();
                }
                dictionary.Add("FPZL", str);
                Class101.smethod_0("组装Linux开票服务器dict:FPDM-" + dataRow_0["FPDM"].ToString() + "  FPHM-" + dataRow_0["FPNO"].ToString() + "   fpzl-" + str + "  bszt-" + dataRow_0["FPStatus"].ToString() + "   bsrz-" + dictionary["BSRZ"]);
            }
            catch (Exception exception)
            {
                Class101.smethod_1("组装Linux开票服务器dict异常:" + exception.ToString());
            }
            return(dictionary);
        }
예제 #5
0
        public bool method_1(List <string> sqlID, List <Dictionary <string, object> > param, bool bool_0)
        {
            bool flag = false;

            if (((sqlID != null) && (sqlID.Count >= 1)) && ((param != null) && (param.Count >= 1)))
            {
                try
                {
                    int num = this.ibaseDAO_0.未确认DAO方法1(sqlID.ToArray(), param);
                    if (num > 0)
                    {
                        flag = true;
                    }
                    if (!bool_0 && (num > 0))
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_8(Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。");
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。";
                        return(flag);
                    }
                    if (!bool_0 && (num <= 0))
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_7(Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。");
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。";
                        return(flag);
                    }
                    if (num <= 0)
                    {
                        Class95.bool_1   = true;
                        Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新。";
                        return(flag);
                    }
                    Class95.bool_1   = true;
                    Class95.string_1 = Class95.string_2 + "更新成功,请及时维护" + Class95.string_2 + "库。";
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("UpdateSPFLTable异常:" + exception.ToString());
                    if (!bool_0)
                    {
                        MessageHelper.MsgWait();
                        Class86.smethod_7(Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新:" + exception.Message);
                    }
                    Class95.bool_1   = true;
                    Class95.string_1 = Class95.string_2 + "更新失败,请选择手动更新或去税局下载更新包导入更新:" + exception.Message;
                }
                return(flag);
            }
            Class101.smethod_0("sqlid为空或者param为空");
            return(flag);
        }
예제 #6
0
파일: Class81.cs 프로젝트: hkloudou/HX-Base
        public string method_11(string string_0, string string_1, string string_2)
        {
            string str = "0";

            Class101.smethod_0("(发票上传)开始获取地址索引号--fpdm:" + string_1 + "   fphm:" + string_0);
            if (!string.IsNullOrEmpty(string_0))
            {
                try
                {
                    string str2 = "";
                    if (string_2.Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "s";
                    }
                    else if (string_2.Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "c";
                    }
                    else if (string_2.Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "f";
                    }
                    else if (string_2.Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "j";
                    }
                    else if (string_2.Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "p";
                    }
                    else if (string_2.Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
                    {
                        str2 = "q";
                    }
                    else
                    {
                        str2 = string_2;
                    }
                    int result = 0;
                    int.TryParse(string_0, out result);
                    Dictionary <string, object> parameter = new Dictionary <string, object>();
                    parameter.Add("FPHM", result);
                    parameter.Add("FPDM", string_1);
                    parameter.Add("FPZL", str2);
                    str = this.ibaseDAO_0.queryValueSQL <string>("Aisino.Framework.MainForm.UpDown.GetDZSHY", parameter);
                    Class101.smethod_0("(发票上传)获取地址索引号结束--fpdm:" + string_1 + "   fphm:" + string_0 + "   dzsyh:" + str);
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("获取发票上传时间异常!" + exception.ToString());
                }
            }
            return(str);
        }
예제 #7
0
 public void method_3(string string_0)
 {
     try
     {
         Class87.string_4 = string_0;
         this.class90_0.method_0();
         this.dateTime_0 = DateTime.Now;
         this.class90_0.method_1();
         Class101.smethod_0("发票上传-批量接口:设置包大小" + Class87.int_3.ToString());
         this.method_0(false, false, string.Empty, string.Empty, string.Empty, string_0);
     }
     catch (Exception exception)
     {
         Class101.smethod_1("在主线程启用上传异常!" + exception.ToString());
     }
 }
예제 #8
0
 public bool method_7(XmlDocument xmlDocument_0, XmlDocument xmlDocument_1)
 {
     if ((xmlDocument_0 != null) && (xmlDocument_1 != null))
     {
         Class84 class2 = new Class84();
         string  str    = "";
         try
         {
             string str2 = string.Empty;
             string str3 = class2.method_11(xmlDocument_0, ref str, out str2);
             if (string.IsNullOrEmpty(str))
             {
                 string str4 = "已执行发票上传,服务器处理异常";
                 if (string.IsNullOrEmpty(str2))
                 {
                     str4 = str4 + "。";
                 }
                 else
                 {
                     str4 = str4 + ",服务器返回错误信息:" + str2;
                 }
                 Class87.string_0 = "-0005";
                 Class87.string_1 = "服务器处理异常,发票上传失败!";
                 class2.method_20(xmlDocument_1, str4, 0);
                 Class101.smethod_1("(发票上传):局端处理错误:" + str3);
                 return(false);
             }
             Class101.smethod_0("(发票上传)开始解析卷票上传结果中序列号");
             class2.method_13(xmlDocument_1, str);
             class2.method_20(xmlDocument_1, "已执行发票上传,发票报送状态已置为报送中。", 3);
             Class87.string_0 = "0000";
             Class87.string_1 = str;
             return(true);
         }
         catch (Exception)
         {
         }
         return(false);
     }
     Class101.smethod_1("(发票上传):无返回信息!");
     return(false);
 }
예제 #9
0
 private void method_1()
 {
     if (File.Exists(this.string_1))
     {
         File.Delete(this.string_1);
     }
     if ((this.string_0 != "") && (this.string_1 != ""))
     {
         try
         {
             string str = "";
             Class101.smethod_0("开始企业信息上传,【企业参数同步】上传报文:" + this.string_0);
             if (HttpsSender.SendMsg("0001", this.string_0, out str) != 0)
             {
                 Class101.smethod_1("企业信息上传失败!    " + str.ToString());
                 Class95.bool_0   = false;
                 Class95.string_0 = "企业参数更新失败:" + str;
                 Class95.bool_1   = false;
                 Class95.string_1 = Class95.string_2 + "同步失败:" + str;
                 if (Class87.bool_3)
                 {
                     Class87.dictionary_0["UpdateBZ"] = "0";
                     Class87.dictionary_0["Message"]  = str;
                 }
             }
             else
             {
                 XmlDocument document = new XmlDocument();
                 document.LoadXml(str);
                 document.Save(this.string_1);
             }
         }
         catch (Exception exception)
         {
             Class101.smethod_1("DownloadQYSQXX异常:" + exception.ToString());
         }
     }
     else
     {
         Class101.smethod_0("开始企业参数同步:contentToServer" + this.string_0 + "   filename:" + this.string_1);
     }
 }
예제 #10
0
        public int method_3(string string_0)
        {
            int num = 0;

            Class101.smethod_0("UpdateBMBBBH version:" + string_0);
            if (string_0 != "")
            {
                try
                {
                    Dictionary <string, object> parameter = new Dictionary <string, object>();
                    parameter.Add("VERSION", string_0);
                    num = this.ibaseDAO_0.未确认DAO方法2_疑似updateSQL("Aisino.Framework.MainForm.UpDown.ReplaceSPBMBBBH", parameter);
                    Class101.smethod_0("UpdateBMBBBH version结束:" + num);
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("UpdateBMBBBH:" + exception.ToString());
                }
            }
            return(num);
        }
예제 #11
0
        private void method_2()
        {
            try
            {
                Class101.smethod_0("进入beginDownloadTread");
                Class87.list_1.Clear();
                if (this.bool_0)
                {
                    this.int_0       = 0;
                    this.int_1       = 0;
                    this.dataTable_0 = this.class100_0.method_4();
                }
                if (((this.dataTable_0 != null) && (this.dataTable_0.Rows.Count >= 1)) && ((this.int_0 < this.dataTable_0.Rows.Count) && (this.int_1 < this.dataTable_0.Rows.Count)))
                {
                    this.int_1 = this.int_0 + 10;
                    if (this.int_1 > this.dataTable_0.Rows.Count)
                    {
                        this.int_1 = this.dataTable_0.Rows.Count;
                    }
                    this.bool_0 = false;
                    this.dataTable_1.Clear();
                    for (int i = this.int_0; i < this.int_1; i++)
                    {
                        this.dataTable_1.Rows.Add(this.dataTable_0.Rows[i].ItemArray);
                    }
                    this.list_0.Clear();
                    this.list_0 = this.class84_0.method_5(this.dataTable_1);
                    XmlDocument document = new XmlDocument();
                    string      str      = "";
                    Class101.smethod_0("Begin For Loop : " + this.list_0.Count.ToString());
                    for (int j = 0; j < this.list_0.Count; j++)
                    {
                        Class101.smethod_1("(下载线程)开始下载发票信息!");
                        Class103.smethod_0(this.list_0[j], "DownMethodToServer" + j);
                        string str2 = this.class84_0.method_28(this.list_0[j]);
                        Class101.smethod_0("(发票下载)通过受理序列号得到的票种为:" + str2);
                        if (!str2.Equals("q") && !str2.Equals("JSFP"))
                        {
                            if (HttpsSender.SendMsg("0004", this.list_0[j].InnerXml.ToString(), out str) == 0)
                            {
                                goto Label_02AC;
                            }
                            this.class84_0.method_22(this.list_0[j], str, 3);
                            Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                            continue;
                        }
                        Class101.smethod_0("(发票下载)开始卷票上传,原文:" + this.list_0[j].InnerXml);
                        if (HttpsSender.SendMsg("0030", this.list_0[j].InnerXml.ToString(), out str) != 0)
                        {
                            this.class84_0.method_22(this.list_0[j], str, 3);
                            Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                            continue;
                        }
Label_02AC:
                        Class101.smethod_0("(下载线程)开始下载发票信息结束,准备解析服务器返回数据:" + str);
                        document.LoadXml(str);
                        Class103.smethod_0(document, "DownMethodFromServer" + j);
                        Class101.smethod_0("开始调用AnalyzeDownMethodXmlDoc,发送给局端数据:" + this.list_0[j].InnerXml);
                        this.class84_0.method_9(document, this.list_0[j]);
                    }
                    Class88.smethod_1();
                    Class88.smethod_4();
                    this.int_0 += 10;
                }
                else
                {
                    this.bool_0 = true;
                    this.dataTable_0.Clear();
                    this.dataTable_1.Clear();
                }
            }
            catch (Exception exception)
            {
                Class101.smethod_1("(下载线程)发票下载失败!" + exception.ToString());
            }
        }
예제 #12
0
 public bool method_1(Class96 class96_0, Enum10 enum10_0)
 {
     if (class96_0 != null)
     {
         Class101.smethod_0("(发票上传)存临时表开始:fpdm:" + class96_0.FPDM + "  fphm:" + class96_0.FPNO + "   fpzl:" + class96_0.Fplx + "  method:" + enum10_0.ToString());
         try
         {
             lock (Class97.dataTable_0)
             {
                 if (enum10_0 == Enum10.Insert)
                 {
                     if (this.method_3(Class97.dataTable_0, class96_0.FPNO, class96_0.FPDM) != null)
                     {
                         return(this.method_1(class96_0, Enum10.Update));
                     }
                     DataRow row = Class97.dataTable_0.NewRow();
                     row["FPNO"]             = class96_0.FPNO;
                     row["FPDM"]             = class96_0.FPDM;
                     row["FPSLH"]            = class96_0.FPSLH;
                     row["FPStatus"]         = class96_0.FPStatus;
                     row["FPSQHRecieveTime"] = class96_0.FPSQHRecieveTime;
                     row["Fplx"]             = class96_0.Fplx;
                     row["FpUploadTime"]     = class96_0.FpUploadTime;
                     row["FpNSRSBH"]         = class96_0.FpNSRSBH;
                     row["FpSBBH"]           = class96_0.FpSBBH;
                     row["FpKPJH"]           = class96_0.FpKPJH;
                     row["IsFpUpFailed"]     = class96_0.IsFpUpFailed;
                     row["ISFpDownFailed"]   = class96_0.ISFpDownFailed;
                     row["isDBUpdated"]      = class96_0.Boolean_0;
                     row["ZFBZ"]             = class96_0.ZFBZ;
                     row["DZSYH"]            = class96_0.DZSYH;
                     Class97.dataTable_0.Rows.Add(row);
                     Class97.dataTable_0.AcceptChanges();
                     return(true);
                 }
                 if (enum10_0 == Enum10.Update)
                 {
                     DataRow[] rowArray = Class97.dataTable_0.Select("FPNO='" + class96_0.FPNO + "' AND FPDM='" + class96_0.FPDM + "' AND FPLX='" + class96_0.Fplx + "'");
                     if ((rowArray != null) && (rowArray.Length >= 1))
                     {
                         rowArray[0]["FPSLH"]            = class96_0.FPSLH;
                         rowArray[0]["FPDM"]             = class96_0.FPDM;
                         rowArray[0]["FPStatus"]         = class96_0.FPStatus;
                         rowArray[0]["FPSQHRecieveTime"] = class96_0.FPSQHRecieveTime;
                         rowArray[0]["Fplx"]             = class96_0.Fplx;
                         rowArray[0]["FpUploadTime"]     = class96_0.FpUploadTime;
                         rowArray[0]["FpNSRSBH"]         = class96_0.FpNSRSBH;
                         rowArray[0]["FpSBBH"]           = class96_0.FpSBBH;
                         rowArray[0]["FpKPJH"]           = class96_0.FpKPJH;
                         rowArray[0]["IsFpUpFailed"]     = class96_0.IsFpUpFailed;
                         rowArray[0]["ISFpDownFailed"]   = class96_0.ISFpDownFailed;
                         rowArray[0]["isDBUpdated"]      = class96_0.Boolean_0;
                         rowArray[0]["ZFBZ"]             = class96_0.ZFBZ;
                         rowArray[0]["DZSYH"]            = class96_0.DZSYH;
                         Class97.dataTable_0.AcceptChanges();
                         return(true);
                     }
                     return(false);
                 }
                 if (enum10_0 == Enum10.Delete)
                 {
                     DataRow[] rowArray2 = Class97.dataTable_0.Select("FPNO='" + class96_0.FPNO + "' AND FPDM='" + class96_0.FPDM + "' AND FPLX='" + class96_0.Fplx + "'");
                     if ((rowArray2 != null) && (rowArray2.Length >= 1))
                     {
                         Class97.dataTable_0.Rows.Remove(rowArray2[0]);
                         Class97.dataTable_0.AcceptChanges();
                         return(true);
                     }
                     return(false);
                 }
             }
             Class101.smethod_0("(发票上传)存临时表结束:fpdm:" + class96_0.FPDM + "  fphm:" + class96_0.FPNO + "   fpzl:" + class96_0.Fplx);
         }
         catch (Exception exception)
         {
             Class101.smethod_1("Update UpDownload FpTableInfo Error!" + exception.ToString());
         }
     }
     return(false);
 }
예제 #13
0
 public bool method_9(string string_0, string string_1, int int_0)
 {
     if (!string.IsNullOrEmpty(string_0) && !string.IsNullOrEmpty(string_1))
     {
         try
         {
             Class101.smethod_0("(发票下载):发票明文串:" + string_0);
             string[] strArray = string_0.Split(new char[] { ';' });
             Class101.smethod_0("(发票下载):fpxl长度:" + strArray.Length);
             if ((strArray != null) && (strArray.Length >= 1))
             {
                 for (int i = 0; i < strArray.Length; i++)
                 {
                     Dictionary <string, object> item = new Dictionary <string, object>();
                     string[] strArray2 = strArray[i].Split(new char[] { ',' });
                     Class101.smethod_0("(发票下载):fp长度:" + strArray2.Length);
                     if ((strArray2 != null) && (strArray2.Length > 0))
                     {
                         Class96 class2 = new Class96 {
                             FPDM = strArray2[0],
                             FPNO = strArray2[1]
                         };
                         Class101.smethod_0("(发票下载)解析成功明文开始:" + string_0 + "   fpdm:" + strArray2[0] + "   fphm:" + strArray2[1]);
                         class2 = this.method_3(Class97.dataTable_0, class2.FPNO, class2.FPDM);
                         if (class2 != null)
                         {
                             Class101.smethod_0("(发票下载)解析成功明文-从临时表获取发票信息:" + string_0 + "   fpdm:" + class2.FPDM + "   fphm:" + class2.FPNO + "  fpzl:" + class2.Fplx);
                             class2.FPSQHRecieveTime = DateTime.Now.ToString();
                             if (!string.IsNullOrEmpty(string_1))
                             {
                                 class2.Boolean_0 = false;
                                 class2.FPStatus  = "1";
                                 if ((int_0 != 0) && (i >= (int_0 - 1)))
                                 {
                                     class2.FPStatus = "999";
                                 }
                                 this.method_1(class2, Enum10.Update);
                             }
                             item.Add("FPDM", class2.FPDM);
                             int result = 0;
                             if (int.TryParse(class2.FPNO, out result))
                             {
                                 item.Add("FPHM", result);
                             }
                             if (class2.Fplx.Equals(FPLX.PTFP.ToString()))
                             {
                                 item.Add("FPZL", "c");
                             }
                             else if (class2.Fplx.Equals(FPLX.ZYFP.ToString()))
                             {
                                 item.Add("FPZL", "s");
                             }
                             else if (class2.Fplx.Equals(FPLX.HYFP.ToString()))
                             {
                                 item.Add("FPZL", "f");
                             }
                             else if (class2.Fplx.Equals(FPLX.JDCFP.ToString()))
                             {
                                 item.Add("FPZL", "j");
                             }
                             else if (class2.Fplx.Equals(FPLX.DZFP.ToString()))
                             {
                                 item.Add("FPZL", "p");
                             }
                             else if (class2.Fplx.Equals(FPLX.JSFP.ToString()))
                             {
                                 item.Add("FPZL", "q");
                             }
                             else
                             {
                                 item.Add("FPZL", class2.Fplx);
                             }
                             if ((int_0 != 0) && (i >= (int_0 - 1)))
                             {
                                 item.Add("BSRZ", "已执行发票上传结果查询,底层更新发票异常,状态已置为报送失败,请做发票修复以重新上传该发票。");
                                 item.Add("BSZT", 2);
                             }
                             else
                             {
                                 item.Add("BSRZ", "已执行发票上传结果查询,发票报送状态已置为已报送。");
                                 item.Add("BSZT", 1);
                             }
                             if (item.Count >= 4)
                             {
                                 Class87.list_1.Add(item);
                             }
                         }
                     }
                 }
                 return(true);
             }
             return(false);
         }
         catch (Exception exception)
         {
             Class101.smethod_1("发票上传结果下载接口查询结果解析--对于上传成功的发票 失败!" + exception.ToString());
         }
     }
     return(false);
 }
예제 #14
0
        public Class96 method_3(DataTable dataTable_0, string string_0, string string_1)
        {
            if ((dataTable_0 == null) || (dataTable_0.Rows.Count < 1))
            {
                return(null);
            }
            Class96 class2 = new Class96();

            try
            {
                DataRow[] rowArray;
                lock (Class97.dataTable_0)
                {
                    rowArray = dataTable_0.Select("FPNO='" + string_0 + "' AND FPDM='" + string_1 + "'");
                }
                if ((rowArray == null) || (rowArray.Length < 1))
                {
                    return(null);
                }
                class2.FpKPJH           = rowArray[0]["FpKPJH"].ToString();
                class2.FPNO             = rowArray[0]["FPNO"].ToString();
                class2.FPDM             = rowArray[0]["FPDM"].ToString();
                class2.FpNSRSBH         = rowArray[0]["FpNSRSBH"].ToString();
                class2.FpSBBH           = rowArray[0]["FpSBBH"].ToString();
                class2.FPSLH            = rowArray[0]["FPSLH"].ToString();
                class2.FPSQHRecieveTime = rowArray[0]["FPSQHRecieveTime"].ToString();
                class2.ZFBZ             = Convert.ToBoolean(rowArray[0]["ZFBZ"]);
                Class101.smethod_0("GetOneFpRow--fpdm:" + rowArray[0]["FPDM"].ToString() + "   fphm:" + rowArray[0]["FPNO"].ToString() + "  fpzl:" + rowArray[0]["Fplx"].ToString());
                int result = -1;
                if (int.TryParse(rowArray[0]["Fplx"].ToString(), out result) && (result > -1))
                {
                    class2.Fplx = Enum.GetName(typeof(FPLX), result);
                }
                else if (rowArray[0]["Fplx"].ToString() == "c")
                {
                    class2.Fplx = FPLX.PTFP.ToString();
                }
                else if (rowArray[0]["Fplx"].ToString() == "s")
                {
                    class2.Fplx = FPLX.ZYFP.ToString();
                }
                else if (rowArray[0]["Fplx"].ToString() == "f")
                {
                    class2.Fplx = FPLX.HYFP.ToString();
                }
                else if (rowArray[0]["Fplx"].ToString() == "j")
                {
                    class2.Fplx = FPLX.JDCFP.ToString();
                }
                else if (rowArray[0]["Fplx"].ToString() == "p")
                {
                    class2.Fplx = FPLX.DZFP.ToString();
                }
                else if (rowArray[0]["Fplx"].ToString() == "q")
                {
                    class2.Fplx = FPLX.JSFP.ToString();
                }
                else
                {
                    class2.Fplx = rowArray[0]["Fplx"].ToString();
                }
                class2.FPStatus       = rowArray[0]["FPStatus"].ToString();
                class2.FpUploadTime   = rowArray[0]["FpUploadTime"].ToString();
                class2.IsFpUpFailed   = Convert.ToBoolean(rowArray[0]["IsFpUpFailed"]);
                class2.ISFpDownFailed = Convert.ToBoolean(rowArray[0]["ISFpDownFailed"]);
                class2.Boolean_0      = Convert.ToBoolean(rowArray[0]["isDBUpdated"]);
                class2.DZSYH          = Convert.ToString(rowArray[0]["DZSYH"]);
                return(class2);
            }
            catch (Exception)
            {
            }
            return(class2);
        }
예제 #15
0
파일: Class81.cs 프로젝트: hkloudou/HX-Base
        public bool method_6(string string_0, string string_1, string string_2, string string_3)
        {
            bool flag = false;

            if (!string.IsNullOrEmpty(string_0))
            {
                string str = "";
                if (string_2.Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "s";
                }
                else if (string_2.Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "c";
                }
                else if (string_2.Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "f";
                }
                else if (string_2.Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "j";
                }
                else if (string_2.Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "p";
                }
                else if (string_2.Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
                {
                    str = "q";
                }
                else
                {
                    str = string_2;
                }
                int result = 0;
                int.TryParse(string_0, out result);
                int num = 0;
                int.TryParse(string_3, out num);
                switch (num)
                {
                case 0:
                case 2:
                case 4:
                {
                    int num2 = this.method_5(string_0, string_1, string_2);
                    if (num2 >= Class87.int_5)
                    {
                        return(flag);
                    }
                    if (num != 4)
                    {
                        if (num2 < (Class87.int_5 - 1))
                        {
                            num = 0;
                        }
                        else
                        {
                            num = 2;
                        }
                    }
                    num2++;
                    Dictionary <string, object> parameter = new Dictionary <string, object>();
                    parameter.Add("FPHM", result);
                    parameter.Add("FPDM", string_1);
                    parameter.Add("FPZL", str);
                    parameter.Add("BSZT", num);
                    parameter.Add("BSCS", num2);
                    try
                    {
                        if (this.ibaseDAO_0.未确认DAO方法2_疑似updateSQL("Aisino.Framework.MainForm.UpDown.SetBSZTAndBSCS", parameter) > 0)
                        {
                            flag = true;
                            Class101.smethod_0("(下载线程-SetFpBSZTAndBSCS)更新数据库:发票号码:" + parameter["FPHM"].ToString().PadLeft(8, '0') + "  发票代码:" + parameter["FPDM"].ToString() + "  发票状态:" + parameter["BSZT"].ToString() + "  报送次数:" + parameter["BSCS"].ToString());
                        }
                    }
                    catch (Exception exception)
                    {
                        Class101.smethod_1("(下载线程)更新数据库报送状态和报送次数失败!" + exception.ToString());
                    }
                    break;
                }
                }
            }
            return(flag);
        }
예제 #16
0
        private void method_0(bool bool_2, bool bool_3, string string_0, string string_1, string string_2, string string_3)
        {
            try
            {
                XmlDocument       document = new XmlDocument();
                UpdateTransMethod wBS      = UpdateTransMethod.WBS;
                string            str      = string.Empty;
                this.dateTime_0 = DateTime.Now;
                this.bool_0     = false;
                Class87.list_0.Clear();
                if (bool_3)
                {
                    this.int_0 = this.method_5(UpdateTransMethod.BSZ);
                    wBS        = UpdateTransMethod.BSZ;
                }
                else if (this.int_0 < 1)
                {
                    this.int_0 = this.method_5(UpdateTransMethod.WBS);
                    wBS        = UpdateTransMethod.WBS;
                }
                if (Class87.bool_3)
                {
                    this.int_0 = 1;
                }
                else
                {
                    if (this.int_0 < 1)
                    {
                        this.int_1  = 0;
                        this.int_2  = 0;
                        this.bool_0 = true;
                        Class101.smethod_0("发票上传:没有需要上传的发票");
                        return;
                    }
                    if (bool_3)
                    {
                        this.bool_0 = true;
                    }
                    else
                    {
                        this.bool_0 = false;
                    }
                }
                if (Class87.bool_3)
                {
                    this.int_1 = 1;
                    this.int_2 = this.int_0 + 1;
                }
                else if ((!bool_2 && !bool_3) && !FormMain.bContinuUpload)
                {
                    this.int_1++;
                    this.int_2 = this.int_1 + 1;
                }
                else
                {
                    this.int_1 = 1;
                    this.int_2 = this.int_0 + 1;
                }
                if (((!string.IsNullOrEmpty(string_1) && !string.IsNullOrEmpty(string_0)) && !string.IsNullOrEmpty(string_2)) || !string.IsNullOrEmpty(string_3))
                {
                    this.int_1 = 1;
                    this.int_2 = 2;
                    wBS        = UpdateTransMethod.BszAndWbs;
                }
                bool flag = false;
                int  num  = this.int_1;
                while (true)
                {
                    if (num >= this.int_2)
                    {
                        break;
                    }
                    this.list_0.Clear();
                    this.list_1.Clear();
                    this.list_2.Clear();
                    this.list_3.Clear();
                    this.list_4.Clear();
                    Class101.smethod_1("(上传线程)开始获取待上传的发票信息");
                    if (!this.class84_0.method_3(ref this.list_0, ref this.list_1, ref this.list_2, ref this.list_3, ref this.list_4, num, wBS, string_1, string_0, string_2, string_3))
                    {
                        Class101.smethod_1("(上传线程)没有需要上传的发票信息");
                        this.bool_0 = true;
                        this.int_0  = 0;
                        this.int_1  = 0;
                        this.int_2  = 0;
                    }
                    else
                    {
                        Class101.smethod_1("(上传线程)获取待上传的发票信息结束");
                        try
                        {
                            str = string.Empty;
                            for (int i = 0; i < this.list_0.Count; i++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0398;
                                }
                                Class103.smethod_0(this.list_0[i], "UpMethodZPToServer" + i);
                                Class101.smethod_1("(上传线程)开始专普发票上传");
                                if (HttpsSender.SendMsg("0003", this.list_0[i].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)专普发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int index = str.IndexOf("[");
                                    int num3  = str.IndexOf("]");
                                    if ((index > -1) && (num3 > index))
                                    {
                                        Class87.string_0 = str.Substring(index + 1, num3 - 1);
                                    }
                                    if (num3 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num3 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_19(this.list_0[i], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析专普发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + i);
                                        if (this.class100_0.method_6(document, this.list_0[i]))
                                        {
                                            Class87.bool_0 = true;
                                            this.bool_0    = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)专普发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_03A6;
Label_0398:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_03A6:
                            this.list_0.Clear();
                        }
                        catch (Exception exception)
                        {
                            Class101.smethod_1("(上传线程)专普发票上传失败!" + exception.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int j = 0; j < this.list_1.Count; j++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0575;
                                }
                                Class103.smethod_0(this.list_1[j], "UpMethodHYTOServer" + j);
                                Class101.smethod_1("(上传线程)开始上传货运发票!");
                                if (HttpsSender.SendMsg("0005", this.list_1[j].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)货运发票上传失败!        " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num6 = str.IndexOf("[");
                                    int num7 = str.IndexOf("]");
                                    if ((num6 > -1) && (num7 > num6))
                                    {
                                        Class87.string_0 = str.Substring(num6 + 1, num7 - 1);
                                    }
                                    if (num7 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num7 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_21(this.list_1[j], "f", "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("<上传线程>开始解析货运发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodHYFromServer" + j);
                                        if (this.class100_0.method_8(document, this.list_1[j], "f"))
                                        {
                                            this.bool_0    = true;
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)货运发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0583;
Label_0575:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0583:
                            this.list_1.Clear();
                        }
                        catch (Exception exception2)
                        {
                            Class101.smethod_1("(上传线程)货运发票上传失败!" + exception2.ToString());
                        }
                        try
                        {
                            for (int k = 0; k < this.list_2.Count; k++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0752;
                                }
                                str = string.Empty;
                                Class103.smethod_0(this.list_2[k], "UpMethodJDCTOServer" + k);
                                Class101.smethod_1("(上传线程)开始上传机动车发票!");
                                if (HttpsSender.SendMsg("0005", this.list_2[k].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)机动车发票上传失败!        " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num10 = str.IndexOf("[");
                                    int num9  = str.IndexOf("]");
                                    if ((num10 > -1) && (num9 > num10))
                                    {
                                        Class87.string_0 = str.Substring(num10 + 1, num9 - 1);
                                    }
                                    if (num9 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num9 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_21(this.list_2[k], "j", "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析机动车发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodJDCFromServer" + k);
                                        if (this.class100_0.method_8(document, this.list_2[k], "j"))
                                        {
                                            Class87.bool_0 = true;
                                            this.bool_0    = true;
                                            flag           = true;
                                            Class101.smethod_0("(上传线程)机动车发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0760;
Label_0752:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0760:
                            this.list_2.Clear();
                        }
                        catch (Exception exception3)
                        {
                            Class101.smethod_1("(上传线程)机动车发票上传失败!   " + exception3.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int m = 0; m < this.list_3.Count; m++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0925;
                                }
                                Class103.smethod_0(this.list_3[m], "UpMethodZPToServer" + m);
                                Class101.smethod_1("(上传线程)开始电子发票上传");
                                if (HttpsSender.SendMsg("0031", this.list_3[m].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)电子发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num13 = str.IndexOf("[");
                                    int num12 = str.IndexOf("]");
                                    if ((num13 > -1) && (num12 > num13))
                                    {
                                        Class87.string_0 = str.Substring(num13 + 1, num12 - 1);
                                    }
                                    if (num12 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num12 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_19(this.list_3[m], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析电子发票上传结果。");
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + m);
                                        if (this.class100_0.method_6(document, this.list_3[m]))
                                        {
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            this.bool_0    = true;
                                            Class101.smethod_0("(上传线程)电子发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0933;
Label_0925:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0933:
                            this.list_3.Clear();
                        }
                        catch (Exception exception4)
                        {
                            Class101.smethod_1("(上传线程)电子发票上传失败!" + exception4.ToString());
                        }
                        try
                        {
                            str = string.Empty;
                            for (int n = 0; n < this.list_4.Count; n++)
                            {
                                if (!bool_2 && (Class97.dataTable_0.Rows.Count >= Class87.int_0))
                                {
                                    goto Label_0B08;
                                }
                                Class103.smethod_0(this.list_4[n], "UpMethodJSFPToServer" + n);
                                Class101.smethod_1("(上传线程)开始卷式发票上传");
                                if (HttpsSender.SendMsg("0029", this.list_4[n].InnerXml.ToString(), out str) != 0)
                                {
                                    Class101.smethod_1("(上传线程)卷式发票上传失败!             " + str.ToString());
                                    Class87.bool_0 = false;
                                    int num16 = str.IndexOf("[");
                                    int num15 = str.IndexOf("]");
                                    if ((num16 > -1) && (num15 > num16))
                                    {
                                        Class87.string_0 = str.Substring(num16 + 1, num15 - 1);
                                    }
                                    if (num15 > 0)
                                    {
                                        Class87.string_1 = str.Substring(num15 + 1);
                                    }
                                    else
                                    {
                                        Class87.string_1 = str;
                                    }
                                    this.class84_0.method_20(this.list_4[n], "执行发票上传失败,原因:" + str, 0);
                                    this.bool_0 = this.bool_0;
                                }
                                else
                                {
                                    Class101.smethod_1("(上传线程)开始解析卷式发票上传结果。");
                                    Class101.smethod_0("(上传线程)上传卷票返回:" + str);
                                    if (!string.IsNullOrEmpty(str))
                                    {
                                        document.LoadXml(str);
                                        Class103.smethod_0(document, "UpMethodZPFromServer" + n);
                                        if (this.class100_0.method_7(document, this.list_4[n]))
                                        {
                                            Class87.bool_0 = true;
                                            flag           = true;
                                            this.bool_0    = true;
                                            Class101.smethod_0("(上传线程)卷式发票上传结束!");
                                        }
                                    }
                                }
                            }
                            goto Label_0B16;
Label_0B08:
                            this.int_1 = 0;
                            this.int_2 = 0;
Label_0B16:
                            this.list_4.Clear();
                        }
                        catch (Exception exception5)
                        {
                            Class101.smethod_1("(上传线程)卷式发票上传失败!" + exception5.ToString());
                        }
                    }
                    num++;
                }
                Class88.smethod_0();
                if (Class87.bool_2)
                {
                    this.class81_0.method_15();
                }
                Class88.smethod_3();
                if ((this.int_2 > this.int_0) && (this.int_0 != 1))
                {
                    this.int_1  = 0;
                    this.int_2  = 0;
                    this.int_0  = 0;
                    this.bool_0 = true;
                }
                if ((!string.IsNullOrEmpty(string_1) && !string.IsNullOrEmpty(string_0)) && (!string.IsNullOrEmpty(string_2) && !flag))
                {
                    Class96 class2 = this.class100_0.method_3(Class97.dataTable_0, string_0, string_1);
                    if ((class2 != null) && !string.IsNullOrEmpty(class2.FPSLH))
                    {
                        Class87.bool_0   = true;
                        Class87.string_0 = "0000";
                        Class87.string_1 = class2.FPSLH;
                    }
                    else
                    {
                        Class87.bool_0   = false;
                        Class87.string_0 = "-0007";
                        Class87.string_1 = "上传失败,未查询到受理序列号!";
                    }
                }
            }
            catch (Exception exception6)
            {
                Class101.smethod_1("<上传线程>发票上传异常:" + exception6.ToString());
            }
            finally
            {
                this.list_0.Clear();
                this.list_1.Clear();
                this.list_2.Clear();
                this.list_3.Clear();
                this.list_4.Clear();
            }
        }
예제 #17
0
파일: Class83.cs 프로젝트: hkloudou/HX-Base
        public bool method_2(string string_0)
        {
            if (string.IsNullOrEmpty(string_0))
            {
                if (Class87.bool_3)
                {
                    Class87.dictionary_0["UpdateBZ"] = "2";
                    Class87.dictionary_0["Message"]  = "企业信息无变化!";
                }
                Class95.bool_0   = false;
                Class95.string_0 = "企业信息无变化!";
                Class101.smethod_0("企业信息无变化,无需更新!    ");
                return(true);
            }
            TaxCard card = TaxCard.CreateInstance(CTaxCardType.const_7);

            try
            {
                Class101.smethod_0("企业参数同步前局端信息:" + string_0);
                byte[] buffer = Convert.FromBase64String(string_0);
                if ((buffer != null) && (buffer.Length >= 1))
                {
                    Class101.smethod_0("开始企业参数同步");
                    card.UpdateCompanyInfo(buffer, Convert.ToUInt32(buffer.Length));
                    Class101.smethod_0("企业参数同步结束");
                    string location = Assembly.GetExecutingAssembly().Location;
                    string path     = location.Substring(0, location.LastIndexOf(@"\")) + @"\" + AttributeName.QYXXFileName;
                    if (File.Exists(path))
                    {
                        File.Delete(path);
                    }
                    if (card.RetCode == 0)
                    {
                        Class101.smethod_0("更新企业信息成功!    ");
                        if (Class87.bool_3)
                        {
                            Class87.dictionary_0["UpdateBZ"] = "3";
                            Class87.dictionary_0["Message"]  = "更新底层信息成功!";
                        }
                        Class95.string_0 = "更新企业信息成功!";
                        Class95.bool_0   = true;
                        return(true);
                    }
                    if (Class87.bool_3)
                    {
                        Class87.dictionary_0["UpdateBZ"] = "4";
                        Class87.dictionary_0["Message"]  = "更新企业信息失败!";
                    }
                    Class95.bool_0   = true;
                    Class95.string_0 = "更新企业信息失败!    ErrorCode=" + card.RetCode;
                    Class101.smethod_1("更新企业信息失败!    ErrorCode=" + card.RetCode);
                }
                return(false);
            }
            catch (Exception exception)
            {
                Class101.smethod_1("更新设备企业信息失败!" + exception.ToString());
                Class95.bool_0   = true;
                Class95.string_0 = "更新设备企业信息失败!" + exception.Message;
            }
            return(false);
        }
예제 #18
0
        public Dictionary <string, object> method_0(DataRow dataRow_0)
        {
            if (dataRow_0 == null)
            {
                return(null);
            }
            Class101.smethod_0("getDictWithStatus   FPDM:" + dataRow_0["FPDM"].ToString() + "  FPHM:" + dataRow_0["FPNO"].ToString() + "  fpzl:" + dataRow_0["Fplx"].ToString() + "  BSZT:" + dataRow_0["FPStatus"].ToString());
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            if (dataRow_0["FPStatus"].ToString() == "999")
            {
                dictionary.Add("BSZT", "2");
            }
            else
            {
                dictionary.Add("BSZT", dataRow_0["FPStatus"]);
            }
            dictionary.Add("FPHM", int.Parse(dataRow_0["FPNO"].ToString()));
            dictionary.Add("FPDM", dataRow_0["FPDM"]);
            dictionary.Add("SCSJ", dataRow_0["FpUploadTime"]);
            string str = string.Empty;

            if (dataRow_0["Fplx"].ToString().Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "s";
            }
            else if (dataRow_0["Fplx"].ToString().Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "c";
            }
            else if (dataRow_0["Fplx"].ToString().Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "f";
            }
            else if (dataRow_0["Fplx"].ToString().Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "j";
            }
            else if (dataRow_0["Fplx"].ToString().Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "p";
            }
            else if (dataRow_0["Fplx"].ToString().Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "q";
            }
            else
            {
                str = dataRow_0["Fplx"].ToString();
            }
            dictionary.Add("FPZL", str);
            string str2 = string.Empty;

            if (Convert.ToBoolean(dataRow_0["ZFBZ"]))
            {
                str2 = "1";
            }
            else
            {
                str2 = "0";
            }
            dictionary.Add("ZFBZ", str2);
            return(dictionary);
        }
예제 #19
0
 public void method_0()
 {
     Class101.smethod_0("(下载线程)开始查询下载结果");
     this.method_2();
     Class101.smethod_0("(下载线程)结束查询下载结果");
 }
예제 #20
0
        public void method_1(string string_0)
        {
            try
            {
                Class84 class2 = new Class84();
                class2.method_40(string_0);
                Class87.list_1.Clear();
                DataTable table = new DataTable();
                table.Columns.Add("FPSLH", typeof(string));
                DataRow row = table.NewRow();
                row["FPSLH"] = string_0;
                table.Rows.Add(row);
                table.AcceptChanges();
                this.list_0.Clear();
                this.list_0 = this.class84_0.method_5(table);
                XmlDocument document = new XmlDocument();
                string      str      = "";
                int         num4     = (this.list_0.Count > 5) ? 5 : this.list_0.Count;
                for (int i = 0; i < num4; i++)
                {
                    Class103.smethod_0(this.list_0[i], "DownMethodToServer" + i);
                    string str2 = this.class84_0.method_28(this.list_0[i]);
                    Class101.smethod_0("(发票下载)通过受理序列号得到的票种为:" + str2);
                    if (!str2.Equals("q") && !str2.Equals("JSFP"))
                    {
                        if (HttpsSender.SendMsg("0004", this.list_0[i].InnerXml.ToString(), out str) == 0)
                        {
                            goto Label_023F;
                        }
                        Class87.bool_1 = false;
                        int index = str.IndexOf("[");
                        int num   = str.IndexOf("]");
                        if ((index > -1) && (num > index))
                        {
                            Class87.string_3 = str.Substring(index + 1, num - 1);
                        }
                        if (num > 0)
                        {
                            Class87.string_2 = str.Substring(num + 1);
                        }
                        else
                        {
                            Class87.string_2 = str;
                        }
                        Class87.xmlDocument_1 = class2.method_26(1);
                        class2.method_22(this.list_0[i], str, 3);
                        continue;
                    }
                    Class101.smethod_0("(发票下载)开始卷票上传,原文:" + this.list_0[i].InnerXml);
                    if (HttpsSender.SendMsg("0030", this.list_0[i].InnerXml.ToString(), out str) != 0)
                    {
                        class2.method_22(this.list_0[i], str, 3);
                        Class101.smethod_1("(下载线程)发票下载失败!            " + str);
                        continue;
                    }
Label_023F:
                    Class87.bool_1 = true;
                    document.LoadXml(str);
                    if (Class87.bool_2)
                    {
                        XmlDocument document2 = new XmlDocument();
                        document2.LoadXml(document.InnerXml);
                        Class101.smethod_0("发票下载-批量接口:局端返回报文处理前:" + document2.InnerXml);
                        Class87.xmlDocument_1 = this.class84_0.method_25(document2);
                        Class101.smethod_0("发票下载-批量接口:局端返回报文处理后:" + document2.InnerXml);
                    }
                    Class103.smethod_0(document, "DownMethodFromServer" + i);
                    Class101.smethod_0("开始调用AnalyzeDownMethodXmlDoc-Single");
                    this.class84_0.method_9(document, this.list_0[i]);
                }
                Class88.smethod_1();
                Class88.smethod_4();
            }
            catch (Exception exception)
            {
                Class101.smethod_1("DownLoadBySingle异常:" + exception.ToString());
            }
        }
예제 #21
0
파일: Class81.cs 프로젝트: hkloudou/HX-Base
        public int method_9(string string_0, string string_1, string string_2)
        {
            int    num = 0;
            string str = "";

            if (string_2.Equals("ZYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "s";
            }
            else if (string_2.Equals("PTFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "c";
            }
            else if (string_2.Equals("HYFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "f";
            }
            else if (string_2.Equals("JDCFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "j";
            }
            else if (string_2.Equals("DZFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "p";
            }
            else if (string_2.Equals("JSFP", StringComparison.CurrentCultureIgnoreCase))
            {
                str = "q";
            }
            else
            {
                str = string_2;
            }
            int result = 0;

            int.TryParse(string_0, out result);
            Dictionary <string, object> parameter = new Dictionary <string, object>();

            parameter.Add("FPHM", result);
            parameter.Add("FPDM", string_1);
            parameter.Add("FPZL", str);
            parameter.Add("BSCS", "0");
            TaxCard card = TaxCard.CreateInstance(CTaxCardType.const_7);

            try
            {
                Dictionary <int, int> dictionary2 = this.method_10();
                int num3 = Convert.ToInt32(card.GetCardClock().ToString("yyyyMM"));
                int num4 = Convert.ToInt32(this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.GetSSYF", parameter));
                int num5 = Convert.ToInt32(this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.GetBSQ", parameter));
                Class101.smethod_0(string.Concat(new object[] { "发票延签作废:fpdm:", string_1, "  fphm:", string_0, "   fpzl:", str, "  _ssyf:", num4, "  _JSPYearAndMonth:", num3, "    _BSQ:", num5, "   _dictCurrentPeriod[(int)FPLX.DZFP]:", dictionary2[0x33] }));
                if ((num4 == num3) && (num5 == dictionary2[0x33]))
                {
                    Class101.smethod_0("延签作废:1");
                    parameter.Add("BSRZ", "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】验签失败,系统已自动作废该发票,稍后系统会重新上传该张发票!");
                    num = this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.SetBSCSAndBSRZ", parameter);
                    object[] objArray2 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPYiKaiZuoFeiWenBenJieKouShareMethods", new object[] { "p", string_1, string_0, 3 });
                    if (Class87.bool_2)
                    {
                        Class87.string_3 = "-0009";
                        Class87.string_2 = "验签失败,系统已自动作废该发票,稍后系统会重新上传该张发票!";
                        return(num);
                    }
                    if ((objArray2 != null) && ((bool)objArray2[0]))
                    {
                        Class101.smethod_0("电子发票延签失败自动作废成功:fpdm:" + string_1 + "  fphm:" + string_1);
                        new Class84().method_29(string_1, string_0);
                        Class86.smethod_4(string_1, string_0);
                        return(num);
                    }
                    Class101.smethod_0("电子发票延签失败无法自动作废:fpdm:" + string_1 + "  fphm:" + string_1);
                    Class86.smethod_5(string_1, string_0);
                    return(num);
                }
                Class101.smethod_0("延签作废:2");
                parameter.Add("BSRZ", "【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】验签失败,该发票已跨月或者已抄税,系统无法作废该发票,请开红票冲销该张发票!");
                num = this.ibaseDAO_0.queryValueSQL <int>("Aisino.Framework.MainForm.UpDown.SetBSCSAndBSRZ", parameter);
                if (Class87.bool_2)
                {
                    Class87.string_3 = "-0008";
                    Class87.string_2 = "验签失败,该发票已跨月或者已抄税,系统无法作废该发票,请开红票冲销该张发票!";
                    return(num);
                }
                Class101.smethod_0("延签作废:3");
                Class86.smethod_5(string_1, string_0);
            }
            catch (Exception exception)
            {
                Class101.smethod_1("(下载线程)设置报送次数失败!" + exception.ToString());
            }
            return(num);
        }
예제 #22
0
        public bool method_2(ref List <Fpxx> list_0, ref List <Fpxx> list_1, ref List <Fpxx> list_2, ref List <Fpxx> list_3, ref List <Fpxx> list_4, string string_0, UpdateTransMethod updateTransMethod_0, string string_1, string string_2, string string_3, string string_4)
        {
            List <Fpxx> list   = new GetFpInfoDal().GetFpInfo(string_0, Class87.int_1.ToString(), updateTransMethod_0, string_2, string_1, string_3, string_4);
            Class81     class2 = new Class81();

            if ((list != null) && (list.Count >= 1))
            {
                Class96 class3 = new Class96();
                TaxCard card   = TaxCard.CreateInstance(CTaxCardType.const_7);
                try
                {
                    for (int i = 0; i < list.Count; i++)
                    {
                        Class101.smethod_0("发票类型:" + list[i].fplx.ToString());
                        if ((list[i].bszt.ToString() == "3") && !Class87.bool_3)
                        {
                            class3.FpKPJH           = card.Machine.ToString();
                            class3.FPNO             = list[i].fphm;
                            class3.FPDM             = list[i].fpdm;
                            class3.FpNSRSBH         = card.TaxCode;
                            class3.FpSBBH           = card.GetInvControlNum();
                            class3.Fplx             = list[i].fplx.ToString();
                            class3.ISFpDownFailed   = false;
                            class3.IsFpUpFailed     = false;
                            class3.Boolean_0        = true;
                            class3.FpUploadTime     = this.class81_0.method_1(class3.FPNO, class3.FPDM, class3.Fplx).ToString();
                            class3.FPSQHRecieveTime = DateTime.Now.ToString();
                            class3.FPSLH            = class2.method_3(class3.FPNO, class3.FPDM, class3.Fplx);
                            string str = this.class81_0.method_2(class3.FPNO, class3.FPDM, class3.Fplx);
                            class3.DZSYH = list[i].dzsyh;
                            Class101.smethod_0("(发票上传)上传报送中发票--fpdm:" + list[i].fpdm + "    fphm:" + list[i].fphm + "   dzsyh:" + list[i].dzsyh + "  zfbz:" + str + "  fpslh:" + class3.FPSLH);
                            if (str.Equals("1"))
                            {
                                class3.ZFBZ = true;
                            }
                            else if (str.Equals("0"))
                            {
                                class3.ZFBZ = false;
                            }
                            else
                            {
                                class3.ZFBZ = list[i].zfbz;
                            }
                            if ((class3.FPSLH != null) && !(class3.FPSLH == ""))
                            {
                                class3.FPStatus = list[i].bszt.ToString();
                            }
                            else
                            {
                                class3.FPStatus = "0";
                            }
                            this.method_1(class3, Enum10.Insert);
                        }
                        else if ((list[i].fplx != FPLX.PTFP) && (list[i].fplx != FPLX.ZYFP))
                        {
                            if (list[i].fplx == FPLX.HYFP)
                            {
                                list_1.Add(list[i]);
                            }
                            else if (list[i].fplx == FPLX.JDCFP)
                            {
                                list_2.Add(list[i]);
                            }
                            else if (list[i].fplx == FPLX.DZFP)
                            {
                                list_3.Add(list[i]);
                            }
                            else if (list[i].fplx == FPLX.JSFP)
                            {
                                list_4.Add(list[i]);
                            }
                        }
                        else
                        {
                            list_0.Add(list[i]);
                        }
                        Class101.smethod_0("发票上传:fpdm:" + list[i].fpdm + "  发票号码:" + list[i].fphm.ToString() + "  发票种类:" + list[i].fplx.ToString() + "  报送状态:" + list[i].bszt.ToString());
                    }
                    return(true);
                }
                catch (Exception exception)
                {
                    Class101.smethod_1("(上传线程)分发发票信息表到上传线程表出错!" + exception.ToString());
                }
                finally
                {
                    list.Clear();
                    list = null;
                }
                Class101.smethod_0("(上传线程)分发发票信息表到上传线程表出错!");
                return(false);
            }
            return(false);
        }
예제 #23
0
 public void method_0()
 {
     try
     {
         string location = Assembly.GetExecutingAssembly().Location;
         this.string_1 = location.Substring(0, location.LastIndexOf(@"\")) + @"\" + AttributeName.QYXXFileName;
         XmlDocument document = new XmlDocument();
         if (!Class87.bool_3)
         {
             if (File.Exists(this.string_1))
             {
                 Class101.smethod_0("更新企业参数同步数据:数据文件已存在。");
                 document.Load(this.string_1);
                 Class101.smethod_0("更新企业参数同步数据:!    " + document.InnerXml);
                 if (string.IsNullOrEmpty(document.InnerXml))
                 {
                     if (Class87.bool_3)
                     {
                         Class87.dictionary_0["UpdateBZ"] = "1";
                         Class87.dictionary_0["Message"]  = "服务器端异常,返回信息为空";
                     }
                     return;
                 }
                 this.class84_0.method_18(document);
                 if (File.Exists(this.string_1))
                 {
                     File.Delete(this.string_1);
                 }
                 MessageHelper.MsgWait();
                 Class86.smethod_9();
             }
             document      = this.class84_0.method_16();
             this.string_0 = document.InnerXml;
             ThreadStart start = new ThreadStart(this.method_1);
             new Thread(start).Start();
         }
         else
         {
             document = this.class84_0.method_16();
             if (document != null)
             {
                 Class103.smethod_0(document, "OptionToServer");
                 string str2 = "";
                 Class101.smethod_0("开始企业信息上传,【企业参数同步】上传报文:" + document.InnerXml);
                 if (HttpsSender.SendMsg("0001", document.InnerXml.ToString(), out str2) != 0)
                 {
                     Class101.smethod_1("企业信息上传失败!    " + str2.ToString());
                     Class95.bool_0   = false;
                     Class95.string_0 = "企业参数更新失败:" + str2;
                     Class95.bool_1   = false;
                     Class95.string_1 = Class95.string_2 + "同步失败:" + str2;
                     if (Class87.bool_3)
                     {
                         Class87.dictionary_0["UpdateBZ"] = "0";
                         Class87.dictionary_0["Message"]  = str2;
                     }
                 }
                 else
                 {
                     Class101.smethod_0("企业参数同步,局端返回数据:!    " + str2.ToString());
                     if (string.IsNullOrEmpty(str2))
                     {
                         if (Class87.bool_3)
                         {
                             Class87.dictionary_0["UpdateBZ"] = "1";
                             Class87.dictionary_0["Message"]  = "服务器端异常,返回信息为空";
                         }
                     }
                     else
                     {
                         XmlDocument document2 = new XmlDocument();
                         document2.LoadXml(str2);
                         Class103.smethod_0(document2, "OptionFromServer");
                         this.class84_0.method_18(document2);
                         MessageHelper.MsgWait();
                         Class86.smethod_9();
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_1("更新企业参数信息失败!" + exception.ToString());
     }
 }
예제 #24
0
파일: Class88.cs 프로젝트: hkloudou/HX-Base
 public static void smethod_1()
 {
     try
     {
         lock (Class97.dataTable_0)
         {
             List <string> list = new List <string>();
             List <Dictionary <string, object> > parameter = new List <Dictionary <string, object> >();
             List <Dictionary <string, object> > list3     = new List <Dictionary <string, object> >();
             Class89  class2        = new Class89();
             IBaseDAO baseDAOSQLite = BaseDAOFactory.GetBaseDAOSQLite();
             List <Dictionary <string, string> > list4 = new List <Dictionary <string, string> >();
             TaxCard   card     = TaxCard.CreateInstance(CTaxCardType.const_7);
             DataRow[] rowArray = Class97.dataTable_0.Select("(FPStatus = '0' OR FPStatus = '2' OR FPStatus = '4') AND isDBUpdated=false");
             if ((rowArray != null) && (rowArray.Length >= 1))
             {
                 Class81 class3 = new Class81();
                 foreach (DataRow row in rowArray)
                 {
                     if (row["FPStatus"].ToString() == "0")
                     {
                         list.Add("Aisino.Framework.MainForm.UpDown.UpdateFpStatus");
                         parameter.Add(class2.method_0(row));
                         list.Add("Aisino.Framework.MainForm.UpDown.replaceFPSLH");
                         parameter.Add(class2.method_1(row));
                     }
                     else
                     {
                         if (!row["Fplx"].ToString().Equals("DZFP"))
                         {
                             class3.method_6(row["FPNO"].ToString(), row["FPDM"].ToString(), row["Fplx"].ToString(), row["FPStatus"].ToString());
                         }
                         list.Add("Aisino.Framework.MainForm.UpDown.DeleteFPSLH");
                         parameter.Add(class2.method_1(row));
                     }
                     list3.Add(class2.method_2(row));
                     if (card.SubSoftVersion == "Linux")
                     {
                         list4.Add(class2.method_4(row, "down"));
                     }
                 }
                 if (card.SubSoftVersion == "Linux")
                 {
                     string str = new Class84().method_30(list4);
                     Class101.smethod_0("发送给Linux服务器端数据:" + str);
                     Class101.smethod_0("GeneralCmdHandle返回:" + card.GeneralCmdHandle("C028", str));
                     string errCode = card.ErrCode;
                     Class101.smethod_0(string.Concat(new object[] { "ErrorCode:", errCode, "   retCode:", card.RetCode }));
                     string messageInfo = MessageManager.GetMessageInfo(errCode);
                     Class101.smethod_0("RetCode:" + card.RetCode);
                     Class101.smethod_0("底层返回信息:ErrCode:" + errCode + "  描述信息:" + messageInfo);
                     if (((card.RetCode == 0) && (baseDAOSQLite.未确认DAO方法1(list.ToArray(), parameter) > 0)) && (list3.Count >= 1))
                     {
                         for (int i = 0; i < list3.Count; i++)
                         {
                             class2.method_3(list3[i]);
                             Class101.smethod_0("(下载线程)更新数据库:发票代码:" + list3[i]["FPDM"].ToString() + "   发票号码:" + list3[i]["FPHM"].ToString() + "   报送状态:" + list3[i]["BSZT"].ToString());
                         }
                     }
                 }
                 else if ((baseDAOSQLite.未确认DAO方法1(list.ToArray(), parameter) > 0) && (list3.Count >= 1))
                 {
                     for (int j = 0; j < list3.Count; j++)
                     {
                         class2.method_3(list3[j]);
                         Class101.smethod_0("(下载线程)更新数据库:发票代码:" + list3[j]["FPDM"].ToString() + "   发票号码:" + list3[j]["FPHM"].ToString() + "   报送状态:" + list3[j]["BSZT"].ToString());
                     }
                 }
             }
         }
     }
     catch (Exception exception)
     {
         Class101.smethod_1("(下载线程)批量更新数据库(0-2)失败!" + exception.ToString());
     }
 }