|
@@ -5400,14 +5400,19 @@ FROM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ var gj_jobPostIds = new List<int>() { 22, 32 };
|
|
|
+ var viewPermissionData = await _sqlSugar.Queryable<Sys_Users>()
|
|
|
+ .Where(x => x.IsDel == 0 && ((x.DepId == 7 && gj_jobPostIds.Contains(x.JobPostId)) || x.DepId == 6))
|
|
|
+ .Select(x => new { x.Id, Name = x.CnName })
|
|
|
+ .ToListAsync();
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
GroupNameData = groupNameData.Data,
|
|
|
CurrencyData = _CurrencyData,
|
|
|
WordTypeData = _WordTypeData,
|
|
|
ExcelTypeData = _ExcelTypeData,
|
|
|
- CurrencyInit = _currencyInfos
|
|
|
+ CurrencyInit = _currencyInfos,
|
|
|
+ ViewPermissionData = viewPermissionData
|
|
|
}));
|
|
|
}
|
|
|
|
|
@@ -5473,9 +5478,57 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> GetEnterExitCostInfobyDiId(EnterExitCostInfobyDiIdDto dto)
|
|
|
{
|
|
|
+ if (dto.DiId < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
+ if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
+
|
|
|
return Ok(await _enterExitCostRep.GetEnterExitCostInfoByDiId(dto));
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用 - 设置view权限
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitCostSetViewPermissiion(EnterExitCostSetViewPermissiionDto dto)
|
|
|
+ {
|
|
|
+ if (dto.CurrUserId < 1) return Ok(JsonView(false,MsgTips.UserId));
|
|
|
+ if (dto.GroupId < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
+ if (dto.UserIds.Length < 1) return Ok(JsonView(false, "请传入有效的userId;"));
|
|
|
+
|
|
|
+ var permissions = new List<Grp_EnterExitCostPermission>();
|
|
|
+ foreach (var userId in dto.UserIds)
|
|
|
+ {
|
|
|
+ permissions.Add(new Grp_EnterExitCostPermission { Permission = 1, GroupId = dto.GroupId, UserId = dto.CurrUserId, CreateUserId = userId });
|
|
|
+ }
|
|
|
+ if (permissions.Any())
|
|
|
+ {
|
|
|
+ _sqlSugar.BeginTran();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ await _sqlSugar.Deleteable<Grp_EnterExitCostPermission>().Where(it => it.GroupId == dto.GroupId).ExecuteCommandAsync();
|
|
|
+
|
|
|
+ var result = await _sqlSugar.Insertable(permissions).ExecuteCommandAsync();
|
|
|
+ if (result < 1)
|
|
|
+ {
|
|
|
+ _sqlSugar.RollbackTran();
|
|
|
+ return Ok(JsonView(false));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+
|
|
|
+ _sqlSugar.RollbackTran();
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
+ }
|
|
|
+ _sqlSugar.CommitTran();
|
|
|
+ return Ok(JsonView(true));
|
|
|
+
|
|
|
+ }
|
|
|
+ return Ok(JsonView(false));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用 - Add And Update
|
|
|
/// </summary>
|
|
@@ -7494,13 +7547,20 @@ FROM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ var gj_jobPostIds = new List<int>() { 22, 32 };
|
|
|
+ var viewPermissionData = await _sqlSugar.Queryable<Sys_Users>()
|
|
|
+ .Where(x => x.IsDel == 0 && ((x.DepId == 7 && gj_jobPostIds.Contains(x.JobPostId)) || x.DepId == 6))
|
|
|
+ .Select(x => new { x.Id, Name = x.CnName })
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
DraftNameDatas = draftNameDatas,
|
|
|
CurrencyData = _CurrencyData,
|
|
|
WordTypeData = _WordTypeData,
|
|
|
ExcelTypeData = _ExcelTypeData,
|
|
|
- CurrencyInit = _currencyInfos
|
|
|
+ CurrencyInit = _currencyInfos,
|
|
|
+ ViewPermissionData = viewPermissionData
|
|
|
}));
|
|
|
}
|
|
|
|
|
@@ -7569,6 +7629,50 @@ FROM
|
|
|
return Ok(await _enterExitCostDraftRep.EnterExitCostDraftInfoById(dto));
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用-草稿 - 设置view权限
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitCostDraftSetViewPermissiion(EnterExitCostDraftSetViewPermissiionDto dto)
|
|
|
+ {
|
|
|
+ if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
+ if (dto.DraftId < 1) return Ok(JsonView(false, "请传入有效的DraftId;"));
|
|
|
+ if (dto.UserIds.Length < 1) return Ok(JsonView(false, "请传入有效的userId;"));
|
|
|
+
|
|
|
+ var permissions = new List<Grp_EnterExitCostDraftPermission>();
|
|
|
+ foreach (var userId in dto.UserIds)
|
|
|
+ {
|
|
|
+ permissions.Add(new Grp_EnterExitCostDraftPermission { Permission = 1, DraftId = dto.DraftId, UserId = dto.CurrUserId, CreateUserId = userId });
|
|
|
+ }
|
|
|
+ if (permissions.Any())
|
|
|
+ {
|
|
|
+ _sqlSugar.BeginTran();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ await _sqlSugar.Deleteable<Grp_EnterExitCostDraftPermission>().Where(it => it.DraftId == dto.DraftId).ExecuteCommandAsync();
|
|
|
+
|
|
|
+ var result = await _sqlSugar.Insertable(permissions).ExecuteCommandAsync();
|
|
|
+ if (result < 1)
|
|
|
+ {
|
|
|
+ _sqlSugar.RollbackTran();
|
|
|
+ return Ok(JsonView(false));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+
|
|
|
+ _sqlSugar.RollbackTran();
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
+ }
|
|
|
+ _sqlSugar.CommitTran();
|
|
|
+ return Ok(JsonView(true));
|
|
|
+
|
|
|
+ }
|
|
|
+ return Ok(JsonView(false));
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用-草稿 - Add And Update
|
|
|
/// </summary>
|
|
@@ -7740,9 +7844,16 @@ FROM
|
|
|
airPriceStr += $" {_EnterExitCosts.AirTD.ToString("#0.00")} 元/人(头等舱)";
|
|
|
}
|
|
|
|
|
|
+ string twoItemRemark = "备注:";
|
|
|
+ if (!string.IsNullOrEmpty(_EnterExitCosts.TwoItemRemark))
|
|
|
+ {
|
|
|
+ twoItemRemark = _EnterExitCosts.TwoItemRemark;
|
|
|
+ }
|
|
|
+
|
|
|
dic.Add("AirTotalStr", airTotalStr);
|
|
|
dic.Add("AirPriceStr", airPriceStr);
|
|
|
dic.Add("CityTranffic", _EnterExitCosts.CityTranffic.ToString("#0.00"));
|
|
|
+ dic.Add("TwoItemRemark", twoItemRemark);
|
|
|
|
|
|
NodeCollection allTables = doc.GetChildNodes(NodeType.Table, true);
|
|
|
Aspose.Words.Tables.Table table1 = allTables[0] as Aspose.Words.Tables.Table;
|