Browse Source

bug修改

yandaniu 14 hours ago
parent
commit
caf3dd32d8
100 changed files with 569 additions and 78 deletions
  1. BIN
      .vs/ProjectEvaluation/ropin.inspection.api.metadata.v6.1
  2. BIN
      .vs/ProjectEvaluation/ropin.inspection.api.projects.v6.1
  3. BIN
      .vs/Ropin.Inspection.Api/DesignTimeBuild/.dtbcache.v2
  4. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/24ba3213-0aa1-4407-9198-c66e4ad7e013.vsidx
  5. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/31bac094-b2c1-4619-85bf-aea1976a1403.vsidx
  6. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/78886023-85b2-49d5-a8c4-d8b66bd035be.vsidx
  7. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/7f02d622-7ee6-4c49-9019-84ec6e560b51.vsidx
  8. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/8746401a-d6c0-4645-b14e-5f76724f0e5e.vsidx
  9. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/97efb975-54ee-45c3-a369-10f6da3730e0.vsidx
  10. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/9eaf3ec7-a104-4f9e-bc1e-3ed7760dc957.vsidx
  11. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/a2bbabf3-6b83-4502-bc5c-8b1a60cd0068.vsidx
  12. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/a68678a8-2980-42ab-aa28-4e73cca27cc0.vsidx
  13. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/b9bbf9f3-4550-49f5-aa29-9baeffec9779.vsidx
  14. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/bd7015a5-9762-4f6e-8105-68dd54ae8250.vsidx
  15. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/c04360bd-98da-443f-898c-7360e5a562c8.vsidx
  16. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/ca937623-dbeb-4efe-9932-5d55fa8ea489.vsidx
  17. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/e4a4c959-82e2-40b3-8598-16d85cce80ad.vsidx
  18. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/f409b921-f293-4dc5-9040-961aef51ef3c.vsidx
  19. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/f8962202-5c29-4e3d-8afa-f61abda06afc.vsidx
  20. BIN
      .vs/Ropin.Inspection.Api/v17/.futdcache.v2
  21. BIN
      .vs/Ropin.Inspection.Api/v17/.suo
  22. BIN
      .vs/Ropin.Inspection.Api/v17/fileList.bin
  23. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Core.Extensions.dll
  24. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Core.Extensions.pdb
  25. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  26. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  27. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Model.dll
  28. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Model.pdb
  29. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Repository.dll
  30. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Repository.pdb
  31. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Service.dll
  32. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Service.pdb
  33. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Tasks.dll
  34. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Tasks.pdb
  35. BIN
      Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.csproj.AssemblyReference.cache
  36. BIN
      Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.dll
  37. BIN
      Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.pdb
  38. BIN
      Ropin.Environmentally.AlarmService/obj/Debug/net5.0/Ropin.Environmentally.AlarmService.csproj.AssemblyReference.cache
  39. BIN
      Ropin.Environmentally.DcsService/obj/Debug/net5.0/Ropin.Environmentally.DcsService.csproj.AssemblyReference.cache
  40. BIN
      Ropin.Environmentally.LedgeService1/obj/Debug/net5.0/Ropin.Environmentally.LedgeService1.csproj.AssemblyReference.cache
  41. BIN
      Ropin.Environmentally.VideoService/obj/Debug/net5.0/Ropin.Environmentally.VideoService.csproj.AssemblyReference.cache
  42. BIN
      Ropin.IOT.MqttService/obj/Debug/net5.0/Ropin.IOT.MqttService.csproj.AssemblyReference.cache
  43. 120 19
      Ropin.Inspection.Api/Controllers/Base/FileImportController.cs
  44. 293 2
      Ropin.Inspection.Api/Controllers/Base/ReportController.cs
  45. 23 0
      Ropin.Inspection.Api/Controllers/ISP/TispRecordItemController.cs
  46. 6 5
      Ropin.Inspection.Api/Controllers/SYS/TasksQzController.cs
  47. 0 13
      Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.mine
  48. 0 13
      Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.r1412
  49. 0 13
      Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.r1415
  50. 2 2
      Ropin.Inspection.Api/TdevDevOpeAccountController.cs
  51. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Core.Extensions.dll
  52. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Core.Extensions.pdb
  53. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.dll
  54. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.pdb
  55. 28 1
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.xml
  56. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  57. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  58. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Model.dll
  59. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Model.pdb
  60. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Repository.dll
  61. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Repository.pdb
  62. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Service.dll
  63. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Service.pdb
  64. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Tasks.dll
  65. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Tasks.pdb
  66. 0 0
      Ropin.Inspection.Api/bin/Debug/net5.0/logs/2025/202505/20250520.txt
  67. 0 0
      Ropin.Inspection.Api/bin/Debug/net5.0/logs/2025/202505/20250520_error.txt
  68. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.csproj.AssemblyReference.cache
  69. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.dll
  70. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.pdb
  71. 28 1
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.xml
  72. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/ref/Ropin.Inspection.Api.dll
  73. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/refint/Ropin.Inspection.Api.dll
  74. 6 6
      Ropin.Inspection.Common/DataDictionaryHelper.cs
  75. 1 0
      Ropin.Inspection.Common/Helper/WeChatHelper.cs
  76. BIN
      Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  77. BIN
      Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  78. BIN
      Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.dll
  79. BIN
      Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.pdb
  80. 1 0
      Ropin.Inspection.Model/Entities/TISP_ContentGroup.cs
  81. 1 0
      Ropin.Inspection.Model/Entities/TISP_Report.cs
  82. 1 0
      Ropin.Inspection.Model/SearchModel/ISP/ReportSearchModel.cs
  83. 3 0
      Ropin.Inspection.Model/SearchModel/ISP/TispContentGroupsSearchModel.cs
  84. 2 0
      Ropin.Inspection.Model/TaicTemplateModel.cs
  85. 2 0
      Ropin.Inspection.Model/ViewModel/ISP/FirePreventionWeekRecordDto.cs
  86. 26 0
      Ropin.Inspection.Model/ViewModel/ISP/FirePreventionWeekRecordViewModel.cs
  87. 3 0
      Ropin.Inspection.Model/ViewModel/ISP/ReportViewModel.cs
  88. 3 1
      Ropin.Inspection.Model/ViewModel/ISP/TispContentGroupViewModel.cs
  89. 1 0
      Ropin.Inspection.Model/ViewModel/ISP/TispContentUpdateGroupViewModel.cs
  90. 1 0
      Ropin.Inspection.Model/ViewModel/SYS/TsysUserUpdateViewModel.cs
  91. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  92. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  93. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Model.dll
  94. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Model.pdb
  95. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.csproj.AssemblyReference.cache
  96. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.dll
  97. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.pdb
  98. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/ref/Ropin.Inspection.Model.dll
  99. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/refint/Ropin.Inspection.Model.dll
  100. 18 2
      Ropin.Inspection.Repository/Base/ReportRepository.cs

BIN
.vs/ProjectEvaluation/ropin.inspection.api.metadata.v6.1


BIN
.vs/ProjectEvaluation/ropin.inspection.api.projects.v6.1


