|
@@ -4335,17 +4335,28 @@ FROM
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("{id}")]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> FeeAuditOtherFileDownlaod([Range(1,int.MaxValue,ErrorMessage ="")]int id)
|
|
|
+ public async Task<IActionResult> FeeAuditOtherFileDownlaod([Range(1,int.MaxValue,ErrorMessage ="请传入有效的ID")]int id)
|
|
|
{
|
|
|
- var otherInfo = await _decreasePaymentsRep.Query(x => x.Id == id && x.IsDel == 0).FirstAsync();
|
|
|
- string url = "暂无附件!";
|
|
|
- if (otherInfo != null)
|
|
|
+ //网站域名
|
|
|
+ const string baseUrl = "http://132.232.92.186:24/Office/GrpFile/%E5%9B%A2%E7%BB%84%E5%A2%9E%E5%87%8F%E6%AC%BE%E9%A1%B9%E7%9B%B8%E5%85%B3%E6%96%87%E4%BB%B6/";
|
|
|
+
|
|
|
+ var otherInfo = await _decreasePaymentsRep._sqlSugar
|
|
|
+ .Queryable<Grp_DecreasePayments>()
|
|
|
+ .InnerJoin<Grp_CreditCardPayment>((x, y) => x.Id == y.CId && y.Id == id)
|
|
|
+ .Where(((x, y) => x.IsDel == 0 && y.IsDel == 0))
|
|
|
+ .Select((x, y) => new
|
|
|
+ {
|
|
|
+ x.Id,
|
|
|
+ x.FilePath
|
|
|
+ })
|
|
|
+ .FirstAsync();
|
|
|
+ if (otherInfo != null && !string.IsNullOrEmpty(otherInfo.FilePath.Trim()))
|
|
|
{
|
|
|
- url = $"http://132.232.92.186:24/Office/GrpFile/%E5%9B%A2%E7%BB%84%E5%A2%9E%E5%87%8F%E6%AC%BE%E9%A1%B9%E7%9B%B8%E5%85%B3%E6%96%87%E4%BB%B6/{otherInfo.FilePath}";
|
|
|
- return Ok(JsonView(true, "操作成功!", url));
|
|
|
+ var url = $"{baseUrl}{otherInfo.FilePath}";
|
|
|
+ return Ok(JsonView(true, "操作成功!", url));
|
|
|
}
|
|
|
|
|
|
- return Ok(JsonView(false, url));
|
|
|
+ return Ok(JsonView(false, "暂无附件"));
|
|
|
}
|
|
|
|
|
|
#endregion
|