using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Data; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using MySystem.PxcModels; using System.Threading; using Library; using LitJson; using System.Security.Cryptography; namespace MySystem.Controllers { public class HomeController : Controller { private readonly ILogger _logger; public HomeController(ILogger logger) { _logger = logger; } public IActionResult Index() { return View(); } public IActionResult Error() { string isapi = Request.Headers["Api"].ToString(); if (isapi != "1") { if (Response.StatusCode == 500) { return Redirect("/public/errpage/pc/500.html"); } else if (Response.StatusCode == 502) { return Redirect("/public/errpage/pc/502.html"); } else if (Response.StatusCode == 404) { return Redirect("/public/errpage/pc/404.html"); } } return View(); } public string test() { // WebCMSEntities db = new WebCMSEntities(); // string content = function.ReadInstance("/txt/lkbsn.txt"); // string[] list = content.Replace("\r", "").Split('\n'); // foreach (string sub in list) // { // PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == sub); // if (pos != null) // { // string info = "{\"RecordId\":\"\",\"PosId\":\"" + pos.Id + "\",\"Fee\": \"0.63\",\"Kind\": \"1\",\"OpMan\": \"" + "系统" + "\"}"; // RedisDbconn.Instance.AddList("SetDepositPostQueue", info); // } // } // db.Dispose(); // return "ok"; // return PublicImportDataService.Instance.QueryLiSDeposit("N00000D0022G499", ""); // {"existsFlag":"1","feeList":[{"feeCalcType":"M1","fixed":"0","rate":"0.24"},{"feeCalcType":"M2","fixed":"0","rate":"0.24"},{"feeCalcType":"M3","fixed":"0","rate":"0.38"},{"feeCalcType":"M4","fixed":"0","rate":"2.63"},{"feeCalcType":"M5","fixed":"0","rate":"0.63"},{"feeCalcType":"M7","fixed":"0"},{"feeCalcType":"M8","fixed":"0"},{"feeCalcType":"M9","fixed":"0"},{"feeCalcType":"T0","fixed":"1","rate":"300"}],"merchNo":"N00000D0022G499","ret_code":"00","ret_msg":"请求成功"} // return PublicImportDataService.Instance.SetLiSWeFee("WME52S0151221", "N00000C05U77807", "0.63", "300"); // return PublicImportDataService.Instance.LkbSetDeposit("00003102722201179813196", 0); // return PublicImportDataService.Instance.LkbSetFee("00000302QRNL20019214", 0.63M, 300); return PublicImportDataService.Instance.LkLSetFee("100117947", 0.6M, 300); // string content = "OiqJAGEVZSIrQmtKggTtFfSwtybN7gdJd6obHt27KfZIdMUzIsXIVtNdYGWHWr93f6kR1+5JUuwQ1ZP0Z/HxSKd2FeOAJpkgBWjzaOZV4badFJt7ptxVCN4QWAyCSKB+uyGAwwj2zo2S6wz/ongWGZexAZk8K6PKyz0aXyhm0rFPEDl2e4r68luLMI7hd4fVsoxE+455afZyLCv2jt3XCH7XcyaxHO8HR/BaHJDIWu8RQwaPYgx2gdiOftlybiiSDhJcI2S1plDH5uSfMrx/UCQ+2KqSfF/HjlLWXLUk1jwlSs6hNaCHYdO5T/6nRjfO+nB0vJtSS9j++Wi7fxM9dg=="; // return PublicImportDataService.Instance.LklDecrypt(content); //{"orgCode":"1951139","agentNo":29146077,"agencyNo":30342600,"externalCustomerNo":"82212108299005P","customerName":"��机****了饭","legalName":"徐*","posSn":"123081400101002052","posType":"PAPER_CODE","termNo":"A9323753","type":"UNBIND","operateTime":"2024-11-14 11:36:00"} //{"orderNo":"20241113170425","userNo":29115902,"agencyNo":30324920,"customerNo":100132238,"externalCustomerNo":"822121070110BDQ","customerName":"好拓*************件二","legalName":"宋*杰","posSn":"HAOTKwzn20241113111","type":"DEPOSIT","transCardType":"01","extTransCode":"412001","termId":"012001","amount":40000000,"transTime":"2024-11-13 17:04:25"} //{"logNo":"24111250702305","posSn":"00007902C32300000502","externalCustomerNo":"822121070110BDB","amount":8.0,"time":"2024-11-12 00:00:00","deductDate":"20241112","agencyNo":30343214} } } }