BIN
.vs/Ropin.Inspection.Api/DesignTimeBuild/.dtbcache.v2


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/f8deaad6-d017-46c8-b6f5-0e515c598d2f.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/24ba3213-0aa1-4407-9198-c66e4ad7e013.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/80a81698-2bd7-4c8a-bd21-230b43d723e2.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/31bac094-b2c1-4619-85bf-aea1976a1403.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/034a2d26-35c9-4b6d-a26f-2f9c0024988b.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/78886023-85b2-49d5-a8c4-d8b66bd035be.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/7f02d622-7ee6-4c49-9019-84ec6e560b51.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/8746401a-d6c0-4645-b14e-5f76724f0e5e.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/762fcf60-e50a-4b8f-8f58-41754fee65f7.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/97efb975-54ee-45c3-a369-10f6da3730e0.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/9eaf3ec7-a104-4f9e-bc1e-3ed7760dc957.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/5fd6df60-817f-4788-a399-49aa4f9340e3.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/a2bbabf3-6b83-4502-bc5c-8b1a60cd0068.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/a68678a8-2980-42ab-aa28-4e73cca27cc0.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/3093671c-666f-427b-a57a-ca6cc0e853bb.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/b9bbf9f3-4550-49f5-aa29-9baeffec9779.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/bd7015a5-9762-4f6e-8105-68dd54ae8250.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/c04360bd-98da-443f-898c-7360e5a562c8.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/ca937623-dbeb-4efe-9932-5d55fa8ea489.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/103e09f6-a70a-44a0-88c1-e19aa6841ae1.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/e4a4c959-82e2-40b3-8598-16d85cce80ad.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/b5e53848-3f49-434d-8fdc-8a66273606b5.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/f409b921-f293-4dc5-9040-961aef51ef3c.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/aca4c7e5-1570-4e7c-a3fe-010c11431259.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/f8962202-5c29-4e3d-8afa-f61abda06afc.vsidx


BIN
.vs/Ropin.Inspection.Api/v17/.futdcache.v2


BIN
.vs/Ropin.Inspection.Api/v17/.suo


BIN
.vs/Ropin.Inspection.Api/v17/fileList.bin


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Core.Extensions.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Core.Extensions.pdb


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.pdb


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Model.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Model.pdb


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Repository.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Repository.pdb


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Service.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Service.pdb


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Tasks.dll


BIN
Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Tasks.pdb


BIN
Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.csproj.AssemblyReference.cache


BIN
Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.dll


BIN
Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.pdb


BIN
Ropin.Environmentally.AlarmService/obj/Debug/net5.0/Ropin.Environmentally.AlarmService.csproj.AssemblyReference.cache


BIN
Ropin.Environmentally.DcsService/obj/Debug/net5.0/Ropin.Environmentally.DcsService.csproj.AssemblyReference.cache


BIN
Ropin.Environmentally.LedgeService1/obj/Debug/net5.0/Ropin.Environmentally.LedgeService1.csproj.AssemblyReference.cache


BIN
Ropin.Environmentally.VideoService/obj/Debug/net5.0/Ropin.Environmentally.VideoService.csproj.AssemblyReference.cache


BIN
Ropin.IOT.MqttService/obj/Debug/net5.0/Ropin.IOT.MqttService.csproj.AssemblyReference.cache


+ 120 - 19
Ropin.Inspection.Api/Controllers/Base/FileImportController.cs

@@ -34,6 +34,7 @@ using NPOI.OpenXmlFormats.Dml.Diagram;
 using NPOI.SS.Formula.Functions;
 using NPOI.SS.Util;
 using Newtonsoft.Json;
