yandaniu 1 день назад
Родитель
Сommit
379041c29a
45 измененных файлов с 166 добавлено и 153 удалено
  1. 1 1
      .env
  2. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/1a436f50-4237-4733-a22c-195a9c4c5240.vsidx
  3. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/272fa97f-151d-42d7-9b30-a5b721f0e12e.vsidx
  4. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/2bb81cb6-9ed5-47de-9954-53d35c3bb603.vsidx
  5. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/751d5c04-6495-4a06-956a-9eeaf72de663.vsidx
  6. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/7f02d622-7ee6-4c49-9019-84ec6e560b51.vsidx
  7. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/8746401a-d6c0-4645-b14e-5f76724f0e5e.vsidx
  8. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/8b8e09eb-1fd9-47af-b862-706794f10466.vsidx
  9. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/9eaf3ec7-a104-4f9e-bc1e-3ed7760dc957.vsidx
  10. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/9f467121-c0f9-45bf-8116-92a5e2507064.vsidx
  11. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/a68678a8-2980-42ab-aa28-4e73cca27cc0.vsidx
  12. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/ae8531a7-7acc-4e11-b033-39919e638061.vsidx
  13. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/b2818a66-640a-4243-bf10-84c08bc1cbaf.vsidx
  14. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/bd7015a5-9762-4f6e-8105-68dd54ae8250.vsidx
  15. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/c8298533-c07f-4e68-93d7-b41eef03b2a4.vsidx
  16. BIN
      .vs/Ropin.Inspection.Api/FileContentIndex/eec2ca37-12c9-4b76-a50b-e47c001a190a.vsidx
  17. BIN
      .vs/Ropin.Inspection.Api/v17/.suo
  18. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  19. BIN
      Ropin.Core.Extensions/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  20. BIN
      Ropin.Core.Extensions/obj/Debug/net5.0/Ropin.Core.Extensions.csproj.AssemblyReference.cache
  21. 163 152
      Ropin.Inspection.Api/TdevDevOpeAccountController.cs
  22. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.dll
  23. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Api.pdb
  24. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  25. BIN
      Ropin.Inspection.Api/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  26. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.csproj.AssemblyReference.cache
  27. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.dll
  28. BIN
      Ropin.Inspection.Api/obj/Debug/net5.0/Ropin.Inspection.Api.pdb
  29. 2 0
      Ropin.Inspection.Common/Helper/ChineseAndEnglishHelper.cs
  30. BIN
      Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  31. BIN
      Ropin.Inspection.Common/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  32. BIN
      Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.dll
  33. BIN
      Ropin.Inspection.Common/obj/Debug/net5.0/Ropin.Inspection.Common.pdb
  34. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  35. BIN
      Ropin.Inspection.Model/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  36. BIN
      Ropin.Inspection.Model/obj/Debug/net5.0/Ropin.Inspection.Model.csproj.AssemblyReference.cache
  37. BIN
      Ropin.Inspection.Repository/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  38. BIN
      Ropin.Inspection.Repository/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  39. BIN
      Ropin.Inspection.Repository/obj/Debug/net5.0/Ropin.Inspection.Repository.csproj.AssemblyReference.cache
  40. BIN
      Ropin.Inspection.Service/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  41. BIN
      Ropin.Inspection.Service/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  42. BIN
      Ropin.Inspection.Service/obj/Debug/net5.0/Ropin.Inspection.Service.csproj.AssemblyReference.cache
  43. BIN
      Ropin.Inspection.Tasks/bin/Debug/net5.0/Ropin.Inspection.Common.dll
  44. BIN
      Ropin.Inspection.Tasks/bin/Debug/net5.0/Ropin.Inspection.Common.pdb
  45. BIN
      Ropin.Inspection.Tasks/obj/Debug/net5.0/Ropin.Inspection.Tasks.csproj.AssemblyReference.cache

+ 1 - 1
.env

