|
|
|
|
@ -1716,6 +1716,15 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
}
|
|
|
|
|
else if (wcsCmd.taskType == 48)//返库
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
WmsRawReturn? wmsRawReturn = dbContext.WmsRawReturn.Where(t => t.endStationCode == wcsCmd.currPointNo && t.executeStatus!="2").FirstOrDefault();
|
|
|
|
|
if (wmsRawReturn != null)
|
|
|
|
|
{
|
|
|
|
|
wmsRawReturn.executeStatus = "2";
|
|
|
|
|
wmsRawReturn.updateDate = DateTime.Now;
|
|
|
|
|
wmsRawReturn.endTime = DateTime.Now;
|
|
|
|
|
dbContext.WmsRawReturn.Update(wmsRawReturn);
|
|
|
|
|
}
|
|
|
|
|
if (wcsCmd.taskStatus == 6)
|
|
|
|
|
{
|
|
|
|
|
wcsCmd.taskStatus = 7;
|
|
|
|
|
@ -2394,18 +2403,18 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WmsRawReturn? wmsRawReturn = dbContext.WmsRawReturn.Where(t => t.endStationCode == task.currPointNo && t.materialId == material.materialId).FirstOrDefault();
|
|
|
|
|
if (wmsRawReturn == null)
|
|
|
|
|
{
|
|
|
|
|
var result = MessageBox.Show("当前物料不在退出申请单中,确定还要入库吗?", "确认入库", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
|
|
|
|
if (result != MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
txtReturnBarCode.Text = string.Empty;
|
|
|
|
|
txtReturnBox.Text = string.Empty;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//if (wmsRawReturn == null)
|
|
|
|
|
//{
|
|
|
|
|
// var result = MessageBox.Show("当前物料不在退出申请单中,确定还要入库吗?", "确认入库", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
|
|
|
|
// if (result != MessageBoxResult.Yes)
|
|
|
|
|
// {
|
|
|
|
|
// txtReturnBarCode.Text = string.Empty;
|
|
|
|
|
// txtReturnBox.Text = string.Empty;
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
var container = dbContext.WmsBaseLocation.FirstOrDefault(t => t.containerCode == txtReturnBox.Text && t.warehouseId == 512);
|
|
|
|
|
List<WmsRawStock> wmsRawStocks = dbContext.WmsRawStock
|
|
|
|
|
@ -2436,14 +2445,14 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
}
|
|
|
|
|
if (wmsRawReturn != null)
|
|
|
|
|
{
|
|
|
|
|
wmsRawReturn.updateDate = DateTime.Now;
|
|
|
|
|
wmsRawReturn.returnAmount += amount;
|
|
|
|
|
if (wmsRawReturn.returnAmount >= wmsRawReturn.planAmount)
|
|
|
|
|
{
|
|
|
|
|
wmsRawReturn.executeStatus = "2";
|
|
|
|
|
wmsRawReturn.endTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
dbContext.WmsRawReturn.Update(wmsRawReturn);
|
|
|
|
|
//wmsRawReturn.updateDate = DateTime.Now;
|
|
|
|
|
//wmsRawReturn.returnAmount += amount;
|
|
|
|
|
//if (wmsRawReturn.returnAmount >= wmsRawReturn.planAmount)
|
|
|
|
|
//{
|
|
|
|
|
// wmsRawReturn.executeStatus = "2";
|
|
|
|
|
// wmsRawReturn.endTime = DateTime.Now;
|
|
|
|
|
//}
|
|
|
|
|
//dbContext.WmsRawReturn.Update(wmsRawReturn);
|
|
|
|
|
|
|
|
|
|
WmsRawReturnDetail? wmsRawReturnDetail = new WmsRawReturnDetail();
|
|
|
|
|
wmsRawReturnDetail.RawReturnId = (long)wmsRawReturn.rawReturnId;
|
|
|
|
|
|