+using System.Xml.Linq;
 
 namespace Ropin.Inspection.Api.Controllers.Base
 {
@@ -46,25 +47,28 @@ namespace Ropin.Inspection.Api.Controllers.Base
         private readonly ITispContentService _tispContentService;
         private readonly ITispContentGroupService _tispContentGroupService;
         private readonly ITispContentGroupItemService _tispContentGroupItemService;
+        private readonly ITdevDevStoreService _tdevDevStoreService;
 
-        public FileImportController(IClaimsAccessor claims,ITsysOrganizeService tsysOrganizeService, ITpntStoreService TpntStoreService, ITispContentService tispContentService, ITispContentGroupService tispContentGroupService, ITispContentGroupItemService tispContentGroupItemService)
+        public FileImportController(IClaimsAccessor claims,ITsysOrganizeService tsysOrganizeService, ITpntStoreService TpntStoreService, ITispContentService tispContentService, ITispContentGroupService tispContentGroupService, ITispContentGroupItemService tispContentGroupItemService, ITdevDevStoreService tdevDevStoreService)
         {
-            _claims= claims;
+            _claims = claims;
             _tsysOrganizeService = tsysOrganizeService;
-            _TpntStoreService= TpntStoreService;
+            _TpntStoreService = TpntStoreService;
             _tispContentService = tispContentService;
-            _tispContentGroupService= tispContentGroupService;
-            _tispContentGroupItemService= tispContentGroupItemService;
+            _tispContentGroupService = tispContentGroupService;
+            _tispContentGroupItemService = tispContentGroupItemService;
+            _tdevDevStoreService = tdevDevStoreService;
         }
+
         /// <summary>
-        /// 导入巡检内容
+        /// 导入巡检内容前的判断
         /// </summary>
-        /// <param name="orgCode"></param>
-        /// <param name="storeCode"></param>
+        /// <param name="orgCode">组织ID</param>
+        /// <param name="storeCode">业主ID</param>
         /// <param name="file"></param>
         /// <returns></returns>
-        [HttpPost("ImportIspContent")]
-        public async Task<ApiResult> ImportIspContent(string orgCode, string storeCode,[Required] IFormFile file)
+        [HttpPost("JudgmentImportIspContent")]
+        public async Task<ApiResult> JudgmentImportIspContent(string orgCode, string storeCode, [Required] IFormFile file)
         {
             if (string.IsNullOrEmpty(orgCode) || string.IsNullOrEmpty(storeCode))
             {
@@ -72,17 +76,19 @@ namespace Ropin.Inspection.Api.Controllers.Base
             }
             if (file == null)
             {
-                return new ApiResult(ReturnCode.ArgsError,"请上传导入文件");
+                return new ApiResult(ReturnCode.ArgsError, "请上传导入文件");
             }
             try
             {
+                string msg = "";
                 Guid OrgId = Guid.Parse(orgCode);
                 Guid StoreId = Guid.Parse(storeCode);
                 TsysOrganizeViewModel orgEntity = await _tsysOrganizeService.GetByIdAsync(OrgId);
                 TpntStoreViewModel storeEntity = await _TpntStoreService.GetByIdAsync(StoreId);
                 if (orgEntity == null || storeEntity == null)
                 {
-                    return new ApiResult(ReturnCode.ArgsError, "业主和组织获取失败");
+                    msg = "业主和组织获取失败";
+                    return new ApiResult(ReturnCode.GeneralError, msg);
                 }
                 List<ISPFIleImport> researchExcels = new List<ISPFIleImport>();
                 IWorkbook wk = null;
@@ -97,22 +103,113 @@ namespace Ropin.Inspection.Api.Controllers.Base
                 }
                 //获取第一个sheet
                 ISheet sheet = wk.GetSheetAt(0);
-                //获取第二行
+                //获取第一行-设备
+                IRow headrow0 = sheet.GetRow(0);
+                //获取第二行-业主
                 IRow headrow2 = sheet.GetRow(1);
+                //获取第三行-组织
+                IRow headrow3 = sheet.GetRow(2);
+                IRow headrow4= sheet.GetRow(3);
+                IRow headrow5 = sheet.GetRow(4);
+                if (headrow0 == null || headrow2 == null || headrow3 == null || headrow4 == null || headrow5 == null)
+                {
+                    return new ApiResult(ReturnCode.GeneralError, "请确认表格内是否有数据数据");
+                }
+                string devCell0 = headrow0.Cells[0].ToString();
                 var nameCell2 = headrow2.Cells.Where(x => x.ToString() == "使用部门:").FirstOrDefault();
                 var valCell2 = headrow2.Cells[2].ToString();
-                //获取第三行
-                IRow headrow3 = sheet.GetRow(2);
                 var nameCell3 = headrow3.Cells.Where(x => x.ToString() == "服务公司:").FirstOrDefault();
                 var valCell3 = headrow3.Cells[2].ToString();
                 if (nameCell2 is null || nameCell3 is null)
                 {
-                    return new ApiResult(ReturnCode.ArgsError, "导入格式有误,请使用模板进行导入");
+                    msg = "导入格式有误,请使用模板进行导入";
+                    return new ApiResult(ReturnCode.ArgsError, msg);
                 }
                 if ((storeEntity.C_Name.Trim() != valCell2 && storeEntity.C_SName?.Trim() != valCell2) || (orgEntity.C_SName?.Trim() != valCell3 && orgEntity.C_Name.Trim() != valCell3))
                 {
-                    return new ApiResult(ReturnCode.ArgsError, "业主和组织验证失败");
+                    msg = "业主和组织验证失败";
+                    return new ApiResult(ReturnCode.ArgsError, msg);
+                }
+                if (!string.IsNullOrEmpty(devCell0))
+                {
+                    var devArray = devCell0.Split("点检记录表").ToList();
+                    try
+                    {
+                        var arr0 = devArray[0].ToString();
+                        if (string.IsNullOrEmpty(arr0))
+                        {
+                            msg = "获取设备名称错误,格式:【XXX点检记录表(设备编号:XXX)】";
+                            return new ApiResult(ReturnCode.ArgsError, msg);
+                        }
+                        TdevDevStoreSearchModel searchDev = new TdevDevStoreSearchModel();
+                        searchDev.C_StoreCode = storeCode;
+                        searchDev.C_Name = arr0;
+                        var DevData = await _tdevDevStoreService.GetConditionAsync(searchDev);
+                        if (DevData == null || DevData.Count() == 0 || (DevData.Count() == 1 && DevData.First() == null) || DevData.Count() > 1)
+                        {
+                            msg =  $"请确认设备【{arr0}】名称是否正确或者是否存在于当前业主【{valCell2}】下";
+                            return new ApiResult(ReturnCode.ArgsError, msg);
+                        }
+                        var devModel = DevData.FirstOrDefault();
+                        msg = $"请确认是否导入数据到 组织:{valCell3},业主:{valCell2},设备:{devModel.C_Name}【{devModel.C_NumberCode}】 下吗?";
+                        var data = new
+                        {
+                            devCode = devModel.C_ID,
+                            Message=msg,
+                        };
+                        return new ApiResult<object>(data, ReturnCode.Success);
+                    }
+                    catch (Exception)
+                    {
+                        msg = "获取首行设备错误";
+                        return new ApiResult(ReturnCode.GeneralError, msg);
+                    }
+                }
+                else
+                {
+                    msg = "请填写表格表头,格式:【XXX点检记录表(设备编号:XXX)】";
+                    return new ApiResult(ReturnCode.ArgsError, msg);
+                }
+            }
+            catch (Exception ex)
+            {
+                return new ApiResult(ReturnCode.GeneralError, "导入模版格式不对!");
+            }
+        }
+        /// <summary>
+        /// 导入巡检内容
+        /// </summary>
+        /// <param name="orgCode"></param>
+        /// <param name="storeCode"></param>
+        /// <param name="devCode">设备ID</param>
+        /// <param name="file"></param>
+        /// <returns></returns>
+        [HttpPost("ImportIspContent")]
+        public async Task<ApiResult> ImportIspContent(string orgCode, string storeCode, string devCode, [Required] IFormFile file)
+        {
+            if (string.IsNullOrEmpty(orgCode) || string.IsNullOrEmpty(storeCode))
+            {
+                return new ApiResult(ReturnCode.ArgsError);
+            }
+            if (file == null)
+            {
+                return new ApiResult(ReturnCode.ArgsError,"请上传导入文件");
+            }
+            try
+            {
+                List<ISPFIleImport> researchExcels = new List<ISPFIleImport>();
+                IWorkbook wk = null;
+                var exName = file.FileName.Split('.').Last().ToLower();
+                if (exName == "xlsx")
+                {
+                    wk = new XSSFWorkbook(file.OpenReadStream());
+                }
+                else
+                {
+                    wk = new HSSFWorkbook(file.OpenReadStream());
                 }
+                //获取第一个sheet
+                ISheet sheet = wk.GetSheetAt(0);
                 // 存储已处理的合并区域
                 List<CellRangeAddress> processedMergedRegions = new List<CellRangeAddress>();
                 //获取第四行-标题行
@@ -248,6 +345,7 @@ namespace Ropin.Inspection.Api.Controllers.Base
                         contentArray.Add(contentAdd);
                     }
                 }
+                int sortNum = 0;
                 foreach (var item in contentGroup)
                 {
                     int type = 1;
@@ -258,8 +356,8 @@ namespace Ropin.Inspection.Api.Controllers.Base
                         case "隐患整改验收单": type = 2; break;
                         case "消防设施每周检查记录": type = 3; break;
                         case "防火巡查记录表": type = 4; break;
+                        case "点检工单记录表": type = 5; break;
                     }
-                    int sort = 0;
                     var GroupModel = contentGroupList.Where(g => g.C_Name == item.Column2 && g.I_Type == type && g.C_PatrolItem == item.Column3).FirstOrDefault();
                     TISP_ContentGroup contentGroupAdd = null;
                     if (GroupModel == null)
@@ -268,8 +366,9 @@ namespace Ropin.Inspection.Api.Controllers.Base
                         {
                             G_ID = Guid.NewGuid(),
                             C_StoreCode = storeCode,
+                            C_DevStoreCode= devCode,
                             C_Name = item.Column2,
-                            I_Sort = sort,
+                            I_Sort = sortNum,
                             C_Remark = item.Column6,
                             I_Type = type,
                             C_PatrolItem = item.Column3,
@@ -278,6 +377,7 @@ namespace Ropin.Inspection.Api.Controllers.Base
                             C_Status = "1",
                         };
                         contentGroupArray.Add(contentGroupAdd);
+                        sortNum++;
                     }
                 }
                 foreach (var item in researchExcels)
