|
|
|
@ -2000,13 +2000,32 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
info.Note = "对外开放更新接口";
|
|
|
|
|
|
|
|
|
|
#region 处理箱型箱量
|
|
|
|
|
if (req.CtnInfo.Count > 0)
|
|
|
|
|
if (req.CtnInfo.IsNotNull() && req.CtnInfo.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
//处理箱型箱量
|
|
|
|
|
info = UpdateSeaExportCtnInfo(info, req.CtnInfo);
|
|
|
|
|
|
|
|
|
|
var ctnList = await tenantDb.Queryable<OpCtn>().Where(x => x.BSNO == req.Id.ToString()).ToListAsync();
|
|
|
|
|
foreach (var item in req.CtnInfo)
|
|
|
|
|
{
|
|
|
|
|
if (item.Id == 0)
|
|
|
|
|
{
|
|
|
|
|
var ctn = item.Adapt<OpCtn>();
|
|
|
|
|
ctn.BSNO = info.Id.ToString();
|
|
|
|
|
await tenantDb.Insertable(ctn).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var ctn = ctnList.First(x => x.Id == item.Id);
|
|
|
|
|
ctn = item.Adapt(ctn);
|
|
|
|
|
await tenantDb.Updateable(ctn).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
await tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await Task.FromResult(DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess));
|
|
|
|
|
}
|
|
|
|
|