|
@@ -5603,20 +5603,6 @@ FROM
|
|
|
|
|
|
#region 团组经理模块 出入境费用
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 团组模块 - 出入境费用 - 基础数据源 - 省份归属
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpGet]
|
|
|
- [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> GetEnterExitProvBelongCostDataSource()
|
|
|
- {
|
|
|
- var provData = await _groupRepository.ProvinceBasicSource();
|
|
|
-
|
|
|
- return Ok(JsonView(true, "查询成功!", provData));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用 - 基础数据源(团组名称/币种类型)
|
|
|
/// </summary>
|
|
@@ -5628,9 +5614,8 @@ FROM
|
|
|
var groupNameData = await _groupRepository.EnterExitCostGroupNameAsync();
|
|
|
var groupNamFirst = groupNameData.FirstOrDefault();
|
|
|
|
|
|
- string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
|
|
|
//SetDataInfoView
|
|
|
- var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
|
|
|
+ var dataSource = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 66) .ToListAsync();
|
|
|
|
|
|
var currencyData = dataSource.Where(it => it.STid == 66).ToList(); //所有币种
|
|
|
List<SetDataInfoView> _CurrencyData = _mapper.Map<List<SetDataInfoView>>(currencyData);
|
|
@@ -5639,43 +5624,7 @@ FROM
|
|
|
int provinceId = 122;
|
|
|
if (groupNamFirst != null) provinceId = groupNamFirst.ProvinceId;
|
|
|
|
|
|
- var wordTypeData = Array.Empty<SetDataInfoView>();
|
|
|
- var excelTypeData = Array.Empty<SetDataInfoView>();
|
|
|
- /*
|
|
|
- * 122 四川
|
|
|
- * 108 贵州
|
|
|
- * 103 重庆
|
|
|
- * 132 云南
|
|
|
- */
|
|
|
- if (provinceId == 122) //四川
|
|
|
- {
|
|
|
- //三公费用-Word明细类型
|
|
|
- wordTypeData = dataSource
|
|
|
- .Where(it => it.STid == 72)
|
|
|
- .Select(x => new SetDataInfoView
|
|
|
- {
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name,
|
|
|
- Remark = x.Remark
|
|
|
- })
|
|
|
- .ToArray();
|
|
|
-
|
|
|
- excelTypeData = dataSource
|
|
|
- .Where(it => it.STid == 73)
|
|
|
- .Select(x => new SetDataInfoView
|
|
|
- {
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name,
|
|
|
- Remark = x.Remark
|
|
|
- })
|
|
|
- .ToArray();
|
|
|
- }
|
|
|
- else if (provinceId == 108) //贵州
|
|
|
- { }
|
|
|
- else if (provinceId == 103) //重庆
|
|
|
- { }
|
|
|
- else if (provinceId == 132) //云南
|
|
|
- { }
|
|
|
+ (SetDataInfoView[] wordTypeData, SetDataInfoView[] excelTypeData) = await _enterExitCostRep.FileOwner(provinceId);
|
|
|
|
|
|
var _currencyInfos = await GeneralMethod.EnterExitCostInitRate();
|
|
|
|
|
@@ -5691,6 +5640,7 @@ FROM
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用
|
|
|
/// 实时汇率 tips
|
|
@@ -7805,13 +7755,52 @@ FROM
|
|
|
|
|
|
#region 团组经理模块 出入境费用-草稿
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用-草稿 - 基础数据源 - 省份归属
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitDraftProvBelongCostDataSource()
|
|
|
+ {
|
|
|
+ var provData = await _groupRepository.ProvinceBasicSource();
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功!", provData));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用-草稿 - 文件类型list 更据省份Id获取
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("{provinceId}")]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitCostDraftFileOwner([FromRoute] int provinceId = 122)
|
|
|
+ {
|
|
|
+ //验证城市归属并给默认值
|
|
|
+ if (provinceId < 1) provinceId = 122;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 122 四川
|
|
|
+ * 108 贵州
|
|
|
+ * 103 重庆
|
|
|
+ * 132 云南
|
|
|
+ */
|
|
|
+ (SetDataInfoView[] wordTypeData, SetDataInfoView[] excelTypeData) = await _enterExitCostDraftRep.FileOwner(provinceId);
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功!", new
|
|
|
+ {
|
|
|
+ WordTypeData = wordTypeData,
|
|
|
+ ExcelTypeData = excelTypeData,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用-草稿 - 基础数据源(团组名称/币种类型)
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> EnterExitCostDraftDataSource(PortDtoBase dto)
|
|
|
+ public async Task<IActionResult> EnterExitCostDraftDataSource(EnterExitCostDraftDataSourceDto dto)
|
|
|
{
|
|
|
var draftNameDatas = await _sqlSugar.Queryable<Grp_EnterExitCostDraft>()
|
|
|
.Where(x => x.IsDel == 0)
|
|
@@ -7821,16 +7810,21 @@ FROM
|
|
|
|
|
|
string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
|
|
|
//SetDataInfoView
|
|
|
- var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
|
|
|
+ var dataSource = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 66).ToListAsync();
|
|
|
|
|
|
var currencyData = dataSource.Where(it => it.STid == 66).ToList(); //所有币种
|
|
|
var _CurrencyData = _mapper.Map<List<SetDataInfoView>>(currencyData);
|
|
|
|
|
|
- var wordTypeData = dataSource.Where(it => it.STid == 72).ToList(); //三公费用-Word明细类型
|
|
|
- var _WordTypeData = _mapper.Map<List<SetDataInfoView>>(wordTypeData);
|
|
|
+ int provinceId = dto.ProvinceId;
|
|
|
+ if (provinceId < 1) provinceId = 122;
|
|
|
|
|
|
- var excelTypeData = dataSource.Where(it => it.STid == 73).ToList(); //三公费用-Excel明细类型
|
|
|
- var _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
|
|
|
+ /*
|
|
|
+ * 122 四川
|
|
|
+ * 108 贵州
|
|
|
+ * 103 重庆
|
|
|
+ * 132 云南
|
|
|
+ */
|
|
|
+ (SetDataInfoView[] wordTypeData, SetDataInfoView[] excelTypeData) = await _enterExitCostRep.FileOwner(provinceId);
|
|
|
|
|
|
//默认币种显示
|
|
|
var _currencyInfos = await GeneralMethod.EnterExitCostInitRate();
|
|
@@ -7841,8 +7835,8 @@ FROM
|
|
|
{
|
|
|
DraftNameDatas = draftNameDatas,
|
|
|
CurrencyData = _CurrencyData,
|
|
|
- WordTypeData = _WordTypeData,
|
|
|
- ExcelTypeData = _ExcelTypeData,
|
|
|
+ WordTypeData = wordTypeData,
|
|
|
+ ExcelTypeData = excelTypeData,
|
|
|
CurrencyInit = _currencyInfos,
|
|
|
ViewPermissionData = viewPermissionData
|
|
|
}));
|
|
@@ -9316,47 +9310,39 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EnterExitCostMobileDataSource(EnterExitCostMobileDataSourceDto dto)
|
|
|
{
|
|
|
- string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
|
|
|
- //SetDataInfoView
|
|
|
- var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
|
|
|
-
|
|
|
- var fileTypes = new List<EecSetDataInfoView>();
|
|
|
-
|
|
|
//验证城市归属并给默认值
|
|
|
int provinceId = dto.ProvinceId;
|
|
|
if (provinceId < 1) provinceId = 122;
|
|
|
|
|
|
- if (provinceId == 122) //四川
|
|
|
- {
|
|
|
- //三公费用-Word明细类型
|
|
|
- var wordTypeData = dataSource
|
|
|
- .Where(it => it.STid == 72)
|
|
|
- .Select(x => new EecSetDataInfoView
|
|
|
- {
|
|
|
- ParentId = 1,
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name
|
|
|
- })
|
|
|
- .ToArray();
|
|
|
+ var dataSource = await _sqlSugar
|
|
|
+ .Queryable<Sys_SetData>()
|
|
|
+ .Where(x => x.IsDel == 0 && (x.STid == 72 || x.STid == 73) && x.Remark.Contains(provinceId.ToString()))
|
|
|
+ .ToListAsync();
|
|
|
|
|
|
- if (wordTypeData.Any()) fileTypes.AddRange(wordTypeData);
|
|
|
- var excelTypeData = dataSource
|
|
|
- .Where(it => it.STid == 73)
|
|
|
- .Select(x => new EecSetDataInfoView
|
|
|
- {
|
|
|
- ParentId = 2,
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name
|
|
|
- })
|
|
|
- .ToArray();
|
|
|
- if (excelTypeData.Any()) fileTypes.AddRange(excelTypeData);
|
|
|
- }
|
|
|
- else if (provinceId == 1409) //贵州
|
|
|
- { }
|
|
|
- else if (provinceId == 1410) //重庆
|
|
|
- { }
|
|
|
- else if (provinceId == 1411) //昆明
|
|
|
- { }
|
|
|
+ var fileTypes = new List<EecSetDataInfoView>();
|
|
|
+
|
|
|
+ //三公费用-Word明细类型
|
|
|
+ var wordTypeData = dataSource
|
|
|
+ .Where(it => it.STid == 72)
|
|
|
+ .Select(x => new EecSetDataInfoView
|
|
|
+ {
|
|
|
+ ParentId = 1,
|
|
|
+ Id = x.Id,
|
|
|
+ Name = x.Name
|
|
|
+ })
|
|
|
+ .ToArray();
|
|
|
+
|
|
|
+ if (wordTypeData.Any()) fileTypes.AddRange(wordTypeData);
|
|
|
+ var excelTypeData = dataSource
|
|
|
+ .Where(it => it.STid == 73)
|
|
|
+ .Select(x => new EecSetDataInfoView
|
|
|
+ {
|
|
|
+ ParentId = 2,
|
|
|
+ Id = x.Id,
|
|
|
+ Name = x.Name
|
|
|
+ })
|
|
|
+ .ToArray();
|
|
|
+ if (excelTypeData.Any()) fileTypes.AddRange(excelTypeData);
|
|
|
|
|
|
|
|
|
var groupNameList = new EecSetDataInfoView() { ParentId = 3, Id = 1, Name = "团组成员名单" };
|
|
@@ -9404,9 +9390,39 @@ FROM
|
|
|
GroupName = x.TeamName,
|
|
|
IsNull = SqlFunc.Subqueryable<Grp_EnterExitCost>().Where(x1 => x1.DiId == x.Id && x1.IsDel == 0).Any() ? false : true,
|
|
|
IsView = SqlFunc.Subqueryable<Grp_EnterExitCostPermission>().Where(x1 => x1.GroupId == x.Id && x1.UserId == dto.CurrUserId).Any(),
|
|
|
+ ProvinceId = x.CityId
|
|
|
})
|
|
|
.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
|
+ //处理省份Id
|
|
|
+ if (data.Any())
|
|
|
+ {
|
|
|
+ var provCityDatas = await _groupRepository.ProvinceCityBasicSource();
|
|
|
+ if (provCityDatas.Any())
|
|
|
+ {
|
|
|
+ foreach (var item in data)
|
|
|
+ {
|
|
|
+ var provinceId = item.ProvinceId;
|
|
|
+ var isDefualtVal = true;
|
|
|
+ if (provinceId > 0)
|
|
|
+ {
|
|
|
+ var parentId = _groupRepository.FindParentIdByChildId(provCityDatas, provinceId);
|
|
|
+ if (parentId != null)
|
|
|
+ {
|
|
|
+ isDefualtVal = false;
|
|
|
+ item.ProvinceId = (int)parentId;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isDefualtVal)
|
|
|
+ {
|
|
|
+ item.ProvinceId = 122; //默认四川
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //处理是否显示
|
|
|
if (basicUserId.Any(x => x.Id == dto.CurrUserId))
|
|
|
{
|
|
|
foreach (var item in data)
|
|
@@ -10030,11 +10046,11 @@ FROM
|
|
|
int id = dto.Id;
|
|
|
if (id <= 0) //add
|
|
|
{
|
|
|
- int provinceId = dto.ProvinceId,
|
|
|
- groupId = dto.DiId;
|
|
|
+ //int provinceId = dto.ProvinceId;
|
|
|
+ int groupId = dto.DiId;
|
|
|
|
|
|
- if (provinceId < 1) provinceId = 122;
|
|
|
- var info = new Grp_EnterExitCost() { ProvinceId = provinceId, DiId = groupId, CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId };
|
|
|
+ //if (provinceId < 1) provinceId = 122;
|
|
|
+ var info = new Grp_EnterExitCost() { DiId = groupId, CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId };
|
|
|
|
|
|
var add = await _sqlSugar.Insertable(info).ExecuteCommandAsync();
|
|
|
|
|
@@ -10154,7 +10170,7 @@ FROM
|
|
|
if (dto.DiId < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
- if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
+ //if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
|
|
|
var checkboxInfo = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
|
|
@@ -10203,8 +10219,8 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EnterExitCostMobileOpSingleCheckbox(EnterExitCostMobileOpSingleCheckboxDto dto)
|
|
|
{
|
|
|
- int itemTypeId = dto.ItemType, id = dto.Id, currUserId = dto.CurrUserId, diId = dto.DiId, isSelected = dto.IsSelected, provinceId = dto.ProvinceId;
|
|
|
- if (provinceId < 1) provinceId = 122;
|
|
|
+ int itemTypeId = dto.ItemType, id = dto.Id, currUserId = dto.CurrUserId, diId = dto.DiId, isSelected = dto.IsSelected;
|
|
|
+ // if (provinceId < 1) provinceId = 122;
|
|
|
var itemTypes = new List<int>() { 3, 4, 5, 6, 7 };
|
|
|
|
|
|
if (!_portTypeData.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
@@ -10215,7 +10231,7 @@ FROM
|
|
|
var checkboxInfo = new Grp_EnterExitCost()
|
|
|
{
|
|
|
Id = id,
|
|
|
- ProvinceId = provinceId,
|
|
|
+ //ProvinceId = provinceId,
|
|
|
DiId = diId,
|
|
|
CreateUserId = currUserId
|
|
|
};
|
|
@@ -10267,7 +10283,7 @@ FROM
|
|
|
if (dto.DiId < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
- if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
+ //if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
|
|
|
var info = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
info.FirstItemRemark = dto.FirstItemRemark;
|
|
@@ -10325,12 +10341,12 @@ FROM
|
|
|
if (!_portTypeData.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
|
if (dto.DiId < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
- if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
+ //if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
|
|
|
var info = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
|
|
|
info.DiId = dto.DiId;
|
|
|
- info.ProvinceId = dto.ProvinceId;
|
|
|
+ //info.ProvinceId = dto.ProvinceId;
|
|
|
info.OutsideJJPay = dto.OutsideJJPay;
|
|
|
info.OutsideGWPay = dto.OutsideGWPay;
|
|
|
info.OutsideTDPay = dto.OutsideTDPay;
|
|
@@ -10694,6 +10710,19 @@ FROM
|
|
|
|
|
|
#region 团组经理模块 出入境费用-草稿 移动端(Android/IOS)
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用-草稿 - 基础数据源 - 省份归属
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitDraftMobileProvBelongCostDataSource()
|
|
|
+ {
|
|
|
+ var provData = await _groupRepository.ProvinceBasicSource();
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功!", provData));
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用-草稿-移动端 - 草稿名称数据Data
|
|
|
/// </summary>
|
|
@@ -10742,46 +10771,34 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EnterExitCostDraftMobileDataSource(EnterExitCostDraftMobileDataSourceDto dto)
|
|
|
{
|
|
|
- string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
|
|
|
- //SetDataInfoView
|
|
|
- var dataSource = await _sqlSugar.SqlQueryable<Sys_SetData>(sql).ToListAsync();
|
|
|
-
|
|
|
+ //验证城市归属并给默认值
|
|
|
int provinceId = dto.ProvinceId;
|
|
|
if (provinceId < 1) provinceId = 122;
|
|
|
- List<SetDataInfoView> wordTypeData = new List<SetDataInfoView>();
|
|
|
- List<SetDataInfoView> excelTypeData = new List<SetDataInfoView>();
|
|
|
|
|
|
- if (provinceId == 122) //四川
|
|
|
- {
|
|
|
- //三公费用-Word明细类型
|
|
|
- wordTypeData = dataSource.Where(it => it.STid == 72)
|
|
|
+ var dataSource = await _sqlSugar
|
|
|
+ .Queryable<Sys_SetData>()
|
|
|
+ .Where(x => x.IsDel == 0 && (x.STid == 72 || x.STid == 73) && x.Remark.Contains(provinceId.ToString()))
|
|
|
+ .ToListAsync();
|
|
|
+
|
|
|
+ //三公费用-Word明细类型
|
|
|
+ var wordTypeData = dataSource.Where(it => it.STid == 72)
|
|
|
.Select(x => new SetDataInfoView
|
|
|
{
|
|
|
Id = x.Id,
|
|
|
Name = x.Name,
|
|
|
Remark = x.Remark
|
|
|
})
|
|
|
- .OrderBy(x => x.RemarkSort)
|
|
|
.ToList();
|
|
|
|
|
|
- //三公费用-Excel明细类型
|
|
|
- excelTypeData = dataSource.Where(it => it.STid == 73)
|
|
|
+ //三公费用-Excel明细类型
|
|
|
+ var excelTypeData = dataSource.Where(it => it.STid == 73)
|
|
|
.Select(x => new SetDataInfoView
|
|
|
{
|
|
|
Id = x.Id,
|
|
|
Name = x.Name,
|
|
|
Remark = x.Remark
|
|
|
})
|
|
|
- .OrderBy(x => x.RemarkSort)
|
|
|
.ToList();
|
|
|
- }
|
|
|
- else if (provinceId == 1409) //贵州
|
|
|
- { }
|
|
|
- else if (provinceId == 1410) //重庆
|
|
|
- { }
|
|
|
- else if (provinceId == 1411) //昆明
|
|
|
- { }
|
|
|
-
|
|
|
|
|
|
//默认币种显示
|
|
|
var _currencyInfos = await EnterExitCostMobileGetCurrencyInit();
|
|
@@ -11450,6 +11467,42 @@ FROM
|
|
|
return Ok(JsonView(false));
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 团组模块 - 出入境费用-草稿-移动端 - OP --> 省份
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> EnterExitCostDraftMobileOpProv(EnterExitCostDraftMobileOpProvDto dto)
|
|
|
+ {
|
|
|
+ if (!_portTypeData.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
|
+ if (dto.DraftId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
+ if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
+ if (dto.ProvinceId < 1) return Ok(JsonView(false, "请传入有效的省份Id!"));
|
|
|
+
|
|
|
+ int id = dto.DraftId;
|
|
|
+ if (id <= 0) //add
|
|
|
+ {
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 122;
|
|
|
+
|
|
|
+ var add = await _sqlSugar.Insertable(new Grp_EnterExitCostDraft() { ProvinceId = dto.ProvinceId, CreateUserId = dto.CurrUserId }).ExecuteCommandAsync();
|
|
|
+
|
|
|
+ if (add < 1) return Ok(JsonView(false));
|
|
|
+ id = add;
|
|
|
+ }
|
|
|
+ else //update
|
|
|
+ {
|
|
|
+ //验证查看编辑权限
|
|
|
+ (bool viewPerm, bool assignPerm) = await _enterExitCostDraftRep.PermissionValidationAsync(dto.DraftId, dto.CurrUserId);
|
|
|
+ if (!viewPerm) return Ok(JsonView(false, _viewPermStr));
|
|
|
+
|
|
|
+ var upd = await _sqlSugar.Updateable<Grp_EnterExitCostDraft>().SetColumns(x => new Grp_EnterExitCostDraft() { ProvinceId = dto.ProvinceId }).Where(x => x.Id == dto.DraftId).ExecuteCommandAsync();
|
|
|
+ if (upd < 1) return Ok(JsonView(false));
|
|
|
+ }
|
|
|
+
|
|
|
+ return Ok(JsonView(new { parentId = id }));
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用-草稿-移动端 - OP --> 汇率
|
|
|
/// </summary>
|
|
@@ -11623,7 +11676,7 @@ FROM
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 团组模块 - 出入境费用-草稿-移动端 - OP --> 3-7项复选框单个复选框更改
|
|
|
+ /// 团组模块 - 出入境费用-草稿-移动端 - OP --> 3-7项复选框单个复选框
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|