@@ -290,6 +390,7 @@ namespace Ropin.Inspection.Api.Controllers.Base
                         case "隐患整改验收单": type = 2; break;
                         case "消防设施每周检查记录": type = 3; break;
                         case "防火巡查记录表": type = 4; break;
+                        case "点检工单记录表": type = 5; break;
                     }
                     Guid contentGroupId = new Guid(), contentId = new Guid();
                     if (contentArray.Count > 0)

+ 293 - 2
Ropin.Inspection.Api/Controllers/Base/ReportController.cs

@@ -1,12 +1,20 @@
-using Microsoft.AspNetCore.Mvc;
+using Autofac.Core;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.Logging;
+using Newtonsoft.Json;
+using NPOI.SS.UserModel;
+using NPOI.SS.Util;
+using NPOI.XSSF.UserModel;
 using Ropin.Inspection.Api.Common;
 using Ropin.Inspection.Model;
 using Ropin.Inspection.Model.SearchModel;
 using Ropin.Inspection.Model.ViewModel;
+using Ropin.Inspection.Model.ViewModel.DEV;
 using Ropin.Inspection.Service.Interface;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
 
@@ -99,7 +107,6 @@ namespace Ropin.Inspection.Api.Controllers
             return new ApiResult(ReturnCode.Success);
         }
 
-
         /// <summary>
         /// 删除
         /// </summary>
@@ -123,5 +130,289 @@ namespace Ropin.Inspection.Api.Controllers
             return new ApiResult(ReturnCode.Success);
         }
 
