😎增加修改库存方法
This commit is contained in:
parent
d705061237
commit
88d59fdaf0
@ -5,6 +5,7 @@
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using DocumentFormat.OpenXml.Bibliography;
|
||||
using DocumentFormat.OpenXml.Drawing.Spreadsheet;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
@ -300,5 +301,99 @@ public class DataValidationService : IDynamicApiController, ITransient
|
||||
|
||||
return contrastResult;
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改库存信息
|
||||
/// </summary>
|
||||
/// <param name="recordGuid"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="objectid"></param>
|
||||
/// <param name="Bdmng"></param>
|
||||
/// <param name="Labst"></param>
|
||||
/// <param name="ZwqslPo"></param>
|
||||
/// <param name="ZwqslPr"></param>
|
||||
/// <param name="dateUpdated"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> ModifyInventoryInformation(string recordGuid,string code,long objectid,string Bdmng, string Labst, string ZwqslPo, string ZwqslPr, DateTime dateUpdated)
|
||||
{
|
||||
if (code=="S")
|
||||
{
|
||||
if (objectid == 137)
|
||||
{
|
||||
var data = _obj137Rep.AsQueryable().Where(x => x.RecordGuid == recordGuid && x.deleted == false).OrderByDescending(x => x.idRecord).First();
|
||||
if (data != null)
|
||||
{
|
||||
await _obj137Rep.AsUpdateable().SetColumns(it => new Obj137
|
||||
{
|
||||
fld006530 = Bdmng,
|
||||
fld005623 = Labst,
|
||||
fld006531 = ZwqslPo,
|
||||
fld006532 = ZwqslPr,
|
||||
fld005624 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
if (objectid == 112)
|
||||
{
|
||||
var data = _obj112Rep.AsQueryable().Where(x => x.RecordGuid == recordGuid && x.deleted == false).First();
|
||||
if (data != null)
|
||||
{
|
||||
await _obj112Rep.AsUpdateable().SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = Bdmng,
|
||||
fld006751 = Labst,
|
||||
fld006752 = ZwqslPo,
|
||||
fld006753 = ZwqslPr,
|
||||
fld006755 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objectid == 137)
|
||||
{
|
||||
var data = await _obj137Rep.AsQueryable().Where(x => x.RecordGuid == recordGuid && x.deleted == false).OrderByDescending(x => x.idRecord).FirstAsync();
|
||||
if (data != null)
|
||||
{
|
||||
await _obj137Rep.AsUpdateable().SetColumns(it => new Obj137
|
||||
{
|
||||
fld006530 = "",
|
||||
fld005623 = "",
|
||||
fld006531 = "",
|
||||
fld006532 = "",
|
||||
fld005624 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
if (objectid == 112)
|
||||
{
|
||||
var data = await _obj112Rep.AsQueryable().Where(x => x.RecordGuid == recordGuid && x.deleted == false).FirstAsync();
|
||||
if (data != null)
|
||||
{
|
||||
await _obj112Rep.AsUpdateable().SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = "",
|
||||
fld006751 = "",
|
||||
fld006752 = "",
|
||||
fld006753 = "",
|
||||
fld006755 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return "修改成功";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user