|
@@ -1,4 +1,5 @@
|
|
|
using Aspose.Cells;
|
|
|
+using Aspose.Cells.Drawing;
|
|
|
using Aspose.Words;
|
|
|
using Aspose.Words.Drawing;
|
|
|
using Aspose.Words.Tables;
|
|
@@ -190,7 +191,7 @@ namespace OASystem.API.Controllers
|
|
|
SetDataRepository setDataRep,
|
|
|
TourClientListRepository tourClientListRep,
|
|
|
TeamRateRepository teamRateRep,
|
|
|
- UsersRepository usersRep,
|
|
|
+ UsersRepository usersRep,
|
|
|
IJuHeApiService juHeApi,
|
|
|
InvertedListRepository invertedListRep,
|
|
|
VisaFeeInfoRepository visaFeeInfoRep,
|
|
@@ -496,7 +497,7 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> CityByCountry(string countryLabel)
|
|
|
{
|
|
|
- countryLabel=HttpUtility.UrlDecode(countryLabel);
|
|
|
+ countryLabel = HttpUtility.UrlDecode(countryLabel);
|
|
|
var countryList = countryLabel.Split(',', StringSplitOptions.RemoveEmptyEntries).ToArray();
|
|
|
var citys = Array.Empty<string?>();
|
|
|
if (countryList.Any())
|
|
@@ -517,7 +518,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
citys = cityDatas1.Select(x => x.City).Distinct().ToArray();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return Ok(JsonView(citys));
|
|
|
}
|
|
|
|
|
@@ -554,7 +555,7 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> GroupOrderPreInfoFileDownload([FromRoute] GroupOrderPreInfoDto dto)
|
|
|
{
|
|
|
- int id = dto.Id,tempId = dto.TempId;
|
|
|
+ int id = dto.Id, tempId = dto.TempId;
|
|
|
|
|
|
var view = await _grpOrderPreInfoRep.InfoAsync(id, tempId);
|
|
|
|
|
@@ -579,7 +580,7 @@ namespace OASystem.API.Controllers
|
|
|
fileNamePrefix = $"{data.Name}_有商邀版";
|
|
|
}
|
|
|
else
|
|
|
- {
|
|
|
+ {
|
|
|
//tempId == 1404 默认下载
|
|
|
tempPath += $"前期需客户提供信息_单接送机Temp.xlsx";
|
|
|
fileNamePrefix = $"{data.Name}_单接送机";
|
|
@@ -602,7 +603,8 @@ namespace OASystem.API.Controllers
|
|
|
else if (obj is string[] stringArray)
|
|
|
{
|
|
|
item.OriginVal = string.Join("、", stringArray);
|
|
|
- } else if (obj.Equals("-"))
|
|
|
+ }
|
|
|
+ else if (obj.Equals("-"))
|
|
|
{
|
|
|
item.OriginVal = "";
|
|
|
}
|
|
@@ -634,7 +636,7 @@ namespace OASystem.API.Controllers
|
|
|
designer.SetDataSource("View", data.Items);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
designer.Process();
|
|
|
|
|
|
if (!Directory.Exists(savePath))
|
|
@@ -5578,7 +5580,6 @@ FROM
|
|
|
|
|
|
#region 团组经理模块 出入境费用
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 团组模块 - 出入境费用 - 基础数据源 - 省份归属
|
|
|
/// </summary>
|
|
@@ -5589,7 +5590,8 @@ FROM
|
|
|
{
|
|
|
var provData = await _sqlSugar.Queryable<Sys_SetData>().Where(x => x.IsDel == 0 && x.STid == 110).ToListAsync();
|
|
|
|
|
|
- var view = provData.Select(x => {
|
|
|
+ var view = provData.Select(x =>
|
|
|
+ {
|
|
|
|
|
|
int.TryParse(x.Remark, out int val);
|
|
|
|
|
@@ -5766,7 +5768,7 @@ FROM
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
- [ApiLog("Grp_EnterExitCost",OperationEnum.Add)]
|
|
|
+ [ApiLog("Grp_EnterExitCost", OperationEnum.Add)]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostEnterExitCostOperate(EnterExitCostOperateDto dto)
|
|
|
{
|
|
@@ -6362,7 +6364,8 @@ FROM
|
|
|
totalLabel += $"{subJJC.ToString("#0.00")} 元/人(经济舱)";
|
|
|
}
|
|
|
//公务舱
|
|
|
- if (_EnterExitCosts.SumGWC == 1) {
|
|
|
+ if (_EnterExitCosts.SumGWC == 1)
|
|
|
+ {
|
|
|
subGWC = otherFeeTotal + _EnterExitCosts.OutsideGWPay;
|
|
|
totalLabel += $"{subGWC.ToString("#0.00")} 元/人(公务舱)";
|
|
|
}
|
|
@@ -7560,7 +7563,8 @@ FROM
|
|
|
JoinType.Left, ntf.ProvinceId == sd2.Id
|
|
|
))
|
|
|
.Where((ntf, sd1, u, sd2) => ntf.IsDel == 0 && ntf.ProvinceId == provinceId)
|
|
|
- .Select((ntf, sd1, u, sd2) => new NationalTravelFeeInfoView {
|
|
|
+ .Select((ntf, sd1, u, sd2) => new NationalTravelFeeInfoView
|
|
|
+ {
|
|
|
Id = ntf.Id,
|
|
|
ProvinceId = ntf.ProvinceId,
|
|
|
ProvinceName = sd2.Name,
|
|
@@ -7578,7 +7582,7 @@ FROM
|
|
|
LastUpdateTime = ntf.LastUpdateTime
|
|
|
})
|
|
|
.ToListAsync();
|
|
|
-
|
|
|
+
|
|
|
return Ok(JsonView(true, "查询成功!", nftData));
|
|
|
|
|
|
}
|
|
@@ -7654,13 +7658,13 @@ FROM
|
|
|
JoinType.Left, ntf.ProvinceId == sd2.Id
|
|
|
))
|
|
|
.Where((ntf, sd1, u, sd2) => ntf.IsDel == 0)
|
|
|
- .WhereIF(dto.ProvinceId > 0 , (ntf, sd1, u, sd2) => ntf.ProvinceId == dto.ProvinceId)
|
|
|
+ .WhereIF(dto.ProvinceId > 0, (ntf, sd1, u, sd2) => ntf.ProvinceId == dto.ProvinceId)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Country), (ntf, sd1, u, sd2) => ntf.Country.Contains(dto.Country))
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.City), (ntf, sd1, u, sd2) => ntf.City.Contains(dto.City))
|
|
|
.OrderByDescending((ntf, sd1, u, sd2) => ntf.LastUpdateTime)
|
|
|
.Select((ntf, sd1, u, sd2) => new NationalTravelFeePageInfoView
|
|
|
{
|
|
|
- RowNumber = SqlFunc.RowNumber($"{ntf.LastUpdateTime} Desc"),
|
|
|
+ RowNumber = SqlFunc.RowNumber($"{ntf.LastUpdateTime} Desc"),
|
|
|
Id = ntf.Id,
|
|
|
ProvinceId = ntf.ProvinceId,
|
|
|
ProvinceName = sd2.Name,
|
|
@@ -8417,7 +8421,7 @@ FROM
|
|
|
#endregion
|
|
|
}
|
|
|
//else dic.Add("SubQT", "七、其他费用合计: 0 元/人");
|
|
|
-
|
|
|
+
|
|
|
//删除多余行
|
|
|
while (table5.Rows.Count > table5Row)
|
|
|
{
|
|
@@ -9200,7 +9204,7 @@ FROM
|
|
|
}
|
|
|
|
|
|
//默认添加查看、编辑权限(创建人、自己)
|
|
|
- await _enterExitCostRep.InitPerm(dto.GroupId,dto.UserId);
|
|
|
+ await _enterExitCostRep.InitPerm(dto.GroupId, dto.UserId);
|
|
|
|
|
|
var dayDatas = _sqlSugar.Queryable<Grp_DayAndCostDraft>().Where(x => x.IsDel == 0 && x.ParentId == draftId).ToList();
|
|
|
var otherDatas = _sqlSugar.Queryable<Grp_DayOtherPriceDraft>().Where(x => x.IsDel == 0 && x.ParentId == draftId).ToList();
|
|
@@ -9297,7 +9301,7 @@ FROM
|
|
|
/// <returns></returns>
|
|
|
private async Task<List<CurrencyInfo>> EnterExitCostMobileGetCurrencyInit()
|
|
|
{
|
|
|
- return await GeneralMethod.EnterExitCostInitRate();
|
|
|
+ return await GeneralMethod.EnterExitCostInitRate();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -9306,7 +9310,7 @@ FROM
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> EnterExitCostMobileDataSource(PortDtoBase dto)
|
|
|
+ public async Task<IActionResult> EnterExitCostMobileDataSource(EnterExitCostMobileDataSourceDto dto)
|
|
|
{
|
|
|
string sql = string.Format("Select * From Sys_SetData Where IsDel = 0");
|
|
|
//SetDataInfoView
|
|
@@ -9314,22 +9318,42 @@ FROM
|
|
|
|
|
|
var fileTypes = new List<EecSetDataInfoView>();
|
|
|
|
|
|
- var wordTypeData = dataSource.Where(it => it.STid == 72).Select(x => new EecSetDataInfoView() {
|
|
|
- ParentId = 1,
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name
|
|
|
-
|
|
|
- }) .ToList(); //三公费用-Word明细类型
|
|
|
- if (wordTypeData.Any()) fileTypes.AddRange(wordTypeData);
|
|
|
+ //验证城市归属并给默认值
|
|
|
+ int provinceId = dto.ProvinceId;
|
|
|
+ if (provinceId < 1) provinceId = 1408;
|
|
|
|
|
|
- var excelTypeData = dataSource.Where(it => it.STid == 73)
|
|
|
- .Select(x => new EecSetDataInfoView()
|
|
|
+ if (provinceId == 1408) //四川
|
|
|
{
|
|
|
- ParentId = 2,
|
|
|
- Id = x.Id,
|
|
|
- Name = x.Name
|
|
|
- }).ToList(); //三公费用-Excel明细类型
|
|
|
- if (excelTypeData.Any()) fileTypes.AddRange(excelTypeData);
|
|
|
+ //三公费用-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);
|
|
|
+ }
|
|
|
+ else if (provinceId == 1409) //贵州
|
|
|
+ { }
|
|
|
+ else if (provinceId == 1410) //重庆
|
|
|
+ { }
|
|
|
+ else if (provinceId == 1411) //昆明
|
|
|
+ { }
|
|
|
+
|
|
|
|
|
|
var groupNameList = new EecSetDataInfoView() { ParentId = 3, Id = 1, Name = "团组成员名单" };
|
|
|
fileTypes.Add(groupNameList);
|
|
@@ -9386,7 +9410,7 @@ FROM
|
|
|
item.IsView = true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return Ok(JsonView(true, "查询成功!", data, total));
|
|
|
}
|
|
|
|
|
@@ -9493,14 +9517,18 @@ FROM
|
|
|
Stopwatch sw = new Stopwatch();
|
|
|
sw.Start();
|
|
|
|
|
|
+ int provinceId = dto.ProvinceId;
|
|
|
+ if (provinceId < 1) provinceId = 1408; // 默认四川
|
|
|
+
|
|
|
RefAsync<int> total = 0;
|
|
|
|
|
|
var data = await _sqlSugar.Queryable<Grp_NationalTravelFee>()
|
|
|
.LeftJoin<Sys_SetData>((ntf, sd) => ntf.Currency == sd.Id)
|
|
|
.LeftJoin<Sys_Users>((ntf, sd, u) => ntf.CreateUserId == u.Id)
|
|
|
- .Where((ntf, sd, u) => ntf.IsDel == 0)
|
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Search), (ntf, sd, u) => dto.Search.Contains(ntf.Country) || dto.Search.Contains(ntf.City))
|
|
|
- .Select((ntf, sd, u) => new
|
|
|
+ .LeftJoin<Sys_SetData>((ntf, sd, u, sd1) => ntf.ProvinceId == sd1.Id)
|
|
|
+ .Where((ntf, sd, u, sd1) => ntf.IsDel == 0 && ntf.ProvinceId == provinceId)
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Search), (ntf, sd, u, sd1) => dto.Search.Contains(ntf.Country) || dto.Search.Contains(ntf.City))
|
|
|
+ .Select((ntf, sd, u, sd1) => new
|
|
|
{
|
|
|
Id = ntf.Id,
|
|
|
Area = $"{ntf.Country}-{ntf.City}",
|
|
@@ -9513,8 +9541,7 @@ FROM
|
|
|
TrainCost = ntf.TrainCost,
|
|
|
LastUpdateUserId = ntf.LastUpdateUserId,
|
|
|
LastUpdateUserName = u.CnName,
|
|
|
- LastUpdateTime = ntf.LastUpdateTime,
|
|
|
-
|
|
|
+ LastUpdateTime = ntf.LastUpdateTime
|
|
|
})
|
|
|
.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
@@ -9999,7 +10026,13 @@ FROM
|
|
|
int id = dto.Id;
|
|
|
if (id <= 0) //add
|
|
|
{
|
|
|
- var add = await _sqlSugar.Insertable(new Grp_EnterExitCost() { CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId }).ExecuteCommandAsync();
|
|
|
+ int provinceId = dto.ProvinceId,
|
|
|
+ groupId = dto.DiId;
|
|
|
+
|
|
|
+ if (provinceId < 1) provinceId = 1408;
|
|
|
+ var info = new Grp_EnterExitCost() { ProvinceId = provinceId, DiId = groupId, CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId };
|
|
|
+
|
|
|
+ var add = await _sqlSugar.Insertable(info).ExecuteCommandAsync();
|
|
|
|
|
|
if (add < 1) return Ok(JsonView(false));
|
|
|
id = add;
|
|
@@ -10117,6 +10150,8 @@ 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 = 1408;
|
|
|
+
|
|
|
var checkboxInfo = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
|
|
|
int id = dto.Id;
|
|
@@ -10164,7 +10199,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;
|
|
|
+ int itemTypeId = dto.ItemType, id = dto.Id, currUserId = dto.CurrUserId, diId = dto.DiId, isSelected = dto.IsSelected, provinceId = dto.ProvinceId;
|
|
|
+ if (provinceId < 1) provinceId = 1408;
|
|
|
var itemTypes = new List<int>() { 3, 4, 5, 6, 7 };
|
|
|
|
|
|
if (!_portTypeData.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
@@ -10175,6 +10211,7 @@ FROM
|
|
|
var checkboxInfo = new Grp_EnterExitCost()
|
|
|
{
|
|
|
Id = id,
|
|
|
+ ProvinceId = provinceId,
|
|
|
DiId = diId,
|
|
|
CreateUserId = currUserId
|
|
|
};
|
|
@@ -10226,6 +10263,8 @@ 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 = 1408;
|
|
|
+
|
|
|
var info = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
info.FirstItemRemark = dto.FirstItemRemark;
|
|
|
info.InsidePay = dto.Visa + dto.Service + dto.Safe + dto.Ticket + dto.HeSuan + dto.YiMiao;
|
|
@@ -10282,9 +10321,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 = 1408;
|
|
|
|
|
|
var info = _mapper.Map<Grp_EnterExitCost>(dto);
|
|
|
|
|
|
+ info.DiId = dto.DiId;
|
|
|
+ info.ProvinceId = dto.ProvinceId;
|
|
|
info.OutsideJJPay = dto.OutsideJJPay;
|
|
|
info.OutsideGWPay = dto.OutsideGWPay;
|
|
|
info.OutsideTDPay = dto.OutsideTDPay;
|
|
@@ -10369,6 +10411,7 @@ FROM
|
|
|
var feeTypeIds = new List<int>() { 1, 2, 3, 4, };
|
|
|
if (!feeTypeIds.Contains(dto.FeeType)) return Ok(JsonView(false, "请传入有效的费用类型!"));
|
|
|
|
|
|
+
|
|
|
var infos1 = _mapper.Map<List<Grp_DayAndCost>>(dto.Infos);
|
|
|
var infos = infos1.Select(x => new Grp_DayAndCost
|
|
|
{
|
|
@@ -10693,17 +10736,48 @@ FROM
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> EnterExitCostDraftMobileDataSource(PortDtoBase dto)
|
|
|
+ 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();
|
|
|
|
|
|
- var wordTypeData = dataSource.Where(it => it.STid == 72).ToList(); //三公费用-Word明细类型
|
|
|
- List<SetDataInfoView> _WordTypeData = _mapper.Map<List<SetDataInfoView>>(wordTypeData);
|
|
|
+ int provinceId = dto.ProvinceId;
|
|
|
+ if (provinceId < 1) provinceId = 1408;
|
|
|
+ List<SetDataInfoView> wordTypeData = new List<SetDataInfoView>();
|
|
|
+ List<SetDataInfoView> excelTypeData = new List<SetDataInfoView>();
|
|
|
+
|
|
|
+ if (provinceId == 1408) //四川
|
|
|
+ {
|
|
|
+ //三公费用-Word明细类型
|
|
|
+ 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)
|
|
|
+ .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 excelTypeData = dataSource.Where(it => it.STid == 73).ToList(); //三公费用-Excel明细类型
|
|
|
- List<SetDataInfoView> _ExcelTypeData = _mapper.Map<List<SetDataInfoView>>(excelTypeData);
|
|
|
|
|
|
//默认币种显示
|
|
|
var _currencyInfos = await EnterExitCostMobileGetCurrencyInit();
|
|
@@ -10711,8 +10785,8 @@ FROM
|
|
|
|
|
|
return Ok(JsonView(true, "查询成功!", new
|
|
|
{
|
|
|
- WordTypeData = _WordTypeData,
|
|
|
- ExcelTypeData = _ExcelTypeData,
|
|
|
+ WordTypeData = wordTypeData,
|
|
|
+ ExcelTypeData = excelTypeData,
|
|
|
CurrencyInit = _currencyInfos,
|
|
|
viewPermissionData = viewPermissionData
|
|
|
}));
|
|
@@ -10879,13 +10953,16 @@ FROM
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(dto.DraftName)) return Ok(JsonView(false, "草稿名称为空!"));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
|
|
|
var eecInfo = await _sqlSugar.Queryable<Grp_EnterExitCostDraft>().OrderByDescending(x => x.CreateTime).FirstAsync(it => it.DraftName.Equals(dto.DraftName) && it.IsDel == 0);
|
|
|
if (eecInfo != null) return Ok(JsonView(false, "草稿名称重复!"));
|
|
|
|
|
|
var rateInfos = await EnterExitCostMobileGetCurrencyInit();
|
|
|
|
|
|
- var info = new Grp_EnterExitCostDraft() {
|
|
|
+ var info = new Grp_EnterExitCostDraft()
|
|
|
+ {
|
|
|
+ ProvinceId = dto.ProvinceId,
|
|
|
DraftName = dto.DraftName,
|
|
|
CurrencyRemark = CommonFun.GetCurrencyChinaToString(rateInfos),
|
|
|
CreateUserId = dto.CurrUserId
|
|
@@ -10893,12 +10970,13 @@ FROM
|
|
|
|
|
|
_sqlSugar.BeginTran();
|
|
|
var draftId = await _sqlSugar.Insertable(info).ExecuteReturnIdentityAsync();
|
|
|
- if (draftId < 1) {
|
|
|
+ if (draftId < 1)
|
|
|
+ {
|
|
|
_sqlSugar.RollbackTran();
|
|
|
return Ok(JsonView(false, "草稿创建失败!"));
|
|
|
}
|
|
|
//添加默认权限
|
|
|
- await _enterExitCostDraftRep.InitPerm(draftId,dto.CurrUserId);
|
|
|
+ await _enterExitCostDraftRep.InitPerm(draftId, dto.CurrUserId);
|
|
|
_sqlSugar.CommitTran();
|
|
|
|
|
|
(bool viewPerm, bool assignPerm) = await _enterExitCostDraftRep.PermissionValidationAsync(draftId, dto.CurrUserId);
|
|
@@ -10938,7 +11016,7 @@ FROM
|
|
|
if (!viewPerm) return Ok(JsonView(false, _viewPermStr));
|
|
|
|
|
|
mobileInfo = _mapper.Map<EnterExitCostDraftMobileParentInfoView>(eecInfo);
|
|
|
-
|
|
|
+ mobileInfo.ProvinceId = eecInfo.ProvinceId;
|
|
|
mobileInfo.IsAssignPerm = assignPerm;
|
|
|
|
|
|
var dayAndCostData = _sqlSugar.Queryable<Grp_DayAndCostDraft>()
|
|
@@ -11316,7 +11394,7 @@ FROM
|
|
|
{
|
|
|
bool isView1 = false;
|
|
|
if (userIds.Any(x => x == item.Id)) isView1 = true;
|
|
|
- else if (viewPermissionData.Any(x => x.Id ==dto.CurrUserId) && item.Id == dto.CurrUserId) isView1 = true;
|
|
|
+ else if (viewPermissionData.Any(x => x.Id == dto.CurrUserId) && item.Id == dto.CurrUserId) isView1 = true;
|
|
|
perUsersView.Add(new { Id = item.Id, Name = item.Name, IsView = isView1 });
|
|
|
}
|
|
|
|
|
@@ -11384,7 +11462,9 @@ FROM
|
|
|
int id = dto.DraftId;
|
|
|
if (id <= 0) //add
|
|
|
{
|
|
|
- var add = await _sqlSugar.Insertable(new Grp_EnterExitCostDraft() { CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId }).ExecuteCommandAsync();
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
+
|
|
|
+ var add = await _sqlSugar.Insertable(new Grp_EnterExitCostDraft() { ProvinceId = dto.ProvinceId, CurrencyRemark = currencyStr, CreateUserId = dto.CurrUserId }).ExecuteCommandAsync();
|
|
|
|
|
|
if (add < 1) return Ok(JsonView(false));
|
|
|
id = add;
|
|
@@ -11503,10 +11583,11 @@ FROM
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
var checkboxInfo = _mapper.Map<Grp_EnterExitCostDraft>(dto);
|
|
|
-
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
int id = dto.DraftId;
|
|
|
if (id <= 0) //add
|
|
|
{
|
|
|
+ checkboxInfo.ProvinceId = dto.ProvinceId;
|
|
|
checkboxInfo.CreateUserId = dto.CurrUserId;
|
|
|
checkboxInfo.CurrencyRemark = JsonConvert.SerializeObject(await EnterExitCostDraftMobileGetCurrencyInit());
|
|
|
var add = await _sqlSugar.Insertable(checkboxInfo).ExecuteCommandAsync();
|
|
@@ -11553,9 +11634,11 @@ FROM
|
|
|
if (currUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
if (!itemTypes.Contains(itemTypeId)) return Ok(JsonView(false, $"请传入要修改的项类型;3:住宿费; 4:伙食费; 5:公杂费; 6:培训费;7:其他;"));
|
|
|
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
var checkboxInfo = new Grp_EnterExitCostDraft()
|
|
|
{
|
|
|
Id = draftId,
|
|
|
+ ProvinceId = dto.ProvinceId,
|
|
|
CreateUserId = currUserId
|
|
|
};
|
|
|
|
|
@@ -11603,7 +11686,10 @@ FROM
|
|
|
if (id < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
if (currUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
+
|
|
|
var info = _mapper.Map<Grp_EnterExitCostDraft>(dto);
|
|
|
+ info.ProvinceId = dto.ProvinceId;
|
|
|
info.FirstItemRemark = dto.FirstItemRemark;
|
|
|
info.InsidePay = dto.Visa + dto.Service + dto.Safe + dto.Ticket + dto.HeSuan + dto.YiMiao;
|
|
|
|
|
@@ -11657,8 +11743,10 @@ FROM
|
|
|
if (id < 1) return Ok(JsonView(false, MsgTips.DiId));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
- var info = _mapper.Map<Grp_EnterExitCostDraft>(dto);
|
|
|
+ if (dto.ProvinceId < 1) dto.ProvinceId = 1408;
|
|
|
|
|
|
+ var info = _mapper.Map<Grp_EnterExitCostDraft>(dto);
|
|
|
+ info.ProvinceId = dto.ProvinceId;
|
|
|
info.OutsideJJPay = dto.OutsideJJPay;
|
|
|
info.OutsideGWPay = dto.OutsideGWPay;
|
|
|
info.OutsideTDPay = dto.OutsideTDPay;
|
|
@@ -12056,7 +12144,7 @@ FROM
|
|
|
{
|
|
|
int groupId = dto.DiId,
|
|
|
currUserId = dto.CurrUserId;
|
|
|
- if (groupId < 1) return Ok(JsonView(false,"请传入有效的GroupId;"));
|
|
|
+ if (groupId < 1) return Ok(JsonView(false, "请传入有效的GroupId;"));
|
|
|
if (currUserId < 1) return Ok(JsonView(false, "请传入有效的CurrUserId;"));
|
|
|
|
|
|
var info = await _enterExitCostRep.GetEnterExitCostInfoByDiId(dto);
|
|
@@ -12163,7 +12251,7 @@ FROM
|
|
|
{
|
|
|
feeName = countryInfo.Country;
|
|
|
var city = countryInfo.City;
|
|
|
-
|
|
|
+
|
|
|
if (!string.IsNullOrEmpty(city) && cityFilter.Any(x => !x.Contains(city)))
|
|
|
{
|
|
|
feeName += $"-{city}";
|
|
@@ -12297,11 +12385,12 @@ FROM
|
|
|
#endregion
|
|
|
|
|
|
#region 签证+保险 1362
|
|
|
- int visaInsIndex = 1;
|
|
|
+ int visaInsIndex = 1;
|
|
|
int visaInsItemTypeId = 1362;
|
|
|
if (infoView.Visa > 0)
|
|
|
{
|
|
|
- views.Add(new QuoteSubItemInfo() {
|
|
|
+ views.Add(new QuoteSubItemInfo()
|
|
|
+ {
|
|
|
ItemId = visaInsItemTypeId,
|
|
|
Index = visaInsIndex,
|
|
|
FeeName = $"签证",
|
|
@@ -12413,7 +12502,7 @@ FROM
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> EnterExitCostQuoteItemDel(EnterExitCostQuoteItemDelDto dto)
|
|
|
{
|
|
|
- if (dto.Id < 1) return Ok(JsonView(false,MsgTips.Id));
|
|
|
+ if (dto.Id < 1) return Ok(JsonView(false, MsgTips.Id));
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
return Ok(await _enterExitCostQuoteRep.ItemDelAsync(dto));
|
|
@@ -12431,7 +12520,7 @@ FROM
|
|
|
if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId));
|
|
|
|
|
|
|
|
|
- var info = await _enterExitCostQuoteRep.InfoAsync(new EnterExitCostQuoteInfoDto() { Id= dto.Id });
|
|
|
+ var info = await _enterExitCostQuoteRep.InfoAsync(new EnterExitCostQuoteInfoDto() { Id = dto.Id });
|
|
|
if (info == null) return Ok(JsonView(false, "报价信息未填写!"));
|
|
|
|
|
|
var rates = info.Rates;
|
|
@@ -12461,7 +12550,7 @@ FROM
|
|
|
designer.SetDataSource("IntTravelTitle", intTravelCosts.ItemName);
|
|
|
if (intTravelCosts.Infos.Any())
|
|
|
{
|
|
|
- var cabClassFilter = new string[] {"经济舱","公务舱","头等舱" };
|
|
|
+ var cabClassFilter = new string[] { "经济舱", "公务舱", "头等舱" };
|
|
|
|
|
|
StringBuilder label = new StringBuilder();
|
|
|
var infos = intTravelCosts.Infos.Where(x => cabClassFilter.Contains(x.FeeName)).ToArray();
|
|
@@ -13436,7 +13525,7 @@ FROM
|
|
|
var CellStyle = workbook.CreateCellStyle();
|
|
|
CellStyle.CloneStyleFrom(sheet.GetRow(rowStartIndex).GetCell(0).CellStyle);
|
|
|
CellStyle.FillForegroundColor = IndexedColors.Yellow.Index; // 选择填充颜色
|
|
|
- CellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
|
|
|
+ CellStyle.FillPattern = NPOI.SS.UserModel.FillPattern.SolidForeground; // 填充方式
|
|
|
for (int i = 0; i <= clounmCount; i++)
|
|
|
{
|
|
|
if (i > 6)
|
|
@@ -13511,7 +13600,7 @@ FROM
|
|
|
{
|
|
|
BackgroundColor255_242_204.FillForegroundColor = 0;
|
|
|
((XSSFColor)BackgroundColor255_242_204.FillForegroundColorColor).SetRgb(rgb);
|
|
|
- BackgroundColor255_242_204.FillPattern = FillPattern.SolidForeground;
|
|
|
+ BackgroundColor255_242_204.FillPattern = NPOI.SS.UserModel.FillPattern.SolidForeground;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -13524,7 +13613,7 @@ FROM
|
|
|
{
|
|
|
fontRed.FillForegroundColor = 0;
|
|
|
((XSSFColor)fontRed.FillForegroundColorColor).SetRgb(rgb1);
|
|
|
- fontRed.FillPattern = FillPattern.SolidForeground;
|
|
|
+ fontRed.FillPattern = NPOI.SS.UserModel.FillPattern.SolidForeground;
|
|
|
}
|
|
|
cell.CellStyle = fontRed;
|
|
|
}
|
|
@@ -13568,7 +13657,7 @@ FROM
|
|
|
var CellStyle = workbook.CreateCellStyle();
|
|
|
CellStyle.CloneStyleFrom(sheet.GetRow(rowStartIndex).GetCell(0).CellStyle);
|
|
|
CellStyle.FillForegroundColor = IndexedColors.Yellow.Index; // 选择填充颜色
|
|
|
- CellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
|
|
|
+ CellStyle.FillPattern = NPOI.SS.UserModel.FillPattern.SolidForeground; // 填充方式
|
|
|
for (int i = 0; i <= clounmCount; i++)
|
|
|
{
|
|
|
if (i > 6)
|
|
@@ -18151,7 +18240,7 @@ ORDER by gctggrc.id DESC
|
|
|
byte[] imageBytes = System.IO.File.ReadAllBytes(voucherHeaderPath);
|
|
|
//Image image = Image.FromStream(imageBytes, ImageType.Png);
|
|
|
//builder.InsertImage(imageBytes, RelativeHorizontalPosition.Margin, 0, RelativeVerticalPosition.Margin, 0, 81, 36, WrapType.None);
|
|
|
- Shape shape = builder.InsertImage(imageBytes);
|
|
|
+ Aspose.Words.Drawing.Shape shape = builder.InsertImage(imageBytes);
|
|
|
|
|
|
// 调整图片位置
|
|
|
shape.RelativeHorizontalPosition = RelativeHorizontalPosition.Page; // 将图片的水平位置设置为页面
|
|
@@ -20171,10 +20260,10 @@ ORDER by gctggrc.id DESC
|
|
|
builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single;
|
|
|
builder.CellFormat.Borders.LineWidth = 1;
|
|
|
builder.CellFormat.Borders.Color = Color.FromArgb(183, 183, 183);
|
|
|
-
|
|
|
+
|
|
|
table.FirstRow.FirstCell.CellFormat.Width = 20; // 单位为百分比
|
|
|
builder.RowFormat.Height = 40;
|
|
|
- builder.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
|
|
|
+ builder.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
|
|
|
builder.Font.Name = contentFont;
|
|
|
builder.Font.Size = 12;
|
|
|
builder.Font.Bold = true;
|
|
@@ -20274,12 +20363,12 @@ ORDER by gctggrc.id DESC
|
|
|
doc.FirstSection.HeadersFooters.Add(footer);
|
|
|
|
|
|
Paragraph para = new Paragraph(doc);
|
|
|
- para.ParagraphFormat.Alignment = ParagraphAlignment.Right;
|
|
|
+ para.ParagraphFormat.Alignment = ParagraphAlignment.Right;
|
|
|
footer.AppendChild(para);
|
|
|
|
|
|
builder.MoveTo(para);
|
|
|
|
|
|
- string imagePath = "./Images/FMGJ_Log.png";
|
|
|
+ string imagePath = "./Images/FMGJ_Log.png";
|
|
|
builder.InsertImage(imagePath);
|
|
|
|
|
|
#endregion
|
|
@@ -20295,7 +20384,7 @@ ORDER by gctggrc.id DESC
|
|
|
return Ok(JsonView(true, "操作成功!", Url));
|
|
|
}
|
|
|
|
|
|
- private void InvertedListFileDownloadSetRow(DocumentBuilder builder, string fontName, string dateTime,string content,string reamrk)
|
|
|
+ private void InvertedListFileDownloadSetRow(DocumentBuilder builder, string fontName, string dateTime, string content, string reamrk)
|
|
|
{
|
|
|
var fontColor = Color.FromArgb(64, 64, 64);
|
|
|
|
|
@@ -20318,7 +20407,7 @@ ORDER by gctggrc.id DESC
|
|
|
|
|
|
builder.InsertCell();
|
|
|
builder.CellFormat.VerticalAlignment = CellVerticalAlignment.Center;
|
|
|
- builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
|
|
|
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
|
|
|
builder.Font.Size = 9;
|
|
|
builder.Font.Bold = false;
|
|
|
builder.Font.Color = fontColor;
|
|
@@ -20326,7 +20415,7 @@ ORDER by gctggrc.id DESC
|
|
|
builder.EndRow();
|
|
|
}
|
|
|
|
|
|
- private void InvertedListFileDownloadSetBorders(CellCollection cell,int index)
|
|
|
+ private void InvertedListFileDownloadSetBorders(CellCollection cell, int index)
|
|
|
{
|
|
|
cell[index].CellFormat.Borders.Top.LineStyle = Aspose.Words.LineStyle.None;
|
|
|
cell[index].CellFormat.Borders.Bottom.LineStyle = Aspose.Words.LineStyle.None;
|
|
@@ -21914,7 +22003,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
if (aircompany == null)
|
|
|
{
|
|
|
aircompany = new Res_AirCompany
|
|
|
- {
|
|
|
+ {
|
|
|
CnName = hsEmpty,
|
|
|
EnName = hsEmpty,
|
|
|
ShortCode = hsEmpty,
|
|
@@ -21929,7 +22018,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
if (isTrade)
|
|
|
{
|
|
|
trip += $"抵达{end_Object.AirPort}{item["EndBuilding"].ToString().Trim()}航站楼(中转 行李直达)\r\n";
|
|
|
- }
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
trip += "\r\n"; //$"抵达{end_Object.AirPort}{item["EndBuilding"].ToString().Trim()}航站楼,办理入境手续,之后前往提取行李\r\n";
|
|
@@ -22010,7 +22099,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
string week = Day[Convert.ToInt32(NewData.DayOfWeek.ToString("d"))].ToString();
|
|
|
Grp_ApprovalTravel appro = new Grp_ApprovalTravel();
|
|
|
- appro.Date = NewData.Month + "月" + NewData.Day + "日(" + week + ")"+ "第" + intToString(i + 1) + "天 ";
|
|
|
+ appro.Date = NewData.Month + "月" + NewData.Day + "日(" + week + ")" + "第" + intToString(i + 1) + "天 ";
|
|
|
appro.Diid = dto.Diid;
|
|
|
appro.CreateUserId = dto.Userid;
|
|
|
appro.CreateTime = DateTime.Now;
|
|
@@ -22082,15 +22171,15 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
}
|
|
|
|
|
|
//模板路径
|
|
|
- string tempPath = AppSettingsHelper.Get("WordBasePath")+ "Template/";
|
|
|
+ string tempPath = AppSettingsHelper.Get("WordBasePath") + "Template/";
|
|
|
var fileName = string.Empty;
|
|
|
- string titleFont = string.Empty,timeFont = string.Empty, contentFont = string.Empty;
|
|
|
+ string titleFont = string.Empty, timeFont = string.Empty, contentFont = string.Empty;
|
|
|
bool bold = false;
|
|
|
|
|
|
if (dto.FileIndex == 1)
|
|
|
{
|
|
|
fileName = "公务行程导出模板.docx"; //"C:\\Server\\File\\OA2023\\Office\\Word\\Template/公务行程导出模板.docx"
|
|
|
- }
|
|
|
+ }
|
|
|
else if (dto.FileIndex == 2)
|
|
|
{
|
|
|
fileName = "省外办-报批.docx";
|
|
@@ -22137,7 +22226,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
|
|
|
var ChiRep = _sqlSugar.Queryable<Grp_ApprovalTravelDetails>().Where(x => x.IsDel == 0 && x.ParentId == item.Id).ToList();
|
|
|
|
|
|
- SetCells(tableOne, doc, SetIndex, 0, textTime,titleFont,bold);
|
|
|
+ SetCells(tableOne, doc, SetIndex, 0, textTime, titleFont, bold);
|
|
|
|
|
|
SetIndex++;
|
|
|
|
|
@@ -22162,8 +22251,8 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
CenterRowClone = (Aspose.Words.Tables.Row)tableOne.Rows[1].Clone(true);
|
|
|
tableOne.AppendChild(CenterRowClone);
|
|
|
}
|
|
|
- SetCells(tableOne, doc, SetIndex, 0, txtTime,timeFont,bold);
|
|
|
- SetCells(tableOne, doc, SetIndex, 1, txtDetail,contentFont, bold);
|
|
|
+ SetCells(tableOne, doc, SetIndex, 0, txtTime, timeFont, bold);
|
|
|
+ SetCells(tableOne, doc, SetIndex, 1, txtDetail, contentFont, bold);
|
|
|
indexChi++;
|
|
|
SetIndex++;
|
|
|
}
|
|
@@ -22184,7 +22273,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
}
|
|
|
|
|
|
string strFileName = "/Travel/ExportApprovalJourneyWord/" + group.TeamName + fileName;
|
|
|
- doc.Save(AppSettingsHelper.Get("WordBasePath") + strFileName,Aspose.Words.SaveFormat.Docx); //"C:\\Server\\File\\OA2023\\Office\\Word" + strFileName
|
|
|
+ doc.Save(AppSettingsHelper.Get("WordBasePath") + strFileName, Aspose.Words.SaveFormat.Docx); //"C:\\Server\\File\\OA2023\\Office\\Word" + strFileName
|
|
|
jw.Data = AppSettingsHelper.Get("WordBaseUrl") + AppSettingsHelper.Get("WordFtpPath") + strFileName; //"C:\\Server\\File\\OA2023\\Office\\Word" + strFileName
|
|
|
jw.Code = 200;
|
|
|
jw.Msg = "";
|
|
@@ -22230,7 +22319,7 @@ And (UnitName != '' Or UnitName != null) {sqlWhere}");
|
|
|
return stringNumberVal;
|
|
|
}
|
|
|
|
|
|
- private void SetCells(Aspose.Words.Tables.Table table, Document doc, int rows, int cells, string val,string font ,bool bold)
|
|
|
+ private void SetCells(Aspose.Words.Tables.Table table, Document doc, int rows, int cells, string val, string font, bool bold)
|
|
|
{
|
|
|
//获取table中的某个单元格,从0开始
|
|
|
Cell lshCell = table.Rows[rows].Cells[cells];
|