|
@@ -804,16 +804,21 @@ namespace OASystem.API.Controllers
|
|
|
public async Task<IActionResult> QueryCountryFeeCost(DtoBase dto)
|
|
|
{
|
|
|
var portType = dto.PortType;
|
|
|
+
|
|
|
+ if (portType != 1 && portType != 2 && portType != 3)
|
|
|
+ return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
|
|
|
+
|
|
|
+
|
|
|
var countryVisaFees = await _countryFeeRep
|
|
|
.QueryDto<Res_CountryFeeCost, CountryFeeCostView>()
|
|
|
.OrderByDescending(x => x.CreateTime)
|
|
|
.ToListAsync();
|
|
|
|
|
|
- if (!countryVisaFees.Any()) return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ if (countryVisaFees == null || countryVisaFees.Count == 0)
|
|
|
+ return Ok(JsonView(false, "暂无数据!"));
|
|
|
+
|
|
|
+ return Ok(JsonView(true, "查询成功", countryVisaFees));
|
|
|
|
|
|
- if (portType == 1) return Ok(JsonView(true, "查询成功", countryVisaFees));
|
|
|
- else if (portType == 2 || portType == 3) return Ok(JsonView(true, "查询成功", countryVisaFees));
|
|
|
- else return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -840,7 +845,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
var countryVisaFees = await query.ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
|
- if (!countryVisaFees.Any()) return Ok(JsonView(false, "暂无数据!"));
|
|
|
+ if (!countryVisaFees.Any()) return Ok(JsonView(true, "暂无数据!"));
|
|
|
var view = _mapper.Map<List<CountryFeeCostView>>(countryVisaFees);
|
|
|
|
|
|
return Ok(JsonView(true, "查询成功", view, total));
|
|
@@ -878,6 +883,63 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+ #region 签证费用资料 New
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 签证费用标准 Info
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> VisaFeeStandardInfo(VisaFeeStandardInfoDto dto)
|
|
|
+ {
|
|
|
+ var portType = dto.PortType;
|
|
|
+
|
|
|
+ if (portType != 1 && portType != 2 && portType != 3)
|
|
|
+ return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
|
|
|
+
|
|
|
+ return Ok(await _countryFeeRep.InfoAsync(dto.Id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 签证费用标准 List
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> VisaFeeStandardList(VisaFeeStandardListDto dto)
|
|
|
+ {
|
|
|
+ return Ok(await _countryFeeRep.PageListAsync(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 签证费用标准 Save
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> VisaFeeStandardSave(VisaFeeStandardSaveDto dto)
|
|
|
+ {
|
|
|
+ return Ok(await _countryFeeRep.SaveAsync(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 签证费用标准 SoftDel
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> VisaFeeStandardSoftDel(VisaFeeStandardSoftDelDto dto)
|
|
|
+ {
|
|
|
+ return Ok(await _countryFeeRep.SoftDelAsync(dto.CurrUserId, dto.Id));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
#region 物料信息、供应商维护
|
|
|
#region 供应商
|
|
|
/// <summary>
|
|
@@ -2271,7 +2333,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
//文件名称
|
|
|
string[] fileNameArray = file.FileName.Split(".");
|
|
|
|
|
|
- string projectFileName = $"{fileNameArray[0].ToString().Replace("-", "_").Replace("/", "_")}{DateTime.UtcNow.ToString("yyyyMMddHHmmss")}.{fileNameArray[1].ToString()}";
|
|
|
+ string projectFileName = $"{fileNameArray[0].ToString().Replace("-", "_").Replace("/", "_")}{DateTime.UtcNow:yyyyMMddHHmmss}.{fileNameArray[1]}";
|
|
|
//上传的文件的路径
|
|
|
string filePath = $@"{localPath}公务相关文件";
|
|
|
if (!Directory.Exists(filePath))
|
|
@@ -2293,7 +2355,6 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
-
|
|
|
failFiles.Append(file.FileName);
|
|
|
}
|
|
|
}
|
|
@@ -2333,7 +2394,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
|
|
|
fileUrls = fileUrls.Distinct().ToList();
|
|
|
|
|
|
- if (fileUrls.Count() > 0)
|
|
|
+ if (fileUrls.Count > 0)
|
|
|
{
|
|
|
var upd = await _sqlSugar.Updateable<Res_OfficialActivities>()
|
|
|
.SetColumns(x => x.ScreenshotOfMailUrl == JsonConvert.SerializeObject(fileUrls))
|
|
@@ -2844,12 +2905,12 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
DocumentBuilder builder = new DocumentBuilder(doc);
|
|
|
|
|
|
//键值对存放数据
|
|
|
- Dictionary<string, string> dic = new Dictionary<string, string>();
|
|
|
-
|
|
|
- //××(组团单位):接团客户信息团组
|
|
|
- dic.Add("GroupClient", $"{groupInfo.ClientUnit}");
|
|
|
-
|
|
|
- dic.Add("GroupClient1", $"{groupInfo.ClientUnit}");
|
|
|
+ var dic = new Dictionary<string, string>
|
|
|
+ {
|
|
|
+ //××(组团单位):接团客户信息团组
|
|
|
+ { "GroupClient", $"{groupInfo.ClientUnit}" },
|
|
|
+ { "GroupClient1", $"{groupInfo.ClientUnit}" }
|
|
|
+ };
|
|
|
//关于××(职务、姓名)等×人赴××(国家或地区)进行×××(出访目的)的请示
|
|
|
string guestName = "";
|
|
|
string guestJob = "";
|
|
@@ -2975,7 +3036,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
}
|
|
|
|
|
|
var fileDir = AppSettingsHelper.Get("WordBasePath");
|
|
|
- var fileName = $"{groupInfo.TeamName}市外办出访请示{DateTime.Now.ToString("yyyyMMddHHmmss")}.docx";
|
|
|
+ var fileName = $"{groupInfo.TeamName}市外办出访请示{DateTime.Now:yyyyMMddHHmmss}.docx";
|
|
|
var filePath = fileDir + $@"OfficialActivities/{fileName}";
|
|
|
doc.Save(filePath);
|
|
|
|
|
@@ -2987,7 +3048,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
return Ok(JsonView(true, "操作失败!", ""));
|
|
|
}
|
|
|
|
|
|
- private string GetToUpperNumber(int num)
|
|
|
+ private static string GetToUpperNumber(int num)
|
|
|
{
|
|
|
string numStr = "";
|
|
|
|
|
@@ -3548,7 +3609,7 @@ WHERE
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for (int i = 0; i < clientList.Count(); i++)
|
|
|
+ for (int i = 0; i < clientList.Count; i++)
|
|
|
{
|
|
|
builder.MoveToCell(0, i + 1, 0, 0);
|
|
|
builder.Write((i + 1).ToString());
|
|
@@ -3605,7 +3666,7 @@ WHERE
|
|
|
{
|
|
|
string[] str = temp1.Replace("\r\n", " ").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
string[] str2 = temp2.Replace("\r\n", " ").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
- for (int j = 0; j < str.Count(); j++)
|
|
|
+ for (int j = 0; j < str.Length; j++)
|
|
|
{
|
|
|
content = content + " " + str[j] + str2[j] + "\r\n";
|
|
|
}
|
|
@@ -4005,7 +4066,7 @@ WHERE
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- for (int i = 0; i < clientList.Count(); i++)
|
|
|
+ for (int i = 0; i < clientList.Count; i++)
|
|
|
{
|
|
|
builder.MoveToCell(0, i + 1, 0, 0);
|
|
|
builder.Write((i + 1).ToString());
|
|
@@ -4062,7 +4123,7 @@ WHERE
|
|
|
{
|
|
|
string[] str = temp1.Replace("\r\n", " ").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
string[] str2 = temp2.Replace("\r\n", " ").Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
- for (int j = 0; j < str.Count(); j++)
|
|
|
+ for (int j = 0; j < str.Length; j++)
|
|
|
{
|
|
|
content = content + " " + str[j] + str2[j] + "\r\n";
|
|
|
}
|
|
@@ -4103,20 +4164,12 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> QueryTicketBlackCodeByDiId(QueryTicketBlackCodeByDiIdDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeByDiId(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeByDiId(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 根据黑屏代码数据Id查询信息
|
|
@@ -4127,20 +4180,12 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> QueryTicketBlackCodeById(QueryTicketBlackCodeByIdDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeById(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeById(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 黑屏代码操作(Status:1.新增,2.修改)
|
|
@@ -4173,7 +4218,7 @@ WHERE
|
|
|
//行程代码变更通知
|
|
|
await AppNoticeLibrary.SendUserMsg_GroupShare_ToDP(dto.DiId, dto.CreateUserId);
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ catch (Exception)
|
|
|
{
|
|
|
|
|
|
throw;
|
|
@@ -4193,20 +4238,12 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> DelTicketBlackCode(DelBaseDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- var res = await _ticketBlackCodeRep.SoftDeleteByIdAsync<Air_TicketBlackCode>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
- if (!res)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "删除失败"));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, "删除成功!"));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ var res = await _ticketBlackCodeRep.SoftDeleteByIdAsync<Air_TicketBlackCode>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
+ if (!res)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -4217,7 +4254,7 @@ WHERE
|
|
|
/// Init
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- [HttpGet()]
|
|
|
+ [HttpGet]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> TranslatorLibraryInit()
|
|
|
{
|
|
@@ -4251,7 +4288,7 @@ WHERE
|
|
|
.ToList();
|
|
|
var view = new
|
|
|
{
|
|
|
- currencyData = currencyData,
|
|
|
+ currencyData,
|
|
|
officialDutyData = officialDutyData1
|
|
|
};
|
|
|
|
|
@@ -4631,7 +4668,6 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> MediaSupplierOp(MediaSupplierAddOrEditDto dto)
|
|
|
{
|
|
|
- var result = new JsonView() { Code = 400, Msg = "操作失败" };
|
|
|
var userId = dto.CurrUserId;
|
|
|
if (!_portIds.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
|
|
|
@@ -4650,7 +4686,6 @@ WHERE
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> MediaSupplierSoftDel(MediaSupplierSoftDelDto dto)
|
|
|
{
|
|
|
- var result = new JsonView() { Code = 400, Msg = "操作失败" };
|
|
|
int userId = dto.CurrUserId, id = dto.Id;
|
|
|
if (!_portIds.Contains(dto.PortType)) return Ok(JsonView(false, MsgTips.Port));
|
|
|
|
|
@@ -4660,11 +4695,6 @@ WHERE
|
|
|
return Ok(await _mediaSupplierRep.SoftDel(dto));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 保险国家基础费用
|