@@ -2,4 +2,4 @@
 #Development
 #Staging
 DEV_ENVIRONMENT=Development 
-version=1.3.9
+version=1.3.10

BIN
.vs/Ropin.Inspection.Api/FileContentIndex/f8962202-5c29-4e3d-8afa-f61abda06afc.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/1a436f50-4237-4733-a22c-195a9c4c5240.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/97efb975-54ee-45c3-a369-10f6da3730e0.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/272fa97f-151d-42d7-9b30-a5b721f0e12e.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/31bac094-b2c1-4619-85bf-aea1976a1403.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/2bb81cb6-9ed5-47de-9954-53d35c3bb603.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/e4a4c959-82e2-40b3-8598-16d85cce80ad.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/751d5c04-6495-4a06-956a-9eeaf72de663.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/a2bbabf3-6b83-4502-bc5c-8b1a60cd0068.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/8b8e09eb-1fd9-47af-b862-706794f10466.vsidx


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


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/4c59f8ed-7beb-4b15-90dc-dd7d318ccb7d.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/9f467121-c0f9-45bf-8116-92a5e2507064.vsidx


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


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/f409b921-f293-4dc5-9040-961aef51ef3c.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/ae8531a7-7acc-4e11-b033-39919e638061.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/24ba3213-0aa1-4407-9198-c66e4ad7e013.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/b2818a66-640a-4243-bf10-84c08bc1cbaf.vsidx


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


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/78886023-85b2-49d5-a8c4-d8b66bd035be.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/c8298533-c07f-4e68-93d7-b41eef03b2a4.vsidx


BIN
.vs/Ropin.Inspection.Api/FileContentIndex/c04360bd-98da-443f-898c-7360e5a562c8.vsidx → .vs/Ropin.Inspection.Api/FileContentIndex/eec2ca37-12c9-4b76-a50b-e47c001a190a.vsidx


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


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/obj/Debug/net5.0/Ropin.Core.Extensions.csproj.AssemblyReference.cache


+ 163 - 152
Ropin.Inspection.Api/TdevDevOpeAccountController.cs

