Преглед на файлове

输出报告添加部分额外内容

liyang преди 3 месеца
родител
ревизия
a2ccc57721

+ 134 - 2
SimulationServer/Component/SJStaticCapacityComponent.cs

@@ -82,6 +82,45 @@ public class SJStaticCapacity
     public string 任务缓急情况 = string.Empty;
     //单机操作员人数
     public string 单机操作员人数 = string.Empty;
+
+    //最大飞行速度
+    public string 最大飞行速度 = string.Empty;
+    //最大航程
+    public string 最大航程 = string.Empty;
+    //设备种类与数量
+    public string 设备种类与数量 = string.Empty;
+    //设备可靠性
+    public string 设备可靠性 = string.Empty;
+    //信号覆盖范围
+    public string 信号覆盖范围 = string.Empty;
+    //导航精度
+    public string 导航精度 = string.Empty;
+    //紧急着陆能力
+    public string 紧急着陆能力 = string.Empty;
+    //抗风险能力
+    public string 抗风险能力 = string.Empty;
+    //资源利用效率
+    public string 资源利用效率 = string.Empty;
+    //航程利用率
+    public string 航程利用率 = string.Empty;
+    //燃油效率
+    public string 燃油效率 = string.Empty;
+    //存活率
+    public string 存活率 = string.Empty;
+    //环境适应性
+    public string 环境适应性 = string.Empty;
+    //固定翼飞机(空重等)
+    public string 固定翼飞机空重等 = string.Empty;
+    //直升机(发动机类型等)
+    public string 直升机发动机类型等 = string.Empty;
+    //无人机(翼展等)
+    public string 无人机翼展等 = string.Empty;
+    //直升机(旋翼总面积等)
+    public string 直升机旋翼总面积等 = string.Empty;
+    //固定翼飞机(最大起飞重量等)
+    public string 固定翼飞机最大起飞重量等 = string.Empty;
+    //无人机(空重等)
+    public string 无人机空重等 = string.Empty;
 }
 
 public class SJStaticCapacityComponent : Component