+        /// <summary>
+        /// 导出报表-Excel
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="OrgName"></param>
+        /// <param name="StoreName"></param>
+        /// <returns></returns>
+        [HttpPost("ReportExportExcel")]
+        [AllowAnonymous]
+        public async Task<IActionResult> ReportExportExcel(Guid id,string OrgName,string StoreName)
+        {
+            if (Guid.Empty == id)
+            {
+                throw new Exception("参数不能为空值");
+            }
+            try
+            {
+                ReportViewModel model = await _service.GetByIdAsync(id);
+                if (model == null)
+                {
+                    throw new Exception("没有此报表");
+                }
+                object Report= await _service.GetReportDataByIdAsync(id);
+                IWorkbook workbook = new XSSFWorkbook();
+                ISheet sheet = workbook.CreateSheet();
+                #region 标题-第一行
+                //标题加粗居中.
+                IFont font = workbook.CreateFont();
+                font.IsBold = true;
+                font.FontHeightInPoints = 22;
+                font.FontName = "宋体";
+                ICellStyle titleCellStyle = workbook.CreateCellStyle();
+                titleCellStyle.SetFont(font);
+                titleCellStyle.Alignment = HorizontalAlignment.Center;  //字体居中
+                titleCellStyle.VerticalAlignment = VerticalAlignment.Center;//字体上下居中
+                //边框
+                titleCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+                titleCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+                titleCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+                titleCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+                titleCellStyle.WrapText = true;
+                #endregion
+                #region 说明 - 
+                //标题加粗居中.
+                IFont font0 = workbook.CreateFont();
+                font0.IsBold = false;
+                font0.FontHeightInPoints = 14;
+                font0.FontName = "宋体";
+                ICellStyle headCellStyle1 = workbook.CreateCellStyle();
+                headCellStyle1.SetFont(font0);
+                headCellStyle1.Alignment = HorizontalAlignment.Left;  //字体左右居左
+                headCellStyle1.VerticalAlignment = VerticalAlignment.Center;//字体上下居中
+                //边框
+                headCellStyle1.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle1.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle1.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle1.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle1.WrapText = true;
+                #endregion
+                #region 表头 - 
+                //标题加粗居中.
+                IFont font1 = workbook.CreateFont();
+                font1.IsBold = true;
+                font1.FontHeightInPoints = 14;
+                font1.FontName = "宋体";
+                ICellStyle headCellStyle = workbook.CreateCellStyle();
+                headCellStyle.SetFont(font1);
+                headCellStyle.Alignment = HorizontalAlignment.Center;  //字体左右居中
+                headCellStyle.VerticalAlignment = VerticalAlignment.Center;//字体上下居中
+                //边框
+                headCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+                headCellStyle.WrapText = true;
+                #endregion
+                #region 内容 - 
+                //标题加粗居中.
+                IFont font2 = workbook.CreateFont();
+                font2.IsBold = false;
+                font2.FontHeightInPoints = 12;
+                font2.FontName = "宋体";
+                ICellStyle rowCellStyle = workbook.CreateCellStyle();
+                rowCellStyle.SetFont(font2);
+                rowCellStyle.Alignment = HorizontalAlignment.Center;  //字体居中
+                rowCellStyle.VerticalAlignment = VerticalAlignment.Center;//字体上下居中
+                //边框
+                rowCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+                rowCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+                rowCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+                rowCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+                rowCellStyle.WrapText = true;
+                #endregion
+                string TitelName = model.C_DevName+"点检工单记录表"+(string.IsNullOrEmpty(model.C_DevNumber)?"":"(设备编号:"+model.C_DevNumber+" )");
+                if (model.I_Type==5)
+                {
+                    IRow title = sheet.CreateRow(0);
+                    title.Height = 30 * 25;
+                    title.CreateCell(0).SetCellValue(TitelName);
+                    foreach (var item in title.Cells)
+                    {
+                        item.CellStyle = titleCellStyle;
+                    }
+                    // 合并列示例,合并第 1 行的第 0 列到第 15 列
+                    sheet.AddMergedRegion(new CellRangeAddress(0, 0, 0, 4));
+
+                    IRow row3 = sheet.CreateRow(3);
+                    row3.CreateCell(0).SetCellValue("序号");
+                    row3.CreateCell(1).SetCellValue("设备和设施");
+                    row3.CreateCell(2).SetCellValue("巡视检查内容");
+                    row3.CreateCell(3).SetCellValue("巡检状态");
+                    row3.CreateCell(4).SetCellValue("维护维修记录");
+                    foreach (var item in row3.Cells)
+                    {
+                        item.CellStyle = headCellStyle;
+                    }
+                    string UserName = "";
+                    IEnumerable<InspectionWorkOrderModel> Report3 =(IEnumerable<InspectionWorkOrderModel>)Report;
+                    if (Report3 == null || Report3.Count() == 0)
+                    {
+                        IRow row4 = sheet.CreateRow(4);
+                        row4.CreateCell(0).SetCellValue("暂无数据");
+                        row4.CreateCell(1).SetCellValue("");
+                        row4.CreateCell(2).SetCellValue("");
+                        row4.CreateCell(3).SetCellValue("");
+                        row4.CreateCell(4).SetCellValue("");
+                        foreach (var item in row4.Cells)
+                        {
+                            item.CellStyle = rowCellStyle;
+                        }
+                        sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(4, 4, 0, 4));
+                    }
+                    else
+                    {
+                        int seriaNum = 1;int rowsNumber = 4;
+                        List<string> nameList= new List<string>();
+                        foreach (var item in Report3)
+                        {
+                            if (item.ContentRecordList != null&&item.ContentRecordList.Count()>0)
+                            {
+                                int mergeRowNum = 0;
+                                foreach (var index in item.ContentRecordList)
+                                {
+                                    if (index != null)
+                                    {
+                                        nameList.AddRange(index.UserName);
+                                        IRow rows = sheet.CreateRow(rowsNumber);
+                                        if (mergeRowNum == 0)
+                                        {
+                                            rows.CreateCell(0).SetCellValue(seriaNum);
+                                            rows.CreateCell(1).SetCellValue(item.PatrolItem);
+                                            rows.CreateCell(4).SetCellValue(item.Remark);
+                                        }
+                                        else
+                                        {
+                                            rows.CreateCell(0).SetCellValue("");
+                                            rows.CreateCell(1).SetCellValue("");
+                                            rows.CreateCell(4).SetCellValue("");
+                                        }
+                                        rows.CreateCell(2).SetCellValue(index.Name);
+                                        //string tick = "\u2713"; // 对勾的Unicode编码 "✓"; // 对勾
+                                        //string cross = "\u2718"; // 叉号的Unicode编码  "✘"; // 叉号
+                                        string FuHao = "\u25EF"; // 输出:◯
+                                        switch (index.CheckStatus)
+                                        {
+                                            case "3": FuHao = "\u2717"; break;
+                                            case "0":
+                                            case "1":
+                                            case "2":
+                                            case "4": FuHao = "✓"; break;
+                                            default: FuHao = "\u25EF"; break;
+                                        }
+                                        rows.CreateCell(3).SetCellValue(FuHao);
+
+                                        foreach (var cel in rows.Cells)
+                                        {
+                                            cel.CellStyle = rowCellStyle;
+                                        }
+                                        rowsNumber++;
+                                        mergeRowNum++;
+                                    }                                   
+                                }
+                                if (mergeRowNum > 1)
+                                {
+                                    sheet.AddMergedRegion(new CellRangeAddress(rowsNumber - mergeRowNum, rowsNumber - 1, 0, 0));
+                                    sheet.AddMergedRegion(new CellRangeAddress(rowsNumber - mergeRowNum, rowsNumber - 1, 1, 1));
+                                    sheet.AddMergedRegion(new CellRangeAddress(rowsNumber - mergeRowNum, rowsNumber - 1, 4, 4));
+                                }
+                                seriaNum++;
+                            }
+                        }
+
+                        UserName = string.Join(";", nameList.Distinct());
+
+                        IRow rown = sheet.CreateRow(rowsNumber);
+                        rown.Height = 30 * 20;
+                        rown.CreateCell(0).SetCellValue("使用部门确认:");
+                        rown.CreateCell(1).SetCellValue("");
+                        rown.CreateCell(2).SetCellValue("");
+                        rown.CreateCell(3).SetCellValue("日期:       年     月     日");
+                        rown.CreateCell(4).SetCellValue("");
+                        foreach (var item in rown.Cells)
+                        {
+                            item.CellStyle = headCellStyle1;
+                        }
+                        // 合并列示例,合并第 2 行的第 0 列到第 2 列
+                        sheet.AddMergedRegion(new CellRangeAddress(rowsNumber, rowsNumber, 0, 2));
+                        // 合并列示例,合并第 2 行的第 3 列到第 4 列
+                        sheet.AddMergedRegion(new CellRangeAddress(rowsNumber, rowsNumber, 3, 4));
+
+                        IRow rown1 = sheet.CreateRow(rowsNumber+1);
+                        rown1.CreateCell(0).SetCellValue("巡检状态说明: ✓ = 已检查且正常; ✘ = 已检查且异常; ◯ = 未检查");
+                        // 合并列示例,合并第 2 行的第 0 列到第 2 列
+                        sheet.AddMergedRegion(new CellRangeAddress(rowsNumber+1, rowsNumber+1, 0, 4));
+                    }
+
+                    IRow row1 = sheet.CreateRow(1);
+                    row1.Height = 30 * 15;
+                    row1.CreateCell(0).SetCellValue("使用部门:" + StoreName);
+                    row1.CreateCell(1).SetCellValue("");
+                    row1.CreateCell(2).SetCellValue("");
+                    row1.CreateCell(3).SetCellValue("维保时间:" + model.D_CreateTime.ToString("yyyy年MM月dd日"));
+                    row1.CreateCell(4).SetCellValue("");
+                    IRow row2 = sheet.CreateRow(2);
+                    row2.Height = 30 * 15;
+                    row2.CreateCell(0).SetCellValue("服务公司:" + OrgName);
+                    row2.CreateCell(1).SetCellValue("");
+                    row2.CreateCell(2).SetCellValue("");
+                    row2.CreateCell(3).SetCellValue("维保人员:"+ UserName);
+                    row2.CreateCell(4).SetCellValue("");
+                    foreach (var item in row1.Cells)
+                    {
+                        item.CellStyle = headCellStyle1;
+                    }
+                    foreach (var item in row2.Cells)
+                    {
+                        item.CellStyle = headCellStyle1;
+                    }
+                    // 合并列示例,合并第 2 行的第 0 列到第 2 列
+                    sheet.AddMergedRegion(new CellRangeAddress(1, 1, 0, 2));
+                    // 合并列示例,合并第 2 行的第 3 列到第 4 列
+                    sheet.AddMergedRegion(new CellRangeAddress(1, 1, 3, 4));
+                    // 合并列示例,合并第 3 行的第 0 列到第 2 列
+                    sheet.AddMergedRegion(new CellRangeAddress(2, 2, 0, 2));
+                    // 合并列示例,合并第 3 行的第 3 列到第 4 列
+                    sheet.AddMergedRegion(new CellRangeAddress(2, 2, 3, 4));
+
+                }
+                // 自适应单元格
+                //for (int i = 4; i < sheet.LastRowNum; i++)
+                //{
+                //    sheet.AutoSizeRow(i);
+                //}
+                for (int i = 0; i < 5; i++)
+                {
+                    if (i == 0)
+                    {
+                        sheet.SetColumnWidth(i, 256 * 10);
+                    }
+                    else if(i==2)
+                    {
+                        sheet.SetColumnWidth(i, 256 * 55);
+                    }
+                    else if (i == 4)
+                    {
+                        sheet.SetColumnWidth(i, 256 * 35);
+                    }
+                    else
+                    {
+                        sheet.SetColumnWidth(i, 256 * 22);
+                    }
+                }
+                using (MemoryStream stream = new MemoryStream())
+                {
+                    workbook.Write(stream);
+                    byte[] data = stream.ToArray();
+                    return File(data, "application/vnd.ms-excel", $"{model.C_Name}.xlsx");
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception("导出Excel数据异常:"+ex.Message);
+            }
+        }
     }
 }

+ 23 - 0
Ropin.Inspection.Api/Controllers/ISP/TispRecordItemController.cs

@@ -539,6 +539,29 @@ namespace Ropin.Inspection.Api.Controllers
             }
         }
         /// <summary>
