optimize
wet 1 year ago
parent 3919d2020f
commit 6082bfaead

@ -1243,7 +1243,7 @@ namespace Myshipping.Application
#region 插入货运动态
//配置中所有的货物状态
var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == UserManager.UserId).ToList().DistinctBy(x => x.StatusName).Select(config => new GoodsStatusQuery
var config = _goodsStatusConfig.AsQueryable().Filter(null, true).Where(config => config.CreatedUserId == UserManager.UserId).ToList().DistinctBy(x => x.StatusName).Select(config => new GoodsStatusQuery
{
ConfigId = config.Id,
@ -1257,6 +1257,24 @@ namespace Myshipping.Application
Remark = null,
Sort = config.Sort
}).ToList();
if (config==null) {
_GoodsConfig.InitGoodsStatusConfig(UserManager.UserId, UserManager.Name);
config = _goodsStatusConfig.AsQueryable().Filter(null, true).Where(config => config.CreatedUserId == UserManager.UserId).ToList().DistinctBy(x => x.StatusName).Select(config => new GoodsStatusQuery
{
ConfigId = config.Id,
SystemCode = config.SystemCode,
StatusName = config.StatusName,
FinishTime = null,
FinishUser = null,
FinishUserId = null,
IsPublic = false,
ExtData = null,
Remark = null,
Sort = config.Sort
}).ToList();
}
if (!string.IsNullOrEmpty(entity.MBLNO))
{
@ -1450,7 +1468,7 @@ namespace Myshipping.Application
if (arr.Count() > 0)
{
var order = await _rep.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToListAsync();
var url = "http://123.235.27.122:8966/CommMng/PublicInterface/DJYDELBILL";// _cache.GetAllDictData().Result.Where(x => x.Code == "bookingorder_delete").Select(x => x.Value).FirstOrDefault();
var url = _cache.GetAllDictData().Result.Where(x => x.Code == "bookingorder_delete").Select(x => x.Value).FirstOrDefault();
if (string.IsNullOrEmpty(url))
{
throw Oops.Bah("未获取到相关url,请联系管理员!");

@ -140,10 +140,11 @@ namespace Myshipping.Application
throw Oops.Oh("请上传正确数据");
}
var Template= await _repPrintTemplateShare.AsQueryable().Filter(null, true).Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID).ToListAsync();
foreach (var item in dto)
{
var entity = item.Adapt<BookingTemplateShare>();
var t = Template.Where(x => x.TemplateId == item.TemplateId && x.ShareToId == x.ShareToId).FirstOrDefault();
var t = Template.Where(x => x.TemplateId == item.TemplateId && x.ShareToId == item.ShareToId).FirstOrDefault();
if (t==null)
{
await _repPrintTemplateShare.InsertAsync(entity);

Loading…
Cancel
Save