@@ -649,199 +649,210 @@ namespace Ropin.Inspection.Api
                 {
                     List<RunSpotConfigName> tabs = new List<RunSpotConfigName>();
                     var confCode = searchModel.C_DevOpeAccountConfigCode;
-                    IRow head = sheet.CreateRow(1);
-                    IRow head2 = sheet.CreateRow(2);
-                    IRow head3 = sheet.CreateRow(3);
-                    head.Height = 30 * 20;
-                    head2.Height = 30 * 20;
-                    head3.Height = 30 * 20;
                     if (!string.IsNullOrEmpty(confCode))
                     {
-                        head.CreateCell(0).SetCellValue("日期");
-                        tabs.Add(new RunSpotConfigName { Label = "日期", Name = "Date", BReadDevSpot = false });
-                        sheet.AddMergedRegion(new CellRangeAddress(1, 3, 0, 0));
-                        int cel = 1;
-                        var content = await _devDevOpeAccountConfigService.GetEntityByID(confCode);
-                        if (content != null && !string.IsNullOrEmpty(content.C_Config))
+                        IRow head = sheet.CreateRow(1);
+                        IRow head2 = sheet.CreateRow(2);
+                        IRow head3 = sheet.CreateRow(3);
+                        head.Height = 30 * 20;
+                        head2.Height = 30 * 20;
+                        head3.Height = 30 * 20;
+                        if (!string.IsNullOrEmpty(confCode))
                         {
-                            var RunSpotConfig = JsonConvert.DeserializeObject<TdevDevOpeAccountConfigNameViewModel>(content.C_Config);
-                            List<RunSpotConfigName> CtabColumns = new List<RunSpotConfigName>();
-                            int headerNum = 1;
-                            foreach (var item in RunSpotConfig?.RunSpotConfigList.ToList())
+                            head.CreateCell(0).SetCellValue("日期");
+                            tabs.Add(new RunSpotConfigName { Label = "日期", Name = "Date", BReadDevSpot = false });
+                            sheet.AddMergedRegion(new CellRangeAddress(1, 3, 0, 0));
+                            int cel = 1;
+                            var content = await _devDevOpeAccountConfigService.GetEntityByID(confCode);
+                            if (content != null && !string.IsNullOrEmpty(content.C_Config))
                             {
-                                if (item != null)
+                                var RunSpotConfig = JsonConvert.DeserializeObject<TdevDevOpeAccountConfigNameViewModel>(content.C_Config);
+                                List<RunSpotConfigName> CtabColumns = new List<RunSpotConfigName>();
+                                int headerNum = 1;
+                                foreach (var item in RunSpotConfig?.RunSpotConfigList.ToList())
                                 {
-                                    headerNum = item.Label.Split("@").Count();
-                                    if (item.BReadDevSpot)
+                                    if (item != null)
                                     {
-                                        headerNum++;
-                                        tabs.Add(new RunSpotConfigName { Label = item.Label + "@平均值", Name = item.Name, BReadDevSpot = item.BReadDevSpot });
-                                        tabs.Add(new RunSpotConfigName { Label = item.Label + "@最大值", Name = item.Name + "_Max", BReadDevSpot = item.BReadDevSpot });
-                                        tabs.Add(new RunSpotConfigName { Label = item.Label + "@最小值", Name = item.Name + "_Min", BReadDevSpot = item.BReadDevSpot });
+                                        headerNum = item.Label.Split("@").Count();
+                                        if (item.BReadDevSpot)
+                                        {
+                                            headerNum++;
+                                            tabs.Add(new RunSpotConfigName { Label = item.Label + "@平均值", Name = item.Name, BReadDevSpot = item.BReadDevSpot });
+                                            tabs.Add(new RunSpotConfigName { Label = item.Label + "@最大值", Name = item.Name + "_Max", BReadDevSpot = item.BReadDevSpot });
+                                            tabs.Add(new RunSpotConfigName { Label = item.Label + "@最小值", Name = item.Name + "_Min", BReadDevSpot = item.BReadDevSpot });
 
-                                        CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@平均值", Name = item.Name, BReadDevSpot = item.BReadDevSpot });
-                                        CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@最大值", Name = item.Name + "_Max", BReadDevSpot = item.BReadDevSpot });
-                                        CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@最小值", Name = item.Name + "_Min", BReadDevSpot = item.BReadDevSpot });
+                                            CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@平均值", Name = item.Name, BReadDevSpot = item.BReadDevSpot });
+                                            CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@最大值", Name = item.Name + "_Max", BReadDevSpot = item.BReadDevSpot });
+                                            CtabColumns.Add(new RunSpotConfigName { Label = item.Label + "@最小值", Name = item.Name + "_Min", BReadDevSpot = item.BReadDevSpot });
 
-                                    }
-                                    else
-                                    {
-                                        tabs.Add(item);
-                                        CtabColumns.Add(item);
+                                        }
+                                        else
+                                        {
+                                            tabs.Add(item);
+                                            CtabColumns.Add(item);
+                                        }
                                     }
                                 }
-                            }
-                            bool IsVal = false; int merge = 0;
-                            bool IsVal2 = false; int merge2 = 0;
-                            foreach (var tab in CtabColumns)
-                            {
-                                if (tab != null)
+                                bool IsVal = false; int merge = 0;
+                                bool IsVal2 = false; int merge2 = 0;
+                                foreach (var tab in CtabColumns)
                                 {
-                                    var vals = tab.Label;
-                                    if (vals.Contains("@"))
+                                    if (tab != null)
                                     {
-                                        string[] tmp = vals.Split('@');//按,分割字符串 
-                                        if (tmp.Count() == 3)
+                                        var vals = tab.Label;
+                                        if (vals.Contains("@"))
                                         {
-                                            var getCel = sheet.GetRow(1).GetCell(cel - 1 - merge).ToString();
-                                            var getCel2 = sheet.GetRow(2).GetCell(cel - 1 - merge2).ToString();
-                                            if (getCel == tmp[0].ToString())
+                                            string[] tmp = vals.Split('@');//按,分割字符串 
+                                            if (tmp.Count() == 3)
                                             {
-                                                head.CreateCell(cel).SetCellValue("");
-                                                merge++;
-                                                IsVal = true;
-                                            }
-                                            else
-                                            {
-                                                IsVal = false;
-                                                head.CreateCell(cel).SetCellValue(tmp[0].ToString());
-                                            }
-                                            if (getCel2 == tmp[1].ToString())
-                                            {
-                                                head2.CreateCell(cel).SetCellValue("");
-                                                merge2++;
-                                                IsVal2 = true;
+                                                var getCel = sheet.GetRow(1).GetCell(cel - 1 - merge).ToString();
+                                                var getCel2 = sheet.GetRow(2).GetCell(cel - 1 - merge2).ToString();
+                                                if (getCel == tmp[0].ToString())
+                                                {
+                                                    head.CreateCell(cel).SetCellValue("");
+                                                    merge++;
+                                                    IsVal = true;
+                                                }
+                                                else
+                                                {
+                                                    IsVal = false;
+                                                    head.CreateCell(cel).SetCellValue(tmp[0].ToString());
+                                                }
+                                                if (getCel2 == tmp[1].ToString())
+                                                {
+                                                    head2.CreateCell(cel).SetCellValue("");
+                                                    merge2++;
+                                                    IsVal2 = true;
+                                                }
+                                                else
+                                                {
+                                                    head2.CreateCell(cel).SetCellValue(tmp[1].ToString());
+                                                    IsVal2 = false;
+                                                }
+                                                head3.CreateCell(cel).SetCellValue(tmp[2].ToString());
                                             }
                                             else
                                             {
-                                                head2.CreateCell(cel).SetCellValue(tmp[1].ToString());
                                                 IsVal2 = false;
+                                                var getCel = sheet.GetRow(1).GetCell(cel - 1 - merge).ToString();
+                                                if (getCel == tmp[0].ToString())
+                                                {
+                                                    head.CreateCell(cel).SetCellValue("");
+                                                    merge++;
+                                                    IsVal = true;
+                                                }
+                                                else
+                                                {
+                                                    IsVal = false;
+                                                    head.CreateCell(cel).SetCellValue(tmp[0].ToString());
+                                                }
+                                                head2.CreateCell(cel).SetCellValue(tmp[1].ToString());
+                                                head3.CreateCell(cel).SetCellValue("");
+                                                sheet.AddMergedRegion(new CellRangeAddress(2, 3, cel, cel));
                                             }
-                                            head3.CreateCell(cel).SetCellValue(tmp[2].ToString());
                                         }
                                         else
                                         {
+                                            IsVal = false;
                                             IsVal2 = false;
-                                            var getCel = sheet.GetRow(1).GetCell(cel - 1 - merge).ToString();
-                                            if (getCel == tmp[0].ToString())
-                                            {
-                                                head.CreateCell(cel).SetCellValue("");
-                                                merge++;
-                                                IsVal = true;
-                                            }
-                                            else
-                                            {
-                                                IsVal = false;
-                                                head.CreateCell(cel).SetCellValue(tmp[0].ToString());
-                                            }
-                                            head2.CreateCell(cel).SetCellValue(tmp[1].ToString());
+                                            head.CreateCell(cel).SetCellValue(vals);
+                                            head2.CreateCell(cel).SetCellValue("");
                                             head3.CreateCell(cel).SetCellValue("");
-                                            sheet.AddMergedRegion(new CellRangeAddress(2, 3, cel, cel));
+                                            sheet.AddMergedRegion(new CellRangeAddress(1, 3, cel, cel));
+                                        }
+                                        if (!IsVal && merge > 0)
+                                        {
+                                            sheet.AddMergedRegion(new CellRangeAddress(1, 1, cel - merge - 1, cel - 1));
+                                            merge = 0;
                                         }
+                                        if (!IsVal2 && merge2 > 0)
+                                        {
+                                            sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
+                                            merge2 = 0;
+                                        }
+                                        cel++;
                                     }
-                                    else
+                                }
+                                if (cel == CtabColumns.Count + 1 && merge > 0 && IsVal)
+                                {
+                                    sheet.AddMergedRegion(new CellRangeAddress(1, 1, cel - merge - 1, cel - 1));
+                                    merge = 0; IsVal = false;
+                                }
+                                if (cel == CtabColumns.Count + 1 && merge2 > 0 && IsVal2)
+                                {
+                                    sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
+                                    merge2 = 0; IsVal2 = false;
+                                }
+                            }
+                        }
+                        foreach (var item in head.Cells)
+                        {
+                            item.CellStyle = headCellStyle;
+                        }
+                        foreach (var item in head2.Cells)
+                        {
+                            item.CellStyle = headCellStyle;
+                        }
+                        foreach (var item in head3.Cells)
+                        {
+                            item.CellStyle = headCellStyle;
+                        }
+                        int rowNumber = 4;
+                        var confData = devOpeAccountList.Select(t => t.C_Content).ToList();
+                        for (int i = 0; i < confData.Count; i++)
+                        {
+                            IRow content = sheet.CreateRow(rowNumber);
+                            Dictionary<string, object> dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(confData[i]);
+                            int forCount = dict.Count + 1;
+                            if (tabs.Count() > dict.Count) { forCount = tabs.Count() + 1; }
+                            for (int j = 0; j < forCount; j++)
+                            {
+                                if (j < tabs.Count)
+                                {
+                                    string celVal = "";
+                                    if (dict.ContainsKey(tabs[j].Name))
                                     {
-                                        IsVal = false;
-                                        IsVal2 = false;
-                                        head.CreateCell(cel).SetCellValue(vals);
-                                        head2.CreateCell(cel).SetCellValue("");
-                                        head3.CreateCell(cel).SetCellValue("");
-                                        sheet.AddMergedRegion(new CellRangeAddress(1, 3, cel, cel));
+                                        celVal = dict[tabs[j].Name]?.ToString();
                                     }
-                                    if (!IsVal && merge > 0)
+                                    if (tabs[j].Name == "RunWhetherNormal")
                                     {
-                                        sheet.AddMergedRegion(new CellRangeAddress(1, 1, cel - merge - 1, cel - 1));
-                                        merge = 0;
+                                        celVal = celVal.ToLower() == "true" ? "异常" : "正常";
+                                        content.CreateCell(j).SetCellValue(celVal);
                                     }
-                                    if (!IsVal2 && merge2 > 0)
+                                    else if (tabs[j].Name == "Date")
                                     {
-                                        sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
-                                        merge2 = 0;
+                                        content.CreateCell(j).SetCellValue(Convert.ToDateTime(celVal).ToString("yyyy-MM-dd"));
+                                    }
+                                    else if (DateTime.TryParse(celVal, out DateTime dt) && celVal.Length >= 10)
+                                    {
+                                        content.CreateCell(j).SetCellValue(dt.ToString("yyyy-MM-dd HH:mm:ss"));
+                                    }
+                                    else
+                                    {
+                                        content.CreateCell(j).SetCellValue(celVal);
                                     }
-                                    cel++;
                                 }
                             }
-                            if (cel == CtabColumns.Count + 1 && merge > 0 && IsVal)
-                            {
-                                sheet.AddMergedRegion(new CellRangeAddress(1, 1, cel - merge - 1, cel - 1));
-                                merge = 0; IsVal = false;
-                            }
-                            if (cel == CtabColumns.Count + 1 && merge2 > 0 && IsVal2)
-                            {
-                                sheet.AddMergedRegion(new CellRangeAddress(2, 2, cel - merge2 - 1, cel - 1));
-                                merge2 = 0; IsVal2 = false;
-                            }
-                        }
-                    }
-                    foreach (var item in head.Cells)
-                    {
-                        item.CellStyle = headCellStyle;
-                    }
-                    foreach (var item in head2.Cells)
-                    {
-                        item.CellStyle = headCellStyle;
-                    }
-                    foreach (var item in head3.Cells)
-                    {
-                        item.CellStyle = headCellStyle;
-                    }
-                    int rowNumber = 4;
-                    var confData = devOpeAccountList.Select(t => t.C_Content).ToList();
-                    for (int i = 0; i < confData.Count; i++)
-                    {
-                        IRow content = sheet.CreateRow(rowNumber);
-                        Dictionary<string, object> dict = JsonConvert.DeserializeObject<Dictionary<string, object>>(confData[i]);
-                        int forCount = dict.Count + 1;
-                        if (tabs.Count() > dict.Count) { forCount = tabs.Count() + 1; }
-                        for (int j = 0; j < forCount; j++)
-                        {
-                            if (j < tabs.Count)
+                            foreach (var item in content.Cells)
                             {
-                                string celVal = "";
-                                if (dict.ContainsKey(tabs[j].Name))
-                                {
-                                    celVal = dict[tabs[j].Name]?.ToString();
-                                }
-                                if (tabs[j].Name == "RunWhetherNormal")
-                                {
-                                    celVal = celVal.ToLower() == "true" ? "异常" : "正常";
-                                    content.CreateCell(j).SetCellValue(celVal);
-                                }
-                                else if (tabs[j].Name == "Date")
-                                {
-                                    content.CreateCell(j).SetCellValue(Convert.ToDateTime(celVal).ToString("yyyy-MM-dd"));
-                                }
-                                else if (DateTime.TryParse(celVal, out DateTime dt) && celVal.Length >= 10)
-                                {
-                                    content.CreateCell(j).SetCellValue(dt.ToString("yyyy-MM-dd HH:mm:ss"));
-                                }
-                                else
-                                {
-                                    content.CreateCell(j).SetCellValue(celVal);
-                                }
+                                item.CellStyle = rowCellStyle;
                             }
+                            rowNumber++;
                         }
-                        foreach (var item in content.Cells)
+
+                        sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, tabs.Count - 1));
+                        for (int i = 0; i <= tabs.Count; i++)
                         {
-                            item.CellStyle = rowCellStyle;
+                            sheet.SetColumnWidth(i, 5000);
                         }