+        /// 点检工单表记录-type=5
+        /// </summary>
+        /// <param name="start"></param>
+        /// <param name="end"></param>
+        /// <returns></returns>
+        [HttpGet("GetInspectionWorkOrderAsync")]
+        public async Task<ApiResult> GetInspectionWorkOrderAsync(DateTime start, DateTime end, string storeCode, string devCode)
+        {
+            if (start.Year < 2010 || end.Year < 2010 || string.IsNullOrEmpty(storeCode))
+            {
+                return new ApiResult(ReturnCode.GeneralError);
+            }
+            try
+            {
+                object o = await _tispRecordItemService.GetInspectionWorkOrderAsync(start, end.AddDays(1), storeCode, devCode);
+                return new ApiResult<object>(o);
+            }
+            catch (Exception ex)
+            {
+                return new ApiResult(ReturnCode.GeneralError, ex.Message);
+            }
+        }
+        /// <summary>
         /// 发送点检邮件【大屏-详情】
         /// </summary>
         /// <param name="searchModel"></param>

+ 6 - 5
Ropin.Inspection.Api/Controllers/SYS/TasksQzController.cs

@@ -245,6 +245,7 @@ namespace Ropin.Inspection.Api.Controllers
                             var ResuleModelStop = await _schedulerCenter.StopScheduleJobAsync(tasksQz);
                             data.Message = $"{data.Message}=>停止:{ResuleModelStop.msg}";
                         }
+                        data.Code = ReturnCode.ProcedureSuccess;
                     }
                     else
                     {
@@ -631,11 +632,11 @@ namespace Ropin.Inspection.Api.Controllers
             }
             finally
             {
-                if (data.Code == ReturnCode.ProcedureSuccess)
-                    await _unitOfWork.CommitAsync();
-                else
-                    _unitOfWork.Rollback();
-                data.Code = ReturnCode.Success;
+                //if (data.Code == ReturnCode.ProcedureSuccess)
+                //    await _unitOfWork.CommitAsync();
+                //else
+                //    _unitOfWork.Rollback();
+                //data.Code = ReturnCode.Success;
             }
             
             return data;

+ 0 - 13
Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.mine

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
-    <Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
-    <ShowAllFiles>true</ShowAllFiles>
-    <NameOfLastUsedPublishProfile>E:\Ropin\svn\SH_HB\Source_SQ\Ropin.Inspection.Api\Ropin.Inspection.Api\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
-    <ActiveDebugProfile>Ropin.Inspection.Api</ActiveDebugProfile>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
-  </PropertyGroup>
-</Project>

+ 0 - 13
Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.r1412

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
-    <Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
-    <ShowAllFiles>true</ShowAllFiles>
-    <NameOfLastUsedPublishProfile>C:\Users\liufd\Desktop\ProjectFile\SVN_Project\SH_HB\Source_SQ\Ropin.Inspection.Api\Ropin.Inspection.Api\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-    <ActiveDebugProfile>Ropin.Inspection.Api</ActiveDebugProfile>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
-  </PropertyGroup>
-</Project>

+ 0 - 13
Ropin.Inspection.Api/Ropin.Inspection.Api.csproj.user.r1415

@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
-    <Controller_SelectedScaffolderCategoryPath>root/Common/Api</Controller_SelectedScaffolderCategoryPath>
-    <ShowAllFiles>true</ShowAllFiles>
-    <NameOfLastUsedPublishProfile>D:\项目代码\环保\Ropin.Inspection.Api\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
-    <ActiveDebugProfile>Ropin.Inspection.Api</ActiveDebugProfile>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
-  </PropertyGroup>
-</Project>

+ 2 - 2
Ropin.Inspection.Api/TdevDevOpeAccountController.cs

@@ -778,7 +778,7 @@ namespace Ropin.Inspection.Api
                             }
                             if (cel == CtabColumns.Count + 1 && merge2 > 0 && IsVal2)
                             {
-                                sheet.AddMergedRegion(new CellRangeAddress(1, 2, cel - merge2 - 1, cel - 1));
+                                sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
                                 merge2 = 0; IsVal2 = false;
                             }
                         }
@@ -1070,7 +1070,7 @@ namespace Ropin.Inspection.Api
                             }
                             if (cel == CtabColumns.Count + 1 && merge2 > 0 && IsVal2)
                             {
-                                sheet.AddMergedRegion(new CellRangeAddress(1, 2, cel - merge2 - 1, cel - 1));
+                                sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
                                 merge2 = 0; IsVal2 = false;
                             }
                         }

BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Core.Extensions.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Core.Extensions.pdb


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.pdb


+ 28 - 1
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.xml

