操作单证id

master
wanghaomei 4 months ago
parent 7e2dfdca2c
commit d1c3bbf6dd

@ -2780,6 +2780,70 @@ namespace Myshipping.Application
saveDto.ChangedFields = changeFileds; saveDto.ChangedFields = changeFileds;
} }
#region 处理操作、单证等人员ID
var sysUserList = await _repUser.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToListAsync();
//销售
if (!string.IsNullOrEmpty(saveDto.SALE))
{
var sale = sysUserList.FirstOrDefault(x => x.Name == saveDto.SALE);
if (sale != null)
{
saveDto.SALEID = sale.Id.ToString();
}
}
//操作
if (!string.IsNullOrEmpty(saveDto.OP))
{
var operatorUser = sysUserList.FirstOrDefault(x => x.Name == saveDto.OP);
if (operatorUser != null)
{
saveDto.OPID = operatorUser.Id.ToString();
}
}
//客服
if (!string.IsNullOrEmpty(saveDto.CUSTSERVICE))
{
var custServiceUser = sysUserList.FirstOrDefault(x => x.Name == saveDto.CUSTSERVICE);
if (custServiceUser != null)
{
saveDto.CUSTSERVICEID = custServiceUser.Id.ToString();
}
}
//单证
if (!string.IsNullOrEmpty(saveDto.DOC))
{
var docUser = sysUserList.FirstOrDefault(x => x.Name == saveDto.DOC);
if (docUser != null)
{
saveDto.DOCID = docUser.Id.ToString();
}
}
//航线操作
if (!string.IsNullOrEmpty(saveDto.ROUTE))
{
var routeUser = sysUserList.FirstOrDefault(x => x.Name == saveDto.ROUTE);
if (routeUser != null)
{
saveDto.ROUTEID = routeUser.Id.ToString();
}
}
//航线管理
if (!string.IsNullOrEmpty(saveDto.LineManage))
{
var lineManageUser = sysUserList.FirstOrDefault(x => x.Name == saveDto.LineManage);
if (lineManageUser != null)
{
saveDto.LineManageID = lineManageUser.Id.ToString();
}
}
#endregion
await _bookingorderservice.Save(saveDto); await _bookingorderservice.Save(saveDto);
} }
#endregion #endregion

Loading…
Cancel
Save