Browse Source

null

master
wxd 11 months ago
parent
commit
1c829a218b
  1. 23
      QZWebApi/Controllers/HomeController.cs
  2. 17
      QZWebApi/Models/SqlSugarHelper.cs

23
QZWebApi/Controllers/HomeController.cs

@ -1,18 +1,27 @@
using System;
using QZWebApi.Bus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Http;
namespace QZWebApi.Controllers
{
public class HomeController : Controller
public class HomeController : ApiController
{
public ActionResult Index()
[HttpPost]
public string GetDecryptTjxx(GetDecryptTjxxInputDto input)
{
ViewBag.Title = "Home Page";
return View();
string resultMsg = TjSignUtil.Decrypt(input.DecryptValue, input.AesKey);
return resultMsg;
}
}
public class GetDecryptTjxxInputDto
{
public string DecryptValue { get; set; }
public string AesKey { get; set; }
}
}

17
QZWebApi/Models/SqlSugarHelper.cs

@ -167,6 +167,7 @@ namespace QZWebApi.Models
tjjlPackages.fee = Convert.ToDouble(Convert.ToDecimal(dt2.Rows[0]["charge_price"].ToString()) * 100);
}
var dt3 = WebDb.Ado.GetDataTable($"select summary from register_check_summary where register_check_id='{row["register_check_id"].ToString()}' ");
if (dt3.Rows.Count > 0)
{
@ -185,6 +186,10 @@ namespace QZWebApi.Models
}
tjjlPackages.summary = summary;
}
else
{
tjjlPackages.summary = "";
}
//明细结果
@ -227,8 +232,16 @@ namespace QZWebApi.Models
tjjlPackages.items = jkTjxxBeanList;
}
else
{
tjjlPackages.items = new List<JkTjxxBean>();
}
if (tjjlPackages.items != null && tjjlPackages.items.Any() && string.IsNullOrWhiteSpace(tjjlPackages.summary))
{
tjjlPackagesList.Add(tjjlPackages);
}
tjjlPackagesList.Add(tjjlPackages);
}
}
@ -257,7 +270,7 @@ namespace QZWebApi.Models
pdfUrl = pdfUrl.Replace(@"\", "/");
WebClient webClient = new WebClient();
byte[] byteArray =webClient.DownloadData(pdfUrl);
byte[] byteArray = webClient.DownloadData(pdfUrl);
result = Convert.ToBase64String(byteArray);
}

Loading…
Cancel
Save