BasicInfoController.cs 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using Abp.Web.Mvc.Authorization;
  2. using IwbZero.Auditing;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using Abp.Domain.Repositories;
  10. using ShwasherSys.Authorization.Permissions;
  11. using ShwasherSys.BaseSysInfo.States;
  12. using ShwasherSys.BasicInfo;
  13. using ShwasherSys.BasicInfo.Region;
  14. using ShwasherSys.Common;
  15. namespace ShwasherSys.Controllers
  16. {
  17. [AuditLog("基础信息维护")]
  18. public class BasicInfoController : ShwasherControllerBase
  19. {
  20. private IRegionsAppService _regionsAppService;
  21. private IQueryAppService QueryAppService;
  22. private IRepository<ExpressServiceProvider> ExpressServiceProviderRepository;
  23. public BasicInfoController(IRegionsAppService regionsAppService, IStatesAppService statesAppService, IQueryAppService queryAppService, IRepository<ExpressServiceProvider> expressServiceProviderRepository)
  24. {
  25. _regionsAppService = regionsAppService;
  26. QueryAppService = queryAppService;
  27. ExpressServiceProviderRepository = expressServiceProviderRepository;
  28. StatesAppService = statesAppService;
  29. }
  30. // GET: BasicInfo
  31. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoDepartments), AuditLog("部门管理页面")]
  32. public ActionResult Departments()
  33. {
  34. return View();
  35. }
  36. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoDutys), AuditLog("职务管理页面")]
  37. public ActionResult Dutys()
  38. {
  39. return View();
  40. }
  41. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoFactories), AuditLog("办公场所管理页面")]
  42. public async Task<ActionResult> Factories()
  43. {
  44. ViewBag.RegionInfo =await _regionsAppService.GetRegionSelectStrs();
  45. return View();
  46. }
  47. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoRegions), AuditLog("区域管理页面")]
  48. public ActionResult Regions()
  49. {
  50. return View();
  51. }
  52. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoStoreHouses), AuditLog("仓库信息管理")]
  53. public ActionResult StoreHouses()
  54. {
  55. ViewBag.StoreHouseType = StatesAppService.GetSelectLists("StoreHouse", "StoreHouseType");
  56. return View();
  57. }
  58. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoStoreHouseLocations), AuditLog("仓库位置信息管理")]
  59. public ActionResult StoreHouseLocations()
  60. {
  61. ViewBag.StoreHouse = QueryAppService.QueryStoreHouseSelect();
  62. return View();
  63. }
  64. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoStoreHouseLocations), AuditLog("仓库位置信息管理")]
  65. public ActionResult OutFactory()
  66. {
  67. //ViewBag.StoreHouse = QueryAppService.QueryStoreHouseSelect(1);
  68. return View();
  69. }
  70. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoCurrency), AuditLog("货币汇率信息管理")]
  71. public async Task<ActionResult> Currency()
  72. {
  73. //ViewBag.StoreHouse = QueryAppService.QueryStoreHouseSelect(1);
  74. ViewBag.Currency =await QueryAppService.QueryAllCurrency();
  75. return View();
  76. }
  77. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoLicenseType), AuditLog("证照组信息管理")]
  78. public ActionResult LicenseType()
  79. {
  80. ViewBag.LicenseGroup = StatesAppService.GetSelectLists("LicenseType", "Type");
  81. return View();
  82. }
  83. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoLicenseType), AuditLog("证照组信息管理")]
  84. public ActionResult QualityIssueLabel()
  85. {
  86. ViewBag.LicenseGroup = StatesAppService.GetSelectLists("LicenseType", "Type");
  87. return View();
  88. }
  89. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoLicenseType), AuditLog("证照组信息管理")]
  90. public ActionResult ScrapType()
  91. {
  92. ViewBag.LicenseGroup = StatesAppService.GetSelectLists("LicenseType", "Type");
  93. return View();
  94. }
  95. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoLicenseType), AuditLog("证照组信息管理")]
  96. public ActionResult FixedAssetType()
  97. {
  98. ViewBag.LicenseGroup = StatesAppService.GetSelectLists("LicenseType", "Type");
  99. return View();
  100. }
  101. [AbpMvcAuthorize(PermissionNames.PagesBasicInfoExpress), AuditLog("快递公司信息管理")]
  102. public async Task<ActionResult> Express()
  103. {
  104. //var providers = await ExpressServiceProviderRepository.GetAllListAsync();
  105. //List<SelectListItem> proListItems = HtmlHelpers.TranSelectItems<ExpressServiceProvider>(providers, "ExpressName", "Id");
  106. //ViewBag.Providers = proListItems;
  107. ViewBag.Providers = await ExpressServiceProviderRepository.GetAllListAsync();
  108. return View();
  109. }
  110. }
  111. }