|
|
|
@ -251,7 +251,8 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
|
|
|
|
|
|
//4.1截取订单号去查询更新BASE_ORDERINFO,全放到service处理
|
|
|
|
|
string orderCode = "11215484";
|
|
|
|
|
BaseOrderInfo order = _baseOrderInfoServices.Query(x => x.OrderCode == orderCode).FirstOrDefault();
|
|
|
|
|
List<BaseOrderInfo> orders = await _baseOrderInfoServices.QueryAsync(x => x.OrderCode == orderCode);
|
|
|
|
|
BaseOrderInfo order = orders.FirstOrDefault();
|
|
|
|
|
if (order.CompleteAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
order.CompleteAmount++;
|
|
|
|
@ -264,18 +265,19 @@ namespace Aucma.Core.ProductOffLine.ViewModels
|
|
|
|
|
order.UpdatedTime = DateTime.Now;
|
|
|
|
|
_baseOrderInfoServices.UpdateAsync(order);
|
|
|
|
|
//4.2根据订单号去更新PRODUCT_PLANINFO
|
|
|
|
|
ProductPlanInfo productIndo =_productPlanInfoServices.Query(x => x.OrderCode == orderCode).FirstOrDefault();
|
|
|
|
|
if (productIndo.CompleteAmount == 0)
|
|
|
|
|
List<ProductPlanInfo> productInfos =await _productPlanInfoServices.QueryAsync(x => x.OrderCode == orderCode);
|
|
|
|
|
ProductPlanInfo productInfo = productInfos.FirstOrDefault();
|
|
|
|
|
if (productInfo.CompleteAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
productIndo.CompleteAmount++;
|
|
|
|
|
productIndo.BeginTime = DateTime.Now;
|
|
|
|
|
productInfo.CompleteAmount++;
|
|
|
|
|
productInfo.BeginTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
if(productIndo.CompleteAmount==productIndo.PlanAmount)
|
|
|
|
|
if(productInfo.CompleteAmount==productInfo.PlanAmount)
|
|
|
|
|
{
|
|
|
|
|
productIndo.EndTime = DateTime.Now;
|
|
|
|
|
productInfo.EndTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
productIndo.UpdatedTime = DateTime.Now;
|
|
|
|
|
_productPlanInfoServices.UpdateAsync(productIndo);
|
|
|
|
|
productInfo.UpdatedTime = DateTime.Now;
|
|
|
|
|
await _productPlanInfoServices.UpdateAsync(productInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//5.分垛A,B库逻辑(先左边读到的条码分A库,右边读到的B库==>预留分库逻辑)
|
|
|
|
|