|
@@ -1,16 +1,17 @@
|
|
|
-using OASystem.Domain.Dtos.Groups;
|
|
|
+using AutoMapper;
|
|
|
+using EyeSoft.Collections.Generic;
|
|
|
+using OASystem.Domain;
|
|
|
+using OASystem.Domain.Dtos.Groups;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
-using OASystem.Domain;
|
|
|
using OASystem.Infrastructure.Repositories.System;
|
|
|
using OASystem.Infrastructure.Tools;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
+using System.Text.RegularExpressions;
|
|
|
using System.Threading.Tasks;
|
|
|
-using AutoMapper;
|
|
|
-using EyeSoft.Collections.Generic;
|
|
|
|
|
|
namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
{
|
|
@@ -111,6 +112,33 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
feeBasePermIds.AddRange(intlDplmcyBasePerm.Select(x => x.Id).ToList());
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * 市场部 朱姝 默认添加贵州、重庆、云南的出入境费用查看权限
|
|
|
+ */
|
|
|
+ if (currUserId == 380)
|
|
|
+ {
|
|
|
+ var cityPerm = new List<string>()
|
|
|
+ {
|
|
|
+ "贵州", "重庆", "云南"
|
|
|
+ };
|
|
|
+ var draftInfo = await _sqlSugar.Queryable<Grp_EnterExitCostDraft>().FirstAsync(x => x.Id == draftId && x.IsDel == 0);
|
|
|
+ if (draftInfo != null)
|
|
|
+ {
|
|
|
+ //1.通过团组名称判断是否包含城市
|
|
|
+ if (cityPerm.Any(x => draftInfo.DraftName.Contains(x)))
|
|
|
+ {
|
|
|
+ feeBasePermIds.Add(currUserId);
|
|
|
+ }
|
|
|
+ //2.通过城市Id判断是否包含城市
|
|
|
+ else
|
|
|
+ {
|
|
|
+ var draftProvince = await _sqlSugar.Queryable<Sys_Cities>()
|
|
|
+ .FirstAsync(x => x.Id == draftInfo.ProvinceId && cityPerm.Contains(x.Name_CN) && x.IsDel == 0);
|
|
|
+ if (draftProvince != null) feeBasePermIds.Add(currUserId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (feeBasePermIds.Any())
|
|
|
{
|
|
|
var permissions = new List<Grp_EnterExitCostDraftPermission>();
|