|
@ -173,6 +173,11 @@ namespace UniApiWpf |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void BgwPutDoWork(object sender, DoWorkEventArgs e) |
|
|
private void BgwPutDoWork(object sender, DoWorkEventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
TimeSpan nowDt = DateTime.Now.TimeOfDay; |
|
|
|
|
|
TimeSpan workstartDT = DateTime.Parse("1:00").TimeOfDay; |
|
|
|
|
|
TimeSpan workendDT = DateTime.Parse("2:00").TimeOfDay; |
|
|
|
|
|
if (nowDt < workstartDT || nowDt > workendDT) |
|
|
{ |
|
|
{ |
|
|
SCP_DC_UNI_CONTROLLER.WriteService((rs) => |
|
|
SCP_DC_UNI_CONTROLLER.WriteService((rs) => |
|
|
{ |
|
|
{ |
|
@ -186,6 +191,7 @@ namespace UniApiWpf |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void BgwGetRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) |
|
|
private void BgwGetRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) |
|
@ -197,13 +203,19 @@ namespace UniApiWpf |
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
|
|
|
TimeSpan nowDt = DateTime.Now.TimeOfDay; |
|
|
|
|
|
TimeSpan workstartDT = DateTime.Parse("1:00").TimeOfDay; |
|
|
|
|
|
TimeSpan workendDT = DateTime.Parse("2:00").TimeOfDay; |
|
|
|
|
|
if (nowDt < workstartDT || nowDt > workendDT) |
|
|
|
|
|
{ |
|
|
|
|
|
#region
|
|
|
SCP_DC_UNI_CONTROLLER.ReadService((rs) => |
|
|
SCP_DC_UNI_CONTROLLER.ReadService((rs) => |
|
|
{ |
|
|
{ |
|
|
List<LogModel> _list = new List<LogModel>(); |
|
|
List<LogModel> _list = new List<LogModel>(); |
|
|
if (rs.State == ReturnStatus.Succeed) |
|
|
if (rs.State == ReturnStatus.Succeed) |
|
|
{ |
|
|
{ |
|
|
rs.MessageList.ForEach(p => { |
|
|
rs.MessageList.ForEach(p => { |
|
|
_list.Add(new LogModel() { LogMessage = string.Format("{0}任务:{1}", p,rs.Message.ToString()), LogTime = DateTime.Now.ToShortDateString(), TableName = "", TaskId=rs.Message.ToString(), }); |
|
|
_list.Add(new LogModel() { LogMessage = string.Format("{0}任务:{1}", p, rs.Message.ToString()), LogTime = DateTime.Now.ToShortDateString(), TableName = "", TaskId = rs.Message.ToString(), }); |
|
|
}); |
|
|
}); |
|
|
CreateLogDataList(_list, WriteLogEnum.Get); |
|
|
CreateLogDataList(_list, WriteLogEnum.Get); |
|
|
} |
|
|
} |
|
@ -215,6 +227,9 @@ namespace UniApiWpf |
|
|
CreateLogDataList(_list, WriteLogEnum.Get); |
|
|
CreateLogDataList(_list, WriteLogEnum.Get); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
#endregion
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|