Browse Source

增加回收料入库不影响库存方法

dev_DY_CC
赵国民 1 year ago
parent
commit
b59b640de0
  1. BIN
      .vs/WZC2_New/v17/.wsuo
  2. 35
      .vs/WZC2_New/v17/DocumentLayout.json
  3. 22
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Transactions/TransactionAppService.cs

BIN
.vs/WZC2_New/v17/.wsuo

Binary file not shown.

35
.vs/WZC2_New/v17/DocumentLayout.json

@ -0,0 +1,35 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\www\\WZC2_New\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
}
]
}
]
}
]
}

22
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Transactions/TransactionAppService.cs

@ -87,6 +87,28 @@ public class TransactionAppService
return dto;
}
[HttpPost("add-many-empty")]
public virtual async Task<List<TransactionDTO>> AddManyEmptyAsync(List<TransactionEditInput> inputs)
{
var entities = ObjectMapper.Map<List<TransactionEditInput>, List<Transaction>>(inputs);
foreach (var entity in entities)
{
if (string.IsNullOrEmpty(entity.Worker))
{
entity.Worker = CurrentUser.GetUserName();
}
entity.TransTime = Clock.Now;
entity.ActiveDate = await _interfaceCalendarAclService.GetActiveDateAsync(Clock.Now).ConfigureAwait(false);
}
//添加库存信息具体方法,会自动添加或者更新
await _transactionManager.AddManyAsync(entities).ConfigureAwait(false);
//domain层的实体 转化为 显示DTO
var dto = ObjectMapper.Map<List<Transaction>, List<TransactionDTO>>(entities);
return dto;
}
[HttpGet("list/by-number/{number}")]
public virtual async Task<List<TransactionDTO>> GetListByNumberAsync(string number)
{

Loading…
Cancel
Save