using cuidian.Common; using cuidian.Sql; using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using TempDbToUfida; using TempDbToUfida.OpenApi; using TempDbToWang; using UfidaToTempDb; using WangToTempDb; using WdtUtils.UpLoad; namespace MainDEmo { class Program { static void Main(string[] args) { //Console.WriteLine("开始"); //IUpLoad upload = null; //Dictionary argss = new Dictionary(); //argss.Add("start_time", "2019-10-1 00:00:00.000"); //argss.Add("end_time", "2019-10-16 23:31:03.000"); //argss.Add("status", "60"); //upload = new InventoryUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(1); //upload = new StockinUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(2); //upload = new StockoutUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(3); //upload = new PO_PomainUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(4); //upload = new InvoiceItemaUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(5); //upload = new PurchaseUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(6); //upload = new DispatchListUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(7); //upload = new DispatchListSendUpLoad(); //upload.UpLoad(argss); //Console.WriteLine(8); //new DownLoadSellReturn().DownLoad(); string str = "1000005234,1000005216,1000007785,1000129379,1000007806,1000013184,1000013182,1000101955,1000120744,1000121716,1000013171,1000121736,1000121725,1000121745,1000121749,1000121693,1000121701,1000121707,1000121802,1000121812,1000122627,1000127716,1000127728,1000127738,1000127750,1000128795,1000121690,1000128805,1000168403,1000168416,1000168415,1000122626,1000170139,1000038357,1000121694,1000007783,1000007785,1000129379,1000018833,1000121714,1000121693,1000121717,1000127764,1000127765,1000127766,1000128791,1000128790,1000128792,1000128793,1000128794,1000128796,1000128797,1000128798,1000128799,1000128800,1000128801,1000128802,1000128803,1000128804,1000128806,1000128807,1000129377,1000129378,1000007785,1000129379,1000129380,1000129381,1000129382,1000129386,1000122625,1000129387,1000129388,1000129389,1000129390,1000129396,1000129397,1000129398,1000129399,1000129400,1000129401,1000168402,1000168404,1000168405,1000168406,1000168407,1000168408,1000168409,1000168410,1000168411,1000168412,1000168417,1000168418,1000168419,1000168420,1000168421,1000168422,1000168423,1000168413,1000168414,1000168424,1000121752,1000168425,1000168426,1000168427,1000168428,1000170135,1000170136,1000170137,1000170138,1000170140,1000170141,1000170142,1000170143,1000121799,1000120754,1000013183,1000013184,1000013186,1000121737,1000013175,1000121738,1000121739,1000013177,1000121740,1000121741,1000121742,1000121743,1000013181,1000121723,1000121724,1000121726,1000121727,1000121728,1000121729,1000121730,1000121731,1000121732,1000121747,1000121748,1000121750,1000121744,1000121745,1000121749,1000121746,1000121751,1000121752,1000168425,1000121690,1000128805,1000121691,1000121692,1000013187,1000013188,1000013191,1000121734,1000013192,1000121735,1000121737,1000013175,1000121738,1000121694,1000121695,1000121696,1000121697,1000121698,1000121699,1000122120,1000122121,1000121702,1000121703,1000121704,1000121705,1000121709,1000121710,1000121711,1000121712,1000121706,1000121708,1000121713,1000018833,1000121714,1000121796,1000121797,1000121798,1000121799,1000121800,1000121801,1000005221,1000121803,1000121804,1000121805,1000121806,1000121807,1000121808,1000121809,1000121810,1000121811,1000121813,1000122118,1000122119,1000122622,1000122623,1000122624,1000122625,1000129387,1000122626,1000170139,1000122628,1000122629,1000122630,1000122631,1000122632,1000127241,1000127242,1000127243,1000127244,1000127249,1000127250,1000127251,1000005229,1000127718,1000127714,1000127715,1000127720,1000127721,1000013202,1000127722,1000127723,1000127724,1000127744,1000127725,1000127726,1000127727,1000127729,1000127730,1000127731,1000127732,1000127733,1000127734,1000127735,1000127736,1000127737,1000013177,1000121740,1000121743,1000013181,1000121723,1000127739,1000127740,1000127741,1000127742,1000127743,1000127746,1000127747,1000127748,1000127749,1000005235,1000005236,1000005231,1000005232,1000005238,1000005239,1000005240,1000005241,1000005242,1000005217,1000005218,1000005219,1000005220,1000005221,1000121803,1000005222,1000005223,1000005224,1000005225,1000007786,1000007789,1000007790,1000007791,1000007792,1000007793,1000007794,1000007787,1000007788,1000007807,1000007808,1000007809,1000007810,1000007811,1000007812,1000007803,1000007813,1000007814,1000013185,1000013186,1000013187,1000013188,1000013189,1000013190,1000013191,1000121734,1000013192,1000121735,1000013171,1000121736,1000013193,1000013194,1000013195,1000013200,1000013201,1000013202,1000127722,1000013204,1000101609,1000101610,1000101951,1000101952,1000101953,1000101956,1000101957,1000103100,1000102785,1000101957,1000103100,1000103101,1000103102,1000103103,1000127752,1000127753,1000127757,1000127756,1000170140,1000107662,1000107663,1000120733,1000120734,1000120735,1000120741,1000120738,1000120739,1000120740,1000120747,1000120748,1000120749,1000120750,1000120751,1000120752,1000120753,1000120742,1000120743,1000120745,1000120746,1000120754,1000120755,1000120756,1000120757,1000120758,1000120759,1000121715,1000121717,1000121733,1000013191,1000121734,1000013192,1000121735,1000121691,1000128807,1000005243,1000005226,1000007795,1000007815,1000013172,1000013203,1000121697,1000005233,1000005244,1000005245,1000005246,1000005248,1000005247,1000005249,1000005250,1000005251,1000005215,1000005227,1000005228,1000005229,1000127718,1000005230,1000007746,1000007747,1000007783,1000007784,1000007796,1000007797,1000007798,1000007799,1000007800,1000007801,1000007802,1000007804,1000007805,1000007816,1000007817,1000007820,1000007821,1000007818,1000007819,1000013183,1000013173,1000013174,1000013175,1000121738,1000013176,1000013177,1000121740,1000013178,1000013179,1000013180,1000013181,1000121723,1000018833,1000121714,1000018834,1000018835,1000018836,1000018837,1000038357,1000101597,1000101598"; string[] strs=str.Split(new char[] { ',' }); StringBuilder sBuilder = new StringBuilder(); foreach(string item in strs) { string sql = string.Format("update rdrecords01 set iprice=(select distinct cdefine22 from rdre01 where autoid='{0}' ) where AutoID='{0}'", item); sBuilder.AppendLine(sql); } int i=DbUtils.ExecuteNonQuery(sBuilder.ToString(), ConnectionUtils.Instance.GetConnection()); Console.WriteLine("OK"); Console.ReadKey(); } } }