You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.5 KiB

2 weeks ago
  1. using NFine.Application.SystemManage;
  2. using NFine.Code;
  3. using NFine.Data.Extensions;
  4. using NFine.Domain.Entity.SystemManage;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Text;
  9. using System.Web.Mvc;
  10. namespace NFine.Web.Controllers
  11. {
  12. [HandlerLogin]
  13. public class HomeController : Controller
  14. {
  15. [HttpGet]
  16. public ActionResult Index()
  17. {
  18. return View();
  19. }
  20. [HttpGet]
  21. public ActionResult Default()
  22. {
  23. return View();
  24. }
  25. [HttpGet]
  26. public ActionResult About()
  27. {
  28. return View();
  29. }
  30. [HttpGet]
  31. public ActionResult GetDay(string password)
  32. {
  33. string userId = @NFine.Code.OperatorProvider.Provider.GetCurrent().UserId;
  34. string VenCode = @NFine.Code.OperatorProvider.Provider.GetCurrent().VenCode;
  35. string UserCode = @NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode;
  36. if (!string.IsNullOrWhiteSpace(VenCode))
  37. {
  38. string sql = @" SELECT b.ID, b.VenCode,c.cVenName,b.FileName,CONVERT(NVARCHAR(20),b.Createtime,23) AS Createtime, CASE WHEN b.Status='0' THEN '未提交' WHEN b.Status='1' THEN '待审核' WHEN b.Status='2' THEN '已生效'WHEN b.Status='3' THEN '驳回'END AS Status, CASE WHEN b.Status='0' THEN '未提交' WHEN b.Status='1' THEN '待审核' WHEN b.Status='2' THEN '已生效'WHEN b.Status='3' THEN '驳回'END AS HIDDSTATUS FROM ICSVendor c
  39. LEFT JOIN [ICSSRMAgreementUpload] b ON c.cVenCode=b.VenCode
  40. LEFT JOIN ICSTemplateManagement a ON b.FileID=a.id
  41. WHERE 1=1 and b.VenCode='" + VenCode + "' and b.Status='2'";
  42. DataTable dt = SqlHelper.GetDataTableBySql(sql);
  43. if (dt.Rows.Count > 0)
  44. {
  45. return Content(new AjaxResult { state = ResultType.success.ToString(), message = "1" }.ToJson());
  46. }
  47. else
  48. {
  49. return Content(new AjaxResult { state = ResultType.error.ToString(), message = "请您尽快在协议签署管理模块中进行协议上传,否则将会影响到您其余功能的使用和后续订单的接收" }.ToJson());
  50. }
  51. }
  52. else
  53. {
  54. return Content(new AjaxResult { state = ResultType.success.ToString(), message = "1" }.ToJson());
  55. }
  56. }
  57. }
  58. }