|
|
@ -448,7 +448,7 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
Id = createOrderResponse.PurchaseOrderId, |
|
|
|
ShopId = request.ShopId, |
|
|
|
OrderState = createOrderResponse.IsPay ? Enums.PurchaseOrderState.待发货 : Enums.PurchaseOrderState.待付款, |
|
|
|
OrderState = createOrderResponse.IsPay ? Enums.PurchaseOrderState.等待采购 : Enums.PurchaseOrderState.待付款, |
|
|
|
PurchasePlatform = purchasePlatform, |
|
|
|
ConsigneeContactName = request.Consignee.ContactName, |
|
|
|
ConsigneeMobile = request.Consignee.Mobile, |
|
|
@ -661,7 +661,7 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
var currentOrderSkuFreightAmount = purchaseOrderSimpleInfo.FreightAmount / belongSkuGroups.Count(); //采购运费(按sku数均分)
|
|
|
|
|
|
|
|
var belongSkuBasicInfo = belongSkuBasicInfoList.FirstOrDefault(x=>x.Id == belongSkuGroup.Key); |
|
|
|
var belongSkuBasicInfo = belongSkuBasicInfoList.FirstOrDefault(x => x.Id == belongSkuGroup.Key); |
|
|
|
|
|
|
|
var purchaseOrderSku = new PurchaseOrderSku() |
|
|
|
{ |
|
|
@ -712,7 +712,7 @@ namespace BBWY.Server.Business |
|
|
|
{ |
|
|
|
Id = createOrderResponse.PurchaseOrderId, |
|
|
|
ShopId = request.ShopId, |
|
|
|
OrderState = createOrderResponse.IsPay ? Enums.PurchaseOrderState.待发货 : Enums.PurchaseOrderState.待付款, |
|
|
|
OrderState = createOrderResponse.IsPay ? Enums.PurchaseOrderState.等待采购 : Enums.PurchaseOrderState.待付款, |
|
|
|
PurchasePlatform = purchaseGroup.PurchasePlatform, |
|
|
|
ConsigneeContactName = request.Consignee.ContactName, |
|
|
|
ConsigneeMobile = request.Consignee.Mobile, |
|
|
@ -832,8 +832,19 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
select = select.Where((po, pa) => childSelect.Where(posku => posku.PurchaseOrderId == po.Id).Any()); |
|
|
|
} |
|
|
|
select = select.WhereIf(request.PurchaserName != null, (po, pa) => po.PurchaserName == request.PurchaserName) |
|
|
|
.WhereIf(request.PurchaseOrderState != null, (po, pa) => po.OrderState == request.PurchaseOrderState) |
|
|
|
select = select.WhereIf(request.PurchaseOrderState == Enums.PurchaseOrderState.待付款 || |
|
|
|
request.PurchaseOrderState == Enums.PurchaseOrderState.打包中 || |
|
|
|
request.PurchaseOrderState == Enums.PurchaseOrderState.待完结 || |
|
|
|
request.PurchaseOrderState == Enums.PurchaseOrderState.已完成 || |
|
|
|
request.PurchaseOrderState == Enums.PurchaseOrderState.已取消, |
|
|
|
(po,pa) => po.OrderState == request.PurchaseOrderState) |
|
|
|
.WhereIf(request.PurchaseOrderState == Enums.PurchaseOrderState.等待采购, (po,pa) => po.OrderState == Enums.PurchaseOrderState.等待采购 || |
|
|
|
po.OrderState == Enums.PurchaseOrderState.部分采购) |
|
|
|
.WhereIf(request.PurchaseOrderState == Enums.PurchaseOrderState.待发货, (po, pa) => po.OrderState == Enums.PurchaseOrderState.待发货 || |
|
|
|
po.OrderState == Enums.PurchaseOrderState.部分发货) |
|
|
|
.WhereIf(request.PurchaseOrderState == Enums.PurchaseOrderState.待收货, (po, pa) => po.OrderState == Enums.PurchaseOrderState.待收货 || |
|
|
|
po.OrderState == Enums.PurchaseOrderState.部分收货) |
|
|
|
.WhereIf(request.PurchaserName != null, (po, pa) => po.PurchaserName == request.PurchaserName) |
|
|
|
.WhereIf(request.StartDate != null, (po, pa) => po.CreateTime >= request.StartDate) |
|
|
|
.WhereIf(request.EndDate != null, (po, pa) => po.CreateTime <= request.EndDate); |
|
|
|
} |
|
|
@ -946,13 +957,12 @@ namespace BBWY.Server.Business |
|
|
|
|
|
|
|
public UpdatePackStateResponse UpdatePurchaseOrderState(UpdatePurchaseOrderStateRequest request) |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var order = fsql.Select<PurchaseOrderV2>().Where(p => p.Id == request.OrderId).ToOne(); |
|
|
|
fsql.Update<PurchaseOrderV2>(order) |
|
|
|
.Set(a => a.OrderState, request.PurchaseOrderState) |
|
|
|
.ExecuteAffrows(); |
|
|
|
// var order = fsql.Select<PurchaseOrderV2>().Where(p => p.Id == request.OrderId).ToOne();
|
|
|
|
// fsql.Update<PurchaseOrderV2>(order)
|
|
|
|
//.Set(a => a.OrderState, request.PurchaseOrderState)
|
|
|
|
//.ExecuteAffrows();
|
|
|
|
// return new UpdatePackStateResponse();
|
|
|
|
fsql.Update<PurchaseOrderV2>(request.OrderId).Set(o => o.OrderState, request.PurchaseOrderState).ExecuteAffrows(); |
|
|
|
return new UpdatePackStateResponse(); |
|
|
|
} |
|
|
|
|
|
|
@ -964,5 +974,6 @@ namespace BBWY.Server.Business |
|
|
|
.ExecuteAffrows(); |
|
|
|
return new UpdatePackStateResponse(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|