123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using Common.Logging;
- using cuidian.Common;
- using cuidian.Sql;
- using Quartz;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using TempDbToUfida;
- using TempDbToUfida.OpenApi;
- using WangToTempDb;
- namespace TaskSchedule
- {
- [DisallowConcurrentExecution]
- public class Wang_to_U8 : IJob
- {
- private static readonly ILog Logger = LogManager.GetLogger("job2");
- #region 旺店通到中间初始化
- //List<IUpLoad> iup = new List<IUpLoad>
- //{
- // new DispatchListSendUpLoad()//销售出库8
- //};
- #endregion
- #region 中间到U8初始化
- //List<IDownLoad> idow = new List<IDownLoad>
- // {
- // new DownLoadReturnorder()//销售出库8
- // };
- #endregion
- List<string> entitys = new List<string>("供应商,仓库,存货,其他入库,其他出库,采购订单,采购入库,采购退货,销售出库".Split(','));
- Dictionary<string, string> args = new Dictionary<string, string>();
- //wang到u8
- public void Execute(IJobExecutionContext context)
- {
- #region 实现旺店通到中间
- //取表数据
- DataTable dt = DbUtils.Fill("select entitytype,lasttime from transtime", ConnectionUtils.Instance.GetConnection("TempDB"));
- //取初始时间
- args["start_time"] = Convert.ToDateTime(dt.Rows[8].ItemArray[1].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
- //记录现在时间
- args["end_time"] = DateTime.Now.AddMinutes(-10).ToString("yyyy-MM-dd HH:mm:ss");
- new DispatchListUpLoad().UpLoad(args);
- Realize.GetDaysAndExecute(args, new DispatchListSendUpLoad(), entitys[8]);
- using (System.IO.StreamWriter sw = new System.IO.StreamWriter("C:\\销售出库到中间.txt", true))
- {
- Console.WriteLine("旺店通到中间" + "销售出库到中间");
- sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + "job3().to____" + "销售出库到中间");
- }
- #endregion
- Console.WriteLine("中间导入到U8" + "中间到U8的销售单");
- new DownLoadReturnorder().DownLoad();
- new DownLoadReturnorder().DownLoad();
- using (System.IO.StreamWriter sw = new System.IO.StreamWriter("C:\\销售出库到U8.txt", true))
- {
- sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss ") + "endjob4().to____" + "中间到U8的销售单");
- }
- }
- }
- }
|