Commit b289b803 by zhoujinhui

新增作废单类型

parent 3d0c20af
...@@ -155,7 +155,12 @@ namespace Domain.TakeStock ...@@ -155,7 +155,12 @@ namespace Domain.TakeStock
/// 退货业务 /// 退货业务
/// </summary> /// </summary>
[Description("退货业务")] [Description("退货业务")]
ReturnGoods = 3 ReturnGoods = 3,
/// <summary>
/// 库存作废
/// </summary>
[Description("库存作废")]
Voidgoods = 4
} }
/// <summary> /// <summary>
......
...@@ -838,6 +838,13 @@ namespace Service.TakeStock ...@@ -838,6 +838,13 @@ namespace Service.TakeStock
result.Message = "选中的计划单存在不符合需要审核的数据!"; result.Message = "选中的计划单存在不符合需要审核的数据!";
return result; return result;
} }
var voidgoodsCount = findSchedules.Count(x => x.TakeStockType == TakeStockType.Voidgoods);
var auditUserNames = "赵鹏,姚晓婷";
if (voidgoodsCount > 0 && !auditUserNames.Contains(inputDto.AuditUserName))
{
result.Message = $"作废单请找{auditUserNames}审核!";
return result;
}
if (inputDto.State == TSScheduleState.审核不通过) if (inputDto.State == TSScheduleState.审核不通过)
{ {
foreach (var item in findSchedules) foreach (var item in findSchedules)
...@@ -877,7 +884,7 @@ namespace Service.TakeStock ...@@ -877,7 +884,7 @@ namespace Service.TakeStock
else else
{ {
var orders = _orderRepository.GetAllList(o => !o.IsDeleted && o.State != TSOrderState.取消 && o.State != TSOrderState.完成 && o.ScheduleId == findSchedule.Id); var orders = _orderRepository.GetAllList(o => !o.IsDeleted && o.State != TSOrderState.取消 && o.State != TSOrderState.完成 && o.ScheduleId == findSchedule.Id);
var requestData = new RequestDto<List<ModifStockInputDto>> { Data = orders.Select(x => new ModifStockInputDto { Sku = x.Sku, Quantity = x.AfterQuantity.Value, WarehouseCode = findSchedule.WarehouseCode,ExternalCode = findSchedule.Code, CheduleCreationTime = findSchedule.CreationTime, SysSerialNumber = findSchedule.SysSerialNumber }).ToList() }; var requestData = new RequestDto<List<ModifStockInputDto>> { Data = orders.Select(x => new ModifStockInputDto { Sku = x.Sku, Quantity = x.AfterQuantity.Value, WarehouseCode = findSchedule.WarehouseCode, ExternalCode = findSchedule.Code, CheduleCreationTime = findSchedule.CreationTime, SysSerialNumber = findSchedule.SysSerialNumber }).ToList() };
var response = await PostData<WMSResponseDto<string>, RequestDto<List<ModifStockInputDto>>>(requestData, "WMSStockService/BatchModifAndEnabled"); var response = await PostData<WMSResponseDto<string>, RequestDto<List<ModifStockInputDto>>>(requestData, "WMSStockService/BatchModifAndEnabled");
if (response.IsSuccess) if (response.IsSuccess)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment