Ejemplo n.º 1
0
        public string DeviceDailyRpt(string begintime, int?groupid, int?companyid, int?foundryid, int?ProductLineId, string devicemodel)
        {
            if (groupid == null && companyid == null && foundryid == null && ProductLineId == null)
            {
                return(Global.RETURN_ERROR("部门编号不能全部为空"));
            }
            ProductionLinesServer pls = new ProductionLinesServer();
            string lineids            = Global.GetLinesStr(groupid, companyid, foundryid, ProductLineId);

            ReportServer rps = new ReportServer();

            return(rps.DeviceDailyRpt(begintime, lineids, devicemodel));
        }
Ejemplo n.º 2
0
        static void Main1(string[] args)
        {
            try
            {
                // string key = "设备1";
                // Dictionary<string, string> CoorDic = new Dictionary<string, string>();
                //List<String> list= RedisList.Get ("robotCoordinate");
                // WriteListToTextFile(list, "111.txt");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            //AutoTaskServer  at= new AutoTaskServer();
            //// Console.WriteLine(r.DeviceErrDailyRpt("2018-06-25", "1, 2" ,null));
            //at.TaskExec("2018-12-31");


            Console.ReadKey();

            ReportServer r = new ReportServer();

            // Console.WriteLine(r.DeviceErrDailyRpt("2018-06-25", "1, 2" ,null));
            // Console.WriteLine(r.DeviceErrDailyRpt("2018-06-25", "1, 2", "HNC-808A",0));
            //Console.WriteLine(r.DeviceErrPhaseRpt("2018-06-25", "2018-06-26","1, 2", "HNC-808A", 0));
            Console.WriteLine(r.DeviceErrYearRpt("2018", "1, 2", "HNC-808A", 0));
            Console.WriteLine(r.DeviceErrYearRpt("2018", "1, 2", "HNC-808A", 1));

            Console.ReadKey();

            ReportServer       ats = new ReportServer();
            WorkSataionsServer ws  = new WorkSataionsServer();

            Console.WriteLine(ats.DeviceDailyRpt("2018-06-25", "1,2", "HNC-808A"));
            Console.WriteLine(ats.DevicePhaseRpt("2018-06-25", "2018-06-25", "1,2", "HNC-808A"));
            Console.WriteLine(ats.DeviceMonthRpt("2018-06", "1,2", "HNC-808A"));
            Console.WriteLine(ats.DeviceYearRpt("2018", "1,2", "HNC-808A"));


            DevicesServer ds = new DevicesServer();

            Console.WriteLine(ds.DeviceModelList());
            Console.ReadKey();



            string connstr = @"Host=47.96.172.122;UserName=huabao;Password=huabao2025;Database=huabao;Port=3306;CharSet=utf8;Allow Zero Datetime=true";

            using (MySqlConnection connection = new MySqlConnection(connstr))
            {
                if (connection.State != ConnectionState.Open)
                {
                    connection.Open();
                }
                string       sql = "update getpics set getpicstime=@getpicstime where id=260";
                MySqlCommand cmd = new MySqlCommand(sql, connection);

                cmd.Parameters.AddWithValue("@getpicstime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                cmd.ExecuteNonQuery();
            }
        }