|
|
@ -93,7 +93,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private DateTime? _startDate;
|
|
|
|
private DateTime? _startDate ;
|
|
|
|
public DateTime? StartDate
|
|
|
|
public DateTime? StartDate
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get => _startDate;
|
|
|
|
get => _startDate;
|
|
|
@ -104,7 +104,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private DateTime? _endDate;
|
|
|
|
private DateTime? _endDate ;
|
|
|
|
public DateTime? EndDate
|
|
|
|
public DateTime? EndDate
|
|
|
|
{
|
|
|
|
{
|
|
|
|
get => _endDate;
|
|
|
|
get => _endDate;
|
|
|
@ -138,64 +138,42 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
[RelayCommand]
|
|
|
|
[RelayCommand]
|
|
|
|
private void GetTransferOrder()
|
|
|
|
private void GetTransferOrder()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_startDate == null || _endDate == null)
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MessageBox.Show("请选择开始日期或者结束日期");
|
|
|
|
if (_startDate == null || _endDate == null)
|
|
|
|
return;
|
|
|
|
|
|
|
|
}else if (_startDate > _endDate)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MessageBox.Show("开始日期不能大于结束日期");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_endDate = _endDate.Value.AddDays(1);
|
|
|
|
|
|
|
|
#region 正式启用
|
|
|
|
|
|
|
|
CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb(_drj, _startDate.Value.ToString(), _endDate.Value.ToString());
|
|
|
|
|
|
|
|
MessageBox.Show("容器封发-获取调拨单和封发计划:" + res.GetMsg());
|
|
|
|
|
|
|
|
if (res.code == "200")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JObject job = JObject.Parse(res.body);
|
|
|
|
|
|
|
|
string str = job["retBody"]?["object"]?.ToString();
|
|
|
|
|
|
|
|
if (!str.IsNullOrEmpty())
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<TransferOrderInfo> institutionList = JsonConvert.DeserializeObject<List<TransferOrderInfo>>(str);
|
|
|
|
MessageBox.Show("请选择开始日期或者结束日期");
|
|
|
|
|
|
|
|
return;
|
|
|
|
TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList);
|
|
|
|
|
|
|
|
TotalAmount = TransferOrderInfoItems.Count.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (_startDate > _endDate)
|
|
|
|
#endregion
|
|
|
|
{
|
|
|
|
|
|
|
|
MessageBox.Show("开始日期不能大于结束日期");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_endDate = _endDate.Value.AddDays(1);
|
|
|
|
|
|
|
|
#region 正式启用
|
|
|
|
|
|
|
|
CsbResult res = csbHandleBusiness.transferOrderFfjhByCsb(_drj, _startDate.Value.ToString(), _endDate.Value.ToString());
|
|
|
|
|
|
|
|
MessageBox.Show("容器封发-获取调拨单和封发计划:" + res.GetMsg());
|
|
|
|
|
|
|
|
if (res.code == "200")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JObject job = JObject.Parse(res.body);
|
|
|
|
|
|
|
|
string str = job["retBody"]?["object"]?.ToString();
|
|
|
|
|
|
|
|
if (!str.IsNullOrEmpty())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
List<TransferOrderInfo> institutionList = JsonConvert.DeserializeObject<List<TransferOrderInfo>>(str);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(institutionList);
|
|
|
|
|
|
|
|
TotalAmount = TransferOrderInfoItems.Count.ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
//#region 测试
|
|
|
|
}catch (Exception ex)
|
|
|
|
//result res = new result()
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
MessageBox.Show(ex.Message);
|
|
|
|
// status = "1",
|
|
|
|
}
|
|
|
|
// msg = "测试",
|
|
|
|
|
|
|
|
// @object = new List<TransferOrderInfo>()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// new TransferOrderInfo()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// dbdh = "123",
|
|
|
|
|
|
|
|
// jsdw = "123",
|
|
|
|
|
|
|
|
// ffjhNo = "jh123",
|
|
|
|
|
|
|
|
// ffjhscrq = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// new TransferOrderInfo()
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// dbdh = "324",
|
|
|
|
|
|
|
|
// jsdw = "456",
|
|
|
|
|
|
|
|
// ffjhNo = "jh456",
|
|
|
|
|
|
|
|
// ffjhscrq = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//};
|
|
|
|
|
|
|
|
//if (res.@object != null)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// TransferOrderInfoItems = new ObservableCollection<TransferOrderInfo>(res.@object);
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|