@@ -123,12 +123,22 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.ImportIspContent(System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
+        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.JudgmentImportIspContent(System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
+            <summary>
+            导入巡检内容前的判断
+            </summary>
+            <param name="orgCode">组织ID</param>
+            <param name="storeCode">业主ID</param>
+            <param name="file"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.ImportIspContent(System.String,System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
             <summary>
             导入巡检内容
             </summary>
             <param name="orgCode"></param>
             <param name="storeCode"></param>
+            <param name="devCode">设备ID</param>
             <param name="file"></param>
             <returns></returns>
         </member>
@@ -233,6 +243,15 @@
             <param name="id"></param>
             <returns></returns>
         </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.ReportController.ReportExportExcel(System.Guid,System.String,System.String)">
+            <summary>
+            导出报表-Excel
+            </summary>
+            <param name="id"></param>
+            <param name="OrgName"></param>
+            <param name="StoreName"></param>
+            <returns></returns>
+        </member>
         <member name="M:Ropin.Inspection.Api.Controllers.WxController.GetOpenId(System.String)">
             <summary>
             获取ai公众号的openID
@@ -975,6 +994,14 @@
             <param name="end"></param>
             <returns></returns>
         </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.TispRecordItemController.GetInspectionWorkOrderAsync(System.DateTime,System.DateTime,System.String,System.String)">
+            <summary>
+            点检工单表记录-type=5
+            </summary>
+            <param name="start"></param>
+            <param name="end"></param>
+            <returns></returns>
+        </member>
         <member name="M:Ropin.Inspection.Api.Controllers.TispRecordItemController.SendEmilOrderItem(Ropin.Inspection.Model.SearchModel.SendRecordToEmailModel)">
             <summary>
             发送点检邮件【大屏-详情】

BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.pdb


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Model.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Model.pdb


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Repository.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Repository.pdb


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Service.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Service.pdb


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Tasks.dll


BIN
Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Tasks.pdb


+ 0 - 0
Ropin.Inspection.Api/bin/Debug/net5.0/logs/2025/202505/20250520.txt


+ 0 - 0
Ropin.Inspection.Api/bin/Debug/net5.0/logs/2025/202505/20250520_error.txt


BIN
Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.csproj.AssemblyReference.cache


BIN
Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.dll


BIN
Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.pdb


+ 28 - 1
Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.xml

@@ -123,12 +123,22 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.ImportIspContent(System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
+        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.JudgmentImportIspContent(System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
+            <summary>
+            导入巡检内容前的判断
+            </summary>
+            <param name="orgCode">组织ID</param>
+            <param name="storeCode">业主ID</param>
+            <param name="file"></param>
+            <returns></returns>
+        </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.Base.FileImportController.ImportIspContent(System.String,System.String,System.String,Microsoft.AspNetCore.Http.IFormFile)">
             <summary>
             导入巡检内容
             </summary>
             <param name="orgCode"></param>
             <param name="storeCode"></param>
+            <param name="devCode">设备ID</param>
             <param name="file"></param>
             <returns></returns>
         </member>
@@ -233,6 +243,15 @@
             <param name="id"></param>
             <returns></returns>
         </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.ReportController.ReportExportExcel(System.Guid,System.String,System.String)">
+            <summary>
+            导出报表-Excel
+            </summary>
+            <param name="id"></param>
+            <param name="OrgName"></param>
+            <param name="StoreName"></param>
+            <returns></returns>
+        </member>
         <member name="M:Ropin.Inspection.Api.Controllers.WxController.GetOpenId(System.String)">
             <summary>
             获取ai公众号的openID
@@ -975,6 +994,14 @@
             <param name="end"></param>
             <returns></returns>
         </member>
+        <member name="M:Ropin.Inspection.Api.Controllers.TispRecordItemController.GetInspectionWorkOrderAsync(System.DateTime,System.DateTime,System.String,System.String)">
+            <summary>
+            点检工单表记录-type=5
+            </summary>
+            <param name="start"></param>
+            <param name="end"></param>
+            <returns></returns>
+        </member>
         <member name="M:Ropin.Inspection.Api.Controllers.TispRecordItemController.SendEmilOrderItem(Ropin.Inspection.Model.SearchModel.SendRecordToEmailModel)">
             <summary>
             发送点检邮件【大屏-详情】

BIN
Ropin.Inspection.Api/obj/Debug/net5.0/ref/Ropin.Inspection.Api.dll


BIN
Ropin.Inspection.Api/obj/Debug/net5.0/refint/Ropin.Inspection.Api.dll


+ 6 - 6
Ropin.Inspection.Common/DataDictionaryHelper.cs

@@ -122,11 +122,11 @@ namespace Ropin.Inspection.Common
                     case "MSG_TYPE_014": //val = "正在维修"; break;
                     case "MSG_TYPE_015": //val = "维修返工"; break;
                     case "MSG_TYPE_016": //val = "维修完成确认"; break;
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId;
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&StoreCode=" + StoreCode;
                         break;
                     case "MSG_TYPE_002": //val = "通知运维"; break;
                     case "MSG_TYPE_009": //val = "运维审核"; break;
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&Status=" + status+ "&Title="+ title;
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&Status=" + status + "&StoreCode=" + StoreCode + "&Title=" + title;
                         break;
                     case "MSG_TYPE_003": //val = "通知巡检"; break;
                     case "MSG_TYPE_004": //val = "巡检异常"; break;
@@ -139,19 +139,19 @@ namespace Ropin.Inspection.Common
                     //case "MSG_TYPE_013": //val = "设备点报警消除"; break;
                     case "MSG_TYPE_017": //val = "设备点预警"; break;
                     //case "MSG_TYPE_018": //val = "设备点预警消除"; break;                    
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + messId;
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + messId + "&StoreCode=" + StoreCode;
                         break;
                     case "MSG_TYPE_019": //val = "报警上报"; break;
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId ;
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&StoreCode=" + StoreCode;
                         break;
                     case "MSG_TYPE_020": //val = "报警取消"; break;
                     case "MSG_TYPE_021": //val = "报警确认"; break;
                     case "MSG_TYPE_022": //val = "报警完成"; break;
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&Status=" + status;
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + dataId + "&Status=" + status + "&StoreCode=" + StoreCode;
                         break;
                     case "MSG_TYPE_023": //val = "手动报警"; break;
                     case "MSG_TYPE_024": //val = "AI设备报警"; break;
-                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + messId; 
+                        val = WXConstModel.XCXPublicPage + "?MessId=" + messId + "&msgType=" + type + "&Code=" + messId + "&StoreCode=" + StoreCode;
                         break;
                     default:   val = ""; wxId = ""; break;
                 }

+ 1 - 0
Ropin.Inspection.Common/Helper/WeChatHelper.cs

@@ -229,6 +229,7 @@ namespace Ropin.Inspection.Common.Helper
         /// <returns></returns>
         public async Task<bool> SendTemplateMessageAsync(string openId, string templateId, string url, object data, string miniProgramAppId, string miniProgramPagePath,string token)
         {
+            log.Info($"--发送微信模板[SendTemplateMessageAsync]: 【openId={openId};miniProgramAppId={miniProgramAppId};miniProgramPagePath={miniProgramPagePath};】");
             bool result=false;
             string messageUrl = string.Format(WXConstModel.WeChatTemplateMessageUrl, token);
             var message = new

BIN
Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.dll


BIN
Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.pdb


BIN
Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.dll


BIN
Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.pdb


+ 1 - 0
Ropin.Inspection.Model/Entities/TISP_ContentGroup.cs

@@ -15,6 +15,7 @@ namespace Ropin.Inspection.Model.Entities
         [Key]
         public Guid G_ID { get; set; } 
         public string C_StoreCode { get; set; }
+        public string C_DevStoreCode { get; set; }
         public string C_Name { get; set; }
         public int? I_Sort { get; set; }
         public string C_Remark { get; set; }

+ 1 - 0
Ropin.Inspection.Model/Entities/TISP_Report.cs

@@ -11,6 +11,7 @@ namespace Ropin.Inspection.Model.Entities
         [Key]
         public Guid G_ID { get; set; } = Guid.NewGuid();
         public string C_StoreCode { get; set; }
+        public string C_DevStoreCode { get; set; }
         public string C_Name { get; set; }
         public int I_Type { get; set; }
         public string C_GroupName { get; set; }

+ 1 - 0
Ropin.Inspection.Model/SearchModel/ISP/ReportSearchModel.cs

@@ -8,6 +8,7 @@ namespace Ropin.Inspection.Model.SearchModel
 {
     public class ReportSearchModel:BaseSearchModel
     {
+        public string Id { get; set; }
         public string C_Name { get; set; }
         public int I_Type { get; set; }
         public string C_GroupName { get; set; }

+ 3 - 0
Ropin.Inspection.Model/SearchModel/ISP/TispContentGroupsSearchModel.cs

@@ -10,5 +10,8 @@ namespace Ropin.Inspection.Model.SearchModel
     {
         public string C_Name { get; set; }
         public string C_StoreCode { get; set; }
+        public string C_DevStoreCode { get; set; }
+        public int? I_Type { get; set; }
+        public string C_Status { get; set; }
     }
 }

+ 2 - 0
Ropin.Inspection.Model/TaicTemplateModel.cs

@@ -47,7 +47,9 @@ namespace Ropin.Inspection.Model
         public string CMachineCode { get; set; }
         public DateTime DProdDate { get; set; }
         public string CAiboxTemplateCode { get; set; }
+        public string CAIBoxTemplateName { get; set; }
         public string CStoreCode { get; set; }
+        public string CStoreName { get; set; }
         public string CCfgUrl { get; set; }
         public int? I_Sort { get; set; }
         public string CRemark { get; set; }

+ 2 - 0
Ropin.Inspection.Model/ViewModel/ISP/FirePreventionWeekRecordDto.cs

@@ -41,6 +41,8 @@ namespace Ropin.Inspection.Model.ViewModel
         /// 巡检点名称
         /// </summary>
         public string SpotName { get; set; }
+
+        public Guid MXID { get; set; }
         /// <summary>
         /// 巡检内容
         /// </summary>

+ 26 - 0
Ropin.Inspection.Model/ViewModel/ISP/FirePreventionWeekRecordViewModel.cs

@@ -126,4 +126,30 @@ namespace Ropin.Inspection.Model.ViewModel
         public IList<string> Implementation { get; set; }
     }
 
+    public class ReportContentGroupModel
+    {
+        public Guid G_ID { get; set; }
+        public string C_Name { get; set; }
+        public string C_Remark { get; set; }
+        public string C_PatrolItem { get; set; }
+        public Guid ContentId { get; set; }
+        public string ContentName { get; set; }
+        public string ContentRemark { get; set; }
+        public string C_Status { get; set; }
+        public DateTime? D_CreateOn { get; set; }
+        public string UserName { get; set; }
+    }
+    public class InspectionWorkOrderModel
+    {
+        public string PatrolItem { get; set; }
+        public string Remark { get; set; }
+        public List<InspectionWorkOrderContentRecord> ContentRecordList { get; set; }
+    }
+    public class InspectionWorkOrderContentRecord
+    {
+        public string Name { get; set; }
+        public string CheckStatus { get; set; }
+        public string Remark { get; set; }
+        public List<string> UserName { get; set; }
+    }
 }

+ 3 - 0
Ropin.Inspection.Model/ViewModel/ISP/ReportViewModel.cs

@@ -12,7 +12,10 @@ namespace Ropin.Inspection.Model.ViewModel
         //private IEnumerable<FirePreventionWeekRecordViewModel> firePreventionWeekRecord;
         public Guid G_ID { get; set; }
         public string C_StoreCode { get; set; }
+        public string C_DevStoreCode { get; set; }
         public string C_Name { get; set; }
+        public string C_DevName { get; set; }
+        public string C_DevNumber { get; set; }
         public int I_Type { get; set; }
         public string C_GroupName { get; set; }
         public DateTime D_Start { get; set; }

+ 3 - 1
Ropin.Inspection.Model/ViewModel/ISP/TispContentGroupViewModel.cs

@@ -13,6 +13,7 @@ namespace Ropin.Inspection.Model.ViewModel
     {
         public Guid G_ID { get; set; }
         public string C_StoreCode { get; set; }
+        public string C_DevStoreCode { get; set; }
         public string C_Name { get; set; }
         public int I_Sort { get; set; }
         public string C_Remark { get; set; }
@@ -23,6 +24,7 @@ namespace Ropin.Inspection.Model.ViewModel
         public string C_Status { get; set; }
         public int I_Type { get; set; }
         public string C_PatrolItem { get; set; }
-
+        public string C_DevName { get; set; }
+        public string C_DevQRUrl { get; set; }
     }
 }

+ 1 - 0
Ropin.Inspection.Model/ViewModel/ISP/TispContentUpdateGroupViewModel.cs

@@ -8,6 +8,7 @@ namespace Ropin.Inspection.Model.ViewModel
 {
     public class TispContentUpdateGroupViewModel
     {
+        public string C_DevStoreCode { get; set; }
         public string C_Name { get; set; }
         public int I_Sort { get; set; }
         public string C_Remark { get; set; }

+ 1 - 0
Ropin.Inspection.Model/ViewModel/SYS/TsysUserUpdateViewModel.cs

@@ -8,6 +8,7 @@ namespace Ropin.Inspection.Model
 {
     public class TsysUserUpdateViewModel
     {
+        public string C_LicenseCode { get; set; }
         public string C_Post { get; set; }
         public string C_UserName { get; set; }
         public string C_WechatID { get; set; }

BIN
Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.dll


BIN
Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.pdb


BIN
Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Model.dll


BIN
Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Model.pdb


BIN
Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.csproj.AssemblyReference.cache


BIN
Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.dll


BIN
Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.pdb


BIN
Ropin.Inspection.Model/obj/Debug/net5.0/ref/Ropin.Inspection.Model.dll


BIN
Ropin.Inspection.Model/obj/Debug/net5.0/refint/Ropin.Inspection.Model.dll


+ 18 - 2
Ropin.Inspection.Repository/Base/ReportRepository.cs

@@ -19,13 +19,18 @@ namespace Ropin.Inspection.Repository
         public Task<IEnumerable<ReportViewModel>> GetWithoutReportData(ReportSearchModel searchModel)
         {
             MySqlConnector.MySqlParameter[] parameters = new[] {
+                new MySqlConnector.MySqlParameter("id", searchModel.Id),
                 new MySqlConnector.MySqlParameter("StoreCode", searchModel.StoreCode),
                 new MySqlConnector.MySqlParameter("start", searchModel.Start), 
                 new MySqlConnector.MySqlParameter("end", searchModel.End),
                 new MySqlConnector.MySqlParameter("name ", searchModel.C_Name), 
                 new MySqlConnector.MySqlParameter("type", searchModel.I_Type),
                 new MySqlConnector.MySqlParameter("groupName ", searchModel.C_GroupName) }; 
-            string sql = "SELECT G_ID,C_Name,I_Type,C_GroupName,D_CreateTime,C_Remark,D_Start,D_End FROM TISP_Report WHERE C_Status = '1'  AND C_StoreCode = @StoreCode AND  D_CreateTime between @start and @end";
+            string sql = @"select * from (
+SELECT R.G_ID,R.C_Name,R.C_StoreCode,D.C_Name as C_DevName,D.C_NumberCode as C_DevNumber,R.I_Type,R.C_GroupName,R.D_CreateTime,R.C_Remark,R.D_Start,R.D_End,R.C_Status 
+FROM TISP_Report R
+LEFT JOIN TDEV_DevStore D on (R.C_DevStoreCode=D.C_ID)
+) tab WHERE C_Status = '1' ";
             if (!string.IsNullOrEmpty(searchModel.C_Name))
             {
                 sql += " AND  C_Name = @name";
@@ -38,7 +43,18 @@ namespace Ropin.Inspection.Repository
             {
                 sql += " AND C_GroupName = @groupName";
             }
-
+            if (!string.IsNullOrEmpty(searchModel.StoreCode))
+            {
+                sql += "   AND C_StoreCode = @StoreCode ";
+            }
+            if (searchModel.End!=DateTimeOffset.MinValue&&searchModel.Start!= DateTimeOffset.MinValue)
+            {
+                sql += " AND  D_CreateTime between @start and @end";
+            }
+            if (!string.IsNullOrEmpty(searchModel.Id))
+            {
+                sql += " AND G_ID = @id";
+            }
             sql += " ORDER BY D_CreateTime DESC";
             IEnumerable<ReportViewModel> list = EntityFrameworkCoreExtensions.GetList<ReportViewModel>(DbContext.Database, sql, parameters);
             searchModel.TotalCount = list.First() != null ? list.ToList().Count : 0;

Some files were not shown because too many files changed in this diff