Beispiel #1
0
        /// <summary>
        /// 重新申请退款
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int UpdateTkSq(QuDaoTkModel model)
        {
            string sql = "update qd_tksqjlb set tkje=@tkje,tkyy=@tkyy,sqtksj=getdate(),tkzt=1,sqrid=@sqrid where ddbh=@ddbh";

            using (IDbConnection conn = new DapperConnection().DbConnection)
            {
                int i = conn.Execute(sql, model);
                return(i);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 退款申请
        /// </summary>
        /// <param name="model"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        public int QdTkSq(QuDaoTkModel model, ref string msg)
        {
            bool res = ExistsTk(model.ddbh);

            if (res)
            {
                msg = "已经提交过退款,不能重复提交";
                return(0);
            }
            string sql = "insert into qd_tksqjlb(ddbh,tkje,sqtksj,tkyy,tkzt,qdid,sqrid) values(@ddbh,@tkje,getdate(),@tkyy,1,@qdid,@sqrid)";

            using (IDbConnection conn = new DapperConnection().DbConnection)
            {
                int i = conn.Execute(sql, model);
                return(i);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 制造测试订单,阿里,腾讯,京东
        /// </summary>
        /// <returns></returns>
        public void ZcOrderOther()
        {
            JsddService    jsddService = new JsddService();
            DdyymxbService ddService   = new DdyymxbService();

            //过去订单
            List <string> lstDdbh = new List <string>();

            ///阿里
            for (int i = 0; i < 10012; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 100;
                model.appointmentDate        = DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000019";
                model.customerAge            = 30;
                model.customerBirthday       = "1990-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "500236199001052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 1032;
                model.deptID       = "0007";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 8;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "体检C套餐", ddbh, "阿里健康");

                if (i % 3 == 1)
                {
                    ddService.UpdatOrderdjlsh(ddbh, ddbh);
                }
                else
                {
                    ddService.UpdatOrderdaojiantest(ddbh, DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd"));
                    if (i % 7 == 0)
                    {
                        lstDdbh.Add(ddbh);
                    }
                }
                if (i % 100 == 0)//退款
                {
                    QuDaoTkModel td = new QuDaoTkModel();
                    td.ddbh  = ddbh;
                    td.tkyy  = "测试订单,申请退款";
                    td.tkje  = 25;
                    td.sqrid = 14;
                    string msg = "";
                    new QuDaoTkService().QdTkSq(td, ref msg);
                }
                if (i % 200 == 0)//退款审核
                {
                    new QuDaoTkService().UpdateTkTy(ddbh, 25, 11);
                }
            }
            ddService.Test("update dd_jbxx set ysjsj=995 where yybh='YY201603111349440001' and tcid='000019'");

            //结算申请
            int count = lstDdbh.Count / 5;

            for (int i = 0; i < count; i++)
            {
                List <string> li = lstDdbh.Skip((count - 1) * 5).Take(5).ToList <string>();
                jsddService.PostToCalculate(li, "YY201603111349440001", 8, 11);
            }
            //腾讯
            for (int i = 0; i < 1000; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000022";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 854;
                model.deptID       = "0008";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 9;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "腾讯C套餐", ddbh, "腾讯健康");
                if (i % 3 == 1)
                {
                    ddService.UpdatOrderdjlsh(ddbh, ddbh);
                }
                else
                {
                    ddService.UpdatOrderdaojiantest(ddbh, DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd"));
                }

                if (i % 100 == 0)//退款
                {
                    QuDaoTkModel td = new QuDaoTkModel();
                    td.ddbh  = ddbh;
                    td.tkyy  = "测试订单,申请退款";
                    td.tkje  = 25;
                    td.sqrid = 14;
                    string msg = "";
                    new QuDaoTkService().QdTkSq(td, ref msg);
                }
                if (i % 200 == 0)//退款审核
                {
                    new QuDaoTkService().UpdateTkTy(ddbh, 25, 11);
                }
            }
            ddService.Test("update dd_jbxx set ysjsj=800 where yybh='YY201603111349440001' and tcid='000022'");



            //京东
            for (int i = 0; i < 1000; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000025";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 944;
                model.deptID       = "0009";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 10;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "京东H套餐", ddbh, "京东健康");
                if (i % 3 == 1)
                {
                    ddService.UpdatOrderdjlsh(ddbh, ddbh);
                }
                else
                {
                    ddService.UpdatOrderdaojiantest(ddbh, DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd"));
                }

                if (i % 100 == 0)//退款
                {
                    QuDaoTkModel td = new QuDaoTkModel();
                    td.ddbh  = ddbh;
                    td.tkyy  = "测试订单,申请退款";
                    td.tkje  = 25;
                    td.sqrid = 14;
                    string msg = "";
                    new QuDaoTkService().QdTkSq(td, ref msg);
                }
                if (i % 200 == 0)//退款审核
                {
                    new QuDaoTkService().UpdateTkTy(ddbh, 25, 11);
                }
            }
            ddService.Test("update dd_jbxx set ysjsj=900 where yybh='YY201603111349440001' and tcid='000025'");


            //未来订单
            ///阿里
            for (int i = 0; i < 30000; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 100;
                model.appointmentDate        = DateTime.Now.AddDays(j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000016";
                model.customerAge            = 30;
                model.customerBirthday       = "1990-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "500236199001052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe   = 544;
                model.deptID = "0007";
                model.yybh   = "YY201603111349440001";

                model.interfaceNum = 8;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "体检A套餐", ddbh, "阿里健康");

                ddService.UpdatOrderdjlsh(ddbh, ddbh);
            }
            ddService.Test("update dd_jbxx set ysjsj=500 where yybh='YY201603111349440001' and tcid='000016'");

            //腾讯
            for (int i = 0; i < 300; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000021";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 504;
                model.deptID       = "0008";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 9;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "腾讯B套餐", ddbh, "腾讯健康");
                ddService.UpdatOrderdjlsh(ddbh, ddbh);
            }

            ddService.Test("update dd_jbxx set ysjsj=480 where yybh='YY201603111349440001' and tcid='000021'");

            //京东
            for (int i = 0; i < 300; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(j).ToString("yyyy-MM-dd");
                model.appointmentPackageCode = "000024";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 504;
                model.deptID       = "0009";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 10;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "京东B套餐", ddbh, "京东健康");
                ddService.UpdatOrderdjlsh(ddbh, ddbh);
            }

            ddService.Test("update dd_jbxx set ysjsj=700 where yybh='YY201603111349440001' and tcid='000024'");
        }
Beispiel #4
0
        /// <summary>
        /// 制造测试订单
        /// </summary>
        /// <returns></returns>
        public ActionResult ZcOrder()
        {
            JsddService    jsddService = new JsddService();
            DdyymxbService ddService   = new DdyymxbService();
            string         sql         = @"delete from qd_jsjbxxmx where jbxxid in (select id from qd_jsjbxx where yybh='YY201603111349440001');
            delete from  qd_jsjbxx where yybh = 'YY201603111349440001';
            delete from  qd_tksqjlb where ddbh in (select ddbh from dd_jbxx where yybh = 'YY201603111349440001');
            delete from dd_zhxm where ddbh in (select ddbh from dd_jbxx where yybh = 'YY201603111349440001');
            delete from dd_jbxx where yybh = 'YY201603111349440001' and ddly=0";

            ddService.Test(sql);


            //过去订单
            List <string> lstDdbh = new List <string>();

            ///自营
            for (int i = 0; i < 3000; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd") + " 08:00";
                model.appointmentPackageCode = "000054";
                model.customerAge            = 30;
                model.customerBirthday       = "1990-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "500236199001052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 741;
                model.deptID       = "0026";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 6;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "白领精英A体检", ddbh, "医院公众号");

                if (i % 3 == 1)
                {
                    ddService.UpdatOrderdjlsh(ddbh, ddbh);
                }
                else
                {
                    ddService.UpdatOrderdaojiantest(ddbh, DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd"));
                    if (i % 7 == 0)
                    {
                        lstDdbh.Add(ddbh);
                    }
                }
                if (i % 100 == 0)//退款
                {
                    QuDaoTkModel td = new QuDaoTkModel();
                    td.ddbh  = ddbh;
                    td.tkyy  = "测试订单,申请退款";
                    td.tkje  = 25;
                    td.sqrid = 14;
                    string msg = "";
                    new QuDaoTkService().QdTkSq(td, ref msg);
                }
                if (i % 200 == 0)//退款审核
                {
                    new QuDaoTkService().UpdateTkTy(ddbh, 25, 11);
                }
            }
            ddService.Test("update dd_jbxx set ysjsj=90 where yybh='YY201603111349440001' and tcid='000054'");

            //结算申请
            int count = lstDdbh.Count / 5;

            for (int i = 0; i < count; i++)
            {
                List <string> li = lstDdbh.Skip((count - 1) * 5).Take(5).ToList <string>();
                jsddService.PostToCalculate(li, "YY201603111349440001", 6, 11);
            }
            //康康
            for (int i = 0; i < 3000; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd") + " 08:00";
                model.appointmentPackageCode = "000044";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 425;
                model.deptID       = "0025";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 1;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "	中年体检", ddbh, "康康体检网");
                if (i % 3 == 1)
                {
                    ddService.UpdatOrderdjlsh(ddbh, ddbh);
                }
                else
                {
                    ddService.UpdatOrderdaojiantest(ddbh, DateTime.Now.AddDays(-j).ToString("yyyy-MM-dd"));
                }

                if (i % 100 == 0)//退款
                {
                    QuDaoTkModel td = new QuDaoTkModel();
                    td.ddbh  = ddbh;
                    td.tkyy  = "测试订单,申请退款";
                    td.tkje  = 25;
                    td.sqrid = 14;
                    string msg = "";
                    new QuDaoTkService().QdTkSq(td, ref msg);
                }
                if (i % 200 == 0)//退款审核
                {
                    new QuDaoTkService().UpdateTkTy(ddbh, 25, 11);
                }
            }
            ddService.Test("update dd_jbxx set ysjsj=400 where yybh='YY201603111349440001' and tcid='000044'");

            //未来订单
            ///自营
            for (int i = 0; i < 300; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(j).ToString("yyyy-MM-dd") + " 08:00";
                model.appointmentPackageCode = "000055";
                model.customerAge            = 30;
                model.customerBirthday       = "1990-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "500236199001052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe   = 76;
                model.deptID = "0026";
                model.yybh   = "YY201603111349440001";

                model.interfaceNum = 6;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "白领精英B体检", ddbh, "医院公众号");

                ddService.UpdatOrderdjlsh(ddbh, ddbh);
            }
            ddService.Test("update dd_jbxx set ysjsj=70 where yybh='YY201603111349440001' and tcid='000055'");

            //康康
            for (int i = 0; i < 300; i++)
            {
                string             ddbh  = new DdJbxxService().GetDdbh();
                Model.Api.PreOrder model = new Model.Api.PreOrder();
                int j = i / 10;
                model.appointmentDate        = DateTime.Now.AddDays(j).ToString("yyyy-MM-dd") + " 08:00";
                model.appointmentPackageCode = "000046";
                model.customerAge            = 30;
                model.customerBirthday       = "1993-01-05";
                model.customerGender         = 1;
                model.customerIDCard         = "410185199301052040";
                model.customerIDType         = 1;
                model.customerMedicalStatus  = 0;
                model.customerMobilePhone    = GetTel();
                model.customerName           = GetName();
                model.ddJe         = 63;
                model.deptID       = "0025";
                model.yybh         = "YY201603111349440001";
                model.interfaceNum = 1;
                model.outOrderCode = ddbh;

                ddService.CreateOrder(model, "糖尿病专项体检", ddbh, "康康体检网");
                ddService.UpdatOrderdjlsh(ddbh, ddbh);
            }

            ddService.Test("update dd_jbxx set ysjsj=58 where yybh='YY201603111349440001' and tcid='000046'");

            return(Content("成功"));
        }