コード例 #1
0
        private int method_5(UpdateTransMethod updateTransMethod_0)
        {
            int num = -1;

            try
            {
                num = this.class100_0.method_10(updateTransMethod_0);
                if (num > 0)
                {
                    num = (num / Class87.int_1) + 1;
                }
            }
            catch (Exception exception)
            {
                Class101.smethod_1("(上传线程)获取总页数失败!" + exception.ToString());
            }
            return(num);
        }
コード例 #2
0
        public int method_10(UpdateTransMethod updateTransMethod_0)
        {
            Class81 class2 = new Class81();

            switch (updateTransMethod_0)
            {
            case UpdateTransMethod.WBS:
                return(class2.method_0(0));

            case UpdateTransMethod.YBS:
                return(class2.method_0(1));

            case UpdateTransMethod.BSSB:
                return(class2.method_0(2));

            case UpdateTransMethod.BSZ:
                return(class2.method_0(3));
            }
            return(0);
        }
コード例 #3
0
ファイル: GetFpInfoDal.cs プロジェクト: hkloudou/HX-Base
 public List <Fpxx> GetFpInfo(string string_0, string string_1, UpdateTransMethod updateTransMethod_0, string string_2, string string_3, string string_4, string string_5)
 {
     if (!string.IsNullOrEmpty(string_0) && !string.IsNullOrEmpty(string_1))
     {
         try
         {
             object[] objArray = new object[5];
             if (((string.IsNullOrEmpty(string_3) || string.IsNullOrEmpty(string_2)) || string.IsNullOrEmpty(string_4)) && string.IsNullOrEmpty(string_5))
             {
                 string str  = string.Empty;
                 string str2 = string.Empty;
                 if (updateTransMethod_0 == UpdateTransMethod.WBS)
                 {
                     str  = "0";
                     str2 = "0";
                 }
                 else if (updateTransMethod_0 == UpdateTransMethod.BSZ)
                 {
                     str  = "3";
                     str2 = "3";
                 }
                 else if (updateTransMethod_0 == UpdateTransMethod.YBS)
                 {
                     str  = "1";
                     str2 = "1";
                 }
                 else if (updateTransMethod_0 == UpdateTransMethod.BSSB)
                 {
                     str  = "2";
                     str2 = "2";
                 }
                 else
                 {
                     str  = "0";
                     str2 = "3";
                 }
                 objArray = new object[] { string_0, string_1, str, str2 };
             }
             else if (string.IsNullOrEmpty(string_5))
             {
                 int result = 0;
                 int.TryParse(string_2, out result);
                 objArray = new object[] { string_4, string_3, result, string.Empty, "1" };
             }
             else
             {
                 objArray = new object[] { string.Empty, string.Empty, string.Empty, string.Empty, "2", string_5 };
             }
             Class101.smethod_0(string.Concat(new object[] { "(上传线程)发票查询接口调用前--", objArray[0], ",", objArray[1], ",", objArray[2], ",", objArray[3] }));
             object[] objArray2 = ServiceFactory.InvokePubService("Aisino.Fwkp.Fpkj.FPChanXunPageShareMethods", objArray);
             if ((objArray2 != null) && (objArray2.Length > 0))
             {
                 if ((objArray.Length > 4) && string.IsNullOrEmpty(string_5))
                 {
                     return(new List <Fpxx> {
                         (objArray2[0] as Fpxx)
                     });
                 }
                 return(objArray2[0] as List <Fpxx>);
             }
         }
         catch (Exception exception)
         {
             Class101.smethod_1("获取发票信息失败!" + exception.ToString());
         }
     }
     return(null);
 }
コード例 #4
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);
        }
コード例 #5
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();
            }
        }