@@ -265,9 +304,33 @@ public class SJStaticCapacityComponent : Component
     public void FillData7(AircraftDB db,Dictionary<string, string> reportInfo)
     {
         var aircraft = GetParent<AircraftXCJJ>();
+
+        SJStaticCapacity.最大飞行速度 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.最大航程 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.设备种类与数量 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.设备可靠性 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.信号覆盖范围 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.导航精度 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.紧急着陆能力 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.抗风险能力 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.抗风险能力 = db.fzdss == null ? "0" : db.fzdss.ToString();
+
         SJStaticCapacity.准备时间 = reportInfo["准备时间"];
         SJStaticCapacity.到达时间 = reportInfo["到达时间"];
         SJStaticCapacity.任务周期时间 = reportInfo["任务周期时间"];
+
+        SJStaticCapacity.资源利用效率 = "1";
+        SJStaticCapacity.航程利用率 = (Convert.ToDouble(reportInfo["单机导航使用情况"]) / Convert.ToDouble(SJStaticCapacity.最大航程)).ToString();
+        SJStaticCapacity.燃油效率 = (Convert.ToDouble(reportInfo["单机导航使用情况"]) / Convert.ToDouble(reportInfo["单机总油耗"])).ToString(); // 公里数/耗油量(L)
+        SJStaticCapacity.存活率 = "1"; // ?
+        SJStaticCapacity.环境适应性 = "1"; // ?
+        SJStaticCapacity.固定翼飞机空重等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.直升机发动机类型等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.无人机翼展等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.直升机旋翼总面积等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.固定翼飞机最大起飞重量等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+        SJStaticCapacity.无人机空重等 = db.fzdss == null ? "0" : db.fzdss.ToString();
+
         SJStaticCapacity.执行任务飞机型号 = reportInfo["执行任务飞机型号"];
         SJStaticCapacity.执行任务飞机数量 = reportInfo["执行任务飞机数量"];
         SJStaticCapacity.单机飞行员人数 = reportInfo["单机飞行员人数"];
@@ -276,9 +339,9 @@ public class SJStaticCapacityComponent : Component
         SJStaticCapacity.单机重症监护护理人员人数 = reportInfo["单机重症监护护理人员人数"];
         SJStaticCapacity.单机地面保障人数 = reportInfo["单机地面保障人数"];
         SJStaticCapacity.单机总任务时长 = reportInfo["单机总任务时长"];
-        SJStaticCapacity.单机总油耗 = (FXJHGenerate.GetHoverFuelConsumptionRate(aircraft.FlightPlanEditor, 50) + FXJHGenerate.GetCruisingVelocity(aircraft.FlightPlanEditor, 50)).ToString();
+        SJStaticCapacity.单机总油耗 = reportInfo["单机总油耗"]; //(FXJHGenerate.GetHoverFuelConsumptionRate(aircraft.FlightPlanEditor, 50) + FXJHGenerate.GetCruisingVelocity(aircraft.FlightPlanEditor, 50)).ToString();
         SJStaticCapacity.单机机场使用情况 = reportInfo["单机机场使用情况"];
-        SJStaticCapacity.单机导航使用情况 = "";
+        SJStaticCapacity.单机导航使用情况 = reportInfo["单机导航使用情况"];
         SJStaticCapacity.医疗任务设备 = reportInfo["医疗任务设备"];
         SJStaticCapacity.医疗药品 = reportInfo["医疗药品"];
         SJStaticCapacity.任务缓急情况 = reportInfo["任务缓急情况"];
@@ -329,9 +392,32 @@ public class SJStaticCapacityComponent : Component
         Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
         report["静态能力"] = new Dictionary<string, string>
         {
+            { "最大飞行速度", SJStaticCapacity.最大飞行速度.ToString() },
+            { "最大航程", SJStaticCapacity.最大航程.ToString() },
+            { "设备种类与数量", SJStaticCapacity.设备种类与数量.ToString() },
+            { "设备可靠性", SJStaticCapacity.设备可靠性.ToString() },
+            { "信号覆盖范围", SJStaticCapacity.信号覆盖范围.ToString() },
+            { "导航精度", SJStaticCapacity.导航精度.ToString() },
+            { "紧急着陆能力", SJStaticCapacity.紧急着陆能力.ToString() },
+            { "抗风险能力", SJStaticCapacity.抗风险能力.ToString() },
+
             { "准备时间/s", SJStaticCapacity.准备时间.ToString() },
             { "到达时间/s", SJStaticCapacity.到达时间.ToString() },
             { "任务周期时间/s", SJStaticCapacity.任务周期时间.ToString() },
+
+            { "资源利用效率", SJStaticCapacity.资源利用效率.ToString() },
+            { "航程利用率", SJStaticCapacity.航程利用率.ToString() },
+            { "燃油效率", SJStaticCapacity.燃油效率.ToString() },
+            { "存活率", SJStaticCapacity.存活率.ToString() },
+            { "环境适应性", SJStaticCapacity.环境适应性.ToString() },
+
+            { "固定翼飞机空重等", SJStaticCapacity.固定翼飞机空重等.ToString() },
+            { "直升机发动机类型等", SJStaticCapacity.直升机发动机类型等.ToString() },
+            { "无人机翼展等", SJStaticCapacity.无人机翼展等.ToString() },
+            { "直升机旋翼总面积等", SJStaticCapacity.直升机旋翼总面积等.ToString() },
+            { "固定翼飞机最大起飞重量等", SJStaticCapacity.固定翼飞机最大起飞重量等.ToString() },
+            { "无人机空重等", SJStaticCapacity.无人机空重等.ToString() },
+
             { "执行任务飞机型号", SJStaticCapacity.执行任务飞机型号.ToString() },
             { "执行任务飞机数量", SJStaticCapacity.执行任务飞机数量.ToString() },
             { "单机操作员人数", SJStaticCapacity.单机操作员人数.ToString() },
@@ -349,9 +435,32 @@ public class SJStaticCapacityComponent : Component
         Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
         report["静态能力"] = new Dictionary<string, string>
         {
+            { "最大飞行速度", SJStaticCapacity.最大飞行速度.ToString() },
+            { "最大航程", SJStaticCapacity.最大航程.ToString() },
+            { "设备种类与数量", SJStaticCapacity.设备种类与数量.ToString() },
+            { "设备可靠性", SJStaticCapacity.设备可靠性.ToString() },
+            { "信号覆盖范围", SJStaticCapacity.信号覆盖范围.ToString() },
+            { "导航精度", SJStaticCapacity.导航精度.ToString() },
+            { "紧急着陆能力", SJStaticCapacity.紧急着陆能力.ToString() },
+            { "抗风险能力", SJStaticCapacity.抗风险能力.ToString() },
+
             { "准备时间/s", SJStaticCapacity.准备时间.ToString() },
             { "到达时间/s", SJStaticCapacity.到达时间.ToString() },
             { "任务周期时间/s", SJStaticCapacity.任务周期时间.ToString() },
+
+            { "资源利用效率", SJStaticCapacity.资源利用效率.ToString() },
+            { "航程利用率", SJStaticCapacity.航程利用率.ToString() },
+            { "燃油效率", SJStaticCapacity.燃油效率.ToString() },
+            { "存活率", SJStaticCapacity.存活率.ToString() },
+            { "环境适应性", SJStaticCapacity.环境适应性.ToString() },
+
+            { "固定翼飞机空重等", SJStaticCapacity.固定翼飞机空重等.ToString() },
+            { "直升机发动机类型等", SJStaticCapacity.直升机发动机类型等.ToString() },
+            { "无人机翼展等", SJStaticCapacity.无人机翼展等.ToString() },
+            { "直升机旋翼总面积等", SJStaticCapacity.直升机旋翼总面积等.ToString() },
+            { "固定翼飞机最大起飞重量等", SJStaticCapacity.固定翼飞机最大起飞重量等.ToString() },
+            { "无人机空重等", SJStaticCapacity.无人机空重等.ToString() },
+
             { "执行任务飞机型号", SJStaticCapacity.执行任务飞机型号.ToString() },
             { "执行任务飞机数量", SJStaticCapacity.执行任务飞机数量.ToString() },
             { "单机飞行员人数", SJStaticCapacity.单机飞行员人数.ToString() },
@@ -375,9 +484,32 @@ public class SJStaticCapacityComponent : Component
         Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
         report["静态能力"] = new Dictionary<string, string>
         {
+            { "最大飞行速度", SJStaticCapacity.最大飞行速度.ToString() },
+            { "最大航程", SJStaticCapacity.最大航程.ToString() },
+            { "设备种类与数量", SJStaticCapacity.设备种类与数量.ToString() },
+            { "设备可靠性", SJStaticCapacity.设备可靠性.ToString() },
+            { "信号覆盖范围", SJStaticCapacity.信号覆盖范围.ToString() },
+            { "导航精度", SJStaticCapacity.导航精度.ToString() },
+            { "紧急着陆能力", SJStaticCapacity.紧急着陆能力.ToString() },
+            { "抗风险能力", SJStaticCapacity.抗风险能力.ToString() },
+
             { "准备时间/s", SJStaticCapacity.准备时间.ToString() },
             { "到达时间/s", SJStaticCapacity.到达时间.ToString() },
             { "任务周期时间/s", SJStaticCapacity.任务周期时间.ToString() },
+
+            { "资源利用效率", SJStaticCapacity.资源利用效率.ToString() },
+            { "航程利用率", SJStaticCapacity.航程利用率.ToString() },
+            { "燃油效率", SJStaticCapacity.燃油效率.ToString() },
+            { "存活率", SJStaticCapacity.存活率.ToString() },
+            { "环境适应性", SJStaticCapacity.环境适应性.ToString() },
+
+            { "固定翼飞机空重等", SJStaticCapacity.固定翼飞机空重等.ToString() },
+            { "直升机发动机类型等", SJStaticCapacity.直升机发动机类型等.ToString() },
+            { "无人机翼展等", SJStaticCapacity.无人机翼展等.ToString() },
+            { "直升机旋翼总面积等", SJStaticCapacity.直升机旋翼总面积等.ToString() },
+            { "固定翼飞机最大起飞重量等", SJStaticCapacity.固定翼飞机最大起飞重量等.ToString() },
+            { "无人机空重等", SJStaticCapacity.无人机空重等.ToString() },
+            
             { "执行任务飞机型号", SJStaticCapacity.执行任务飞机型号.ToString() },
             { "执行任务飞机数量", SJStaticCapacity.执行任务飞机数量.ToString() },
             { "单机飞行员人数", SJStaticCapacity.单机飞行员人数.ToString() },

+ 16 - 8
SimulationServer/Entity/AircraftXCJJ.cs

@@ -24,6 +24,8 @@ public class AircraftXCJJ : AircraftEntity
     public string device;
     public string medicine;
 
+    public string hospitalAirport;
+
 
     public override void End()
     {
@@ -47,7 +49,7 @@ public class AircraftXCJJ : AircraftEntity
         FlightPlanEditor.missionpoint.MissionPointLongitude = FlightPlanEditor.medicalTargetPoint[0].TargetPointLongitude;
         FlightPlanEditor.missionpoint.MissionPointHeight = FlightPlanEditor.medicalTargetPoint[0].TargetPointHeight;
 
-        Console.WriteLine("Latitude:" + FlightPlanEditor.missionpoint.MissionPointLatitude + "_" + "Longitude:" + FlightPlanEditor.missionpoint.MissionPointLongitude + "_" + "Height:" + FlightPlanEditor.missionpoint.MissionPointHeight);
+        //Console.WriteLine("Latitude:" + FlightPlanEditor.missionpoint.MissionPointLatitude + "_" + "Longitude:" + FlightPlanEditor.missionpoint.MissionPointLongitude + "_" + "Height:" + FlightPlanEditor.missionpoint.MissionPointHeight);
 
         int patientCount = FlightPlanEditor.medicalTargetPoint[0].TargetType.Count; // 伤患人数
         List<string> diseaseTypes = new List<string>();
@@ -57,6 +59,8 @@ public class AircraftXCJJ : AircraftEntity
         }
         int medicCount = taskParameter.doctorPersonnel + taskParameter.nursePersonnel + taskParameter.nurseSeverePersonnel;//taskParameter.MedicalStaffCount; // 医护人员数量  
 
+        //Console.WriteLine("medicCount:" + medicCount);
+
         // 交接时间为5分钟  
         double handoverTime = 5;
 
@@ -140,22 +144,26 @@ public class AircraftXCJJ : AircraftEntity
         Console.WriteLine("TotalTime:" + TotalTime);
 
         reportInfo.Add("准备时间", TaskReadyTime.ToString());
+
         double reachTime = 0;
         for (int i = 2; i < 4; i++)
         {
             reachTime += TurningPoints[i].SegmentFlightTime;
         }
-        reportInfo.Add("到达时间", TaskReadyTime.ToString());
+        reportInfo.Add("到达时间", TaskReadyTime.ToString()); // 基地 -> 目标点 ?
+
         reportInfo.Add("任务周期时间", TotalTime.ToString());
         reportInfo.Add("执行任务飞机型号", Name);
         reportInfo.Add("执行任务飞机数量", "1");
-        reportInfo.Add("单机飞行员人数", "1");
-        reportInfo.Add("单机医师人数", "1");
-        reportInfo.Add("单机护士人数", "1");
-        reportInfo.Add("单机重症监护护理人员人数", "0");
-        reportInfo.Add("单机地面保障人数", "1");
+        reportInfo.Add("单机飞行员人数", taskParameter.pilotPersonnel.ToString());
+        reportInfo.Add("单机医师人数", taskParameter.doctorPersonnel.ToString());
+        reportInfo.Add("单机护士人数", taskParameter.nursePersonnel.ToString());
+        reportInfo.Add("单机重症监护护理人员人数", taskParameter.nurseSeverePersonnel.ToString());
+        reportInfo.Add("单机地面保障人数", taskParameter.groundSupportPersonnel.ToString());
         reportInfo.Add("单机总任务时长", TotalTime.ToString());
-        reportInfo.Add("单机机场使用情况", Airport);
+        reportInfo.Add("单机总油耗", "60"); // ?
+        reportInfo.Add("单机机场使用情况", Airport + "\r\n" + hospitalAirport);
+        reportInfo.Add("单机导航使用情况", "1000"); //飞行总距离 ?
         for (int i = 0; i < load.Count; i++)
         {
             if (load[i].Split(":")[0].Contains("装备"))

+ 1 - 0
SimulationServer/EventHandler/CreateTaskEventHandler.cs

@@ -668,6 +668,7 @@ public class CreateLandSJEventHandler : AEvent<CreateLandSXTask>
                 {
                     aircraft.load.Add(aircraftParameter.taskLoad[j]);
                 }
+                aircraft.hospitalAirport = config.XCJJTask.missionInformation.Hospital;
                 var hospital = config.EditorConfig.hospitals.Find(t => t.BaseName == config.XCJJTask.missionInformation.Hospital);
                 aircraft.hospitalPoint = new MissionEndPoint()
                 {

+ 1 - 1
SimulationServer/Utils/DataTableExtensions.cs

@@ -94,7 +94,7 @@ public static class DataTableExtensions
                 var row = sheet.CreateRow(rowIndex);
                 row.CreateCell(0).SetCellValue(kv1.Key);
                 bool t = false;
-                if (kv1.Key == "医疗任务设备" || kv1.Key == "医疗药品")
+                if (kv1.Key == "医疗任务设备" || kv1.Key == "医疗药品" || kv1.Key == "单机机场使用情况")
                 {
                     //row.GetCell(0).CellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
                     CellUtil.SetCellStyleProperties(row.GetCell(0), new Dictionary<string, object> { { "verticalAlignment", NPOI.SS.UserModel.VerticalAlignment.Center } });

BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.dll


BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.exe


BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.pdb