-                        rowNumber++;
                     }
-
-                    sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, tabs.Count - 1));
-                    for (int i = 0; i <= tabs.Count; i++)
+                    else
                     {
-                        sheet.SetColumnWidth(i, 5000);
+                        IRow content1 = sheet.CreateRow(1);
+                        content1.CreateCell(0).SetCellValue("获取数据失败,没有选择台账配置!");
+                        content1.Cells[0].CellStyle = headCellStyle;
+                        sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 1, 0, 15));
+                        sheet.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, 15));
                     }
                 }
                 using (var stream = new NpoiMemoryStream())

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


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


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/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


+ 2 - 0
Ropin.Inspection.Common/Helper/ChineseAndEnglishHelper.cs

@@ -24,6 +24,8 @@ namespace Ropin.Inspection.Common.Helper
                 case "运行状况@结束时间": str = "RunEndTime"; break;
                 case "运行状况是否正常":
                 case "运行状况@是否正常": str = "RunWhetherNormal"; break;
+                case "运行状况@排放时间":
+                case "运行状况@排放时间(h)":
                 case "排放时间":
                 case "排放时间(h)": str = "DischargeTime"; break;
                 case "耗材情况名称":

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


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/obj/Debug/net5.0/Ropin.Inspection.Model.csproj.AssemblyReference.cache


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


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


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


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


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


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


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


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


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