|
@ -21,6 +21,7 @@ public class StdCostPriceSheetAppService : SfsBaseDataAppServiceBase<StdCostPric |
|
|
base.CreatePolicyName = StdCostPriceSheetPermissions.Create; |
|
|
base.CreatePolicyName = StdCostPriceSheetPermissions.Create; |
|
|
base.UpdatePolicyName = StdCostPriceSheetPermissions.Update; |
|
|
base.UpdatePolicyName = StdCostPriceSheetPermissions.Update; |
|
|
base.DeletePolicyName = StdCostPriceSheetPermissions.Delete; |
|
|
base.DeletePolicyName = StdCostPriceSheetPermissions.Delete; |
|
|
|
|
|
_repository = repository; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[HttpPost("upsert-interface")] |
|
|
[HttpPost("upsert-interface")] |
|
@ -34,7 +35,7 @@ public class StdCostPriceSheetAppService : SfsBaseDataAppServiceBase<StdCostPric |
|
|
[HttpPut("get-by-itemcode")] |
|
|
[HttpPut("get-by-itemcode")] |
|
|
public virtual async Task<StdCostPriceSheetDTO> GetByItemCode(string itemCode) |
|
|
public virtual async Task<StdCostPriceSheetDTO> GetByItemCode(string itemCode) |
|
|
{ |
|
|
{ |
|
|
var entity = await _repository.GetAsync(p => p.ItemCode == itemCode).ConfigureAwait(false); |
|
|
var entity = await _repository.FindAsync(p => p.ItemCode == itemCode).ConfigureAwait(false); |
|
|
var dto = ObjectMapper.Map<StdCostPriceSheet, StdCostPriceSheetDTO>(entity); |
|
|
var dto = ObjectMapper.Map<StdCostPriceSheet, StdCostPriceSheetDTO>(entity); |
|
|
return dto; |
|
|
return dto; |
|
|
} |
|
|
} |
|
|