|
@ -87,7 +87,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
join itm2 in pricelist |
|
|
join itm2 in pricelist |
|
|
on new { itm1.Type, itm1.MaterialCode,itm1.CustomerCode } equals new { itm2.Type, itm2.MaterialCode, itm2.CustomerCode } |
|
|
on new { itm1.Type, itm1.MaterialCode,itm1.CustomerCode } equals new { itm2.Type, itm2.MaterialCode, itm2.CustomerCode } |
|
|
where itm1.Price != itm2.Price |
|
|
where itm1.Price != itm2.Price |
|
|
select new PriceList(itm2.Id, itm2.BeginDate, itm2.EndDate, itm1.Price, itm2.MaterialCode, itm2.Type, itm2.ParentId, itm2.Version, itm1.CustomerCode); |
|
|
select new PriceList(itm2.Id, itm2.BeginTime, itm2.EndTime, itm1.Price, itm2.MaterialCode, itm2.Type, itm2.ParentId, itm2.Version, itm1.CustomerCode); |
|
|
|
|
|
|
|
|
if (update.Count() > 0) |
|
|
if (update.Count() > 0) |
|
|
{ |
|
|
{ |
|
@ -122,7 +122,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
public virtual async Task<PriceList> CreateAsync(PriceList input) |
|
|
public virtual async Task<PriceList> CreateAsync(PriceList input) |
|
|
{ |
|
|
{ |
|
|
var entity = new PriceList( |
|
|
var entity = new PriceList( |
|
|
GuidGenerator.Create(), input.BeginDate, input.EndDate, input.Price, input.MaterialCode, input.Type,input.ParentId,input.Version,input.CustomerCode |
|
|
GuidGenerator.Create(), input.BeginTime, input.EndTime, input.Price, input.MaterialCode, input.Type,input.ParentId,input.Version,input.CustomerCode |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
return await _repository.InsertAsync(entity); |
|
|
return await _repository.InsertAsync(entity); |
|
@ -134,7 +134,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices |
|
|
{ |
|
|
{ |
|
|
var entity = await _repository.GetAsync(id); |
|
|
var entity = await _repository.GetAsync(id); |
|
|
entity.Set( |
|
|
entity.Set( |
|
|
input.BeginDate, input.EndDate, input.Price, input.MaterialCode, input.Type,input.CustomerCode |
|
|
input.BeginTime, input.EndTime, input.Price, input.MaterialCode, input.Type,input.CustomerCode |
|
|
); |
|
|
); |
|
|
return await _repository.UpdateAsync(entity); |
|
|
return await _repository.UpdateAsync(entity); |
|
|
|
|
|
|
|
|