现场问题修改
This commit is contained in:
1 parent
faa3f5a9d3
commit
9872a308f7
6 files changed
+45
-18
No files matched your search
@@ -54,7 +54,8 @@ public class ShipOutController : BaseController
|
||||
// 判断箱号是否合理
|
||||
if (box != null)
|
||||
{
|
||||
var inv = _unitWork.Find<Inventory>(x => x.LocationCode.Equals(code));
|
||||
var inv = _unitWork.Find<Inventory>(x => x.LocationCode.Equals(code)
|
||||
&& x.TaskStatus == InventoryTaskStatus.任务中);
|
||||
return JsonMore(inv);
|
||||
|
||||
}
|
||||
@@ -102,19 +103,23 @@ public class ShipOutController : BaseController
|
||||
shipment.Status = ShipStatusEnum.拣货完成;
|
||||
shipment.UpdateTime = DateTime.Now;
|
||||
shipment.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
_unitWork.Update(shipment);
|
||||
|
||||
|
||||
if (!shipment.ShipmentHeader.ShipmentDetails.Any(x => x.Status < ShipStatusEnum.拣货完成))
|
||||
var header = _unitWork.Find<ShipmentHeader>(x => x.ID.Equals(shipment.ShipmentHeaderId))
|
||||
.Include(x => x.ShipmentDetails)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (!header.ShipmentDetails.Any(x => x.Status < ShipStatusEnum.拣货完成))
|
||||
{
|
||||
shipment.ShipmentHeader.FirstStatus = ShipStatusEnum.拣货完成;
|
||||
header.FirstStatus = ShipStatusEnum.拣货完成;
|
||||
}
|
||||
else
|
||||
{
|
||||
shipment.ShipmentHeader.FirstStatus = ShipStatusEnum.拣货中;
|
||||
header.FirstStatus = ShipStatusEnum.拣货中;
|
||||
}
|
||||
shipment.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
shipment.UpdateTime = DateTime.Now;
|
||||
_unitWork.Update(shipment);
|
||||
header.UpdateTime = DateTime.Now;
|
||||
header.UpdateBy = Wtm.LoginUserInfo.ITCode;
|
||||
_unitWork.Update(header);
|
||||
|
||||
var inv = _unitWork.FindSingle<Inventory>(x => x.UniqueCode.Equals(uniqueCode) && x.LocationCode == station);
|
||||
if (inv != null)
|
||||
@@ -203,7 +208,7 @@ public class ShipOutController : BaseController
|
||||
_unitWork.Update(Sation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Wtm.DoLog("", ActionLogTypesEnum.Normal, "mes", request: JsonConvert.SerializeObject(request), result: "success");
|
||||
tran.Commit();
|
||||
return JsonMore(null);
|
||||
@@ -253,7 +258,8 @@ public class ShipOutController : BaseController
|
||||
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
|
||||
}
|
||||
//判断是否拣货完成
|
||||
if (_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)))
|
||||
if (_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)
|
||||
&& x.TaskStatus == InventoryTaskStatus.任务中))
|
||||
{
|
||||
return JsonMore(null, 500, $"站台{boxCode}存在未拣货物料,无法回库!");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user