修改时间分计算逻辑、把成绩详情组装成平台需要的list格式、配合调试
This commit is contained in:
parent
093db62b78
commit
25c4ac5241
Binary file not shown.
Binary file not shown.
|
@ -75,6 +75,7 @@ namespace RuralPower
|
|||
DataBase.user_fault_list = new List<DataService.Model.pow_user_fault>();
|
||||
DataBase.achievement_list = new List<DataService.Model.pow_achievement>();
|
||||
DataBase.achievement_details_list = new List<DataService.Model.pow_achievement_details>();
|
||||
DataBase.user_fault_record_list = new List<DataService.Model.pow_user_fault_record>();
|
||||
DataBase.path = Path;
|
||||
if (DataBase.user_list.Where(a => a.user_id == UserId).Count() <= 0)
|
||||
{
|
||||
|
@ -607,20 +608,20 @@ namespace RuralPower
|
|||
var user_exam_model = DataBase.user_exam_list.Where(a => a.ExamId == ExamId && a.UserId == UserId).FirstOrDefault();
|
||||
if (user_exam_model != null)
|
||||
{
|
||||
if (user_exam_model.Status == "已结束")
|
||||
{
|
||||
//if (user_exam_model.Status == "已结束")
|
||||
//{
|
||||
var model = new SGAnswer(lesson_plan_id, new List<SGAnswerInfo>());
|
||||
var answer_info = new List<SGAnswerInfo>();
|
||||
var answer_info_model1 = new SGAnswerInfo("1", "巡检工器具", 3, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model2 = new SGAnswerInfo("2", "排故工器具", 3, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model3 = new SGAnswerInfo("3", "停电操作票", 5, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model4 = new SGAnswerInfo("4", "送电操作票", 5, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model5 = new SGAnswerInfo("5", "停电操作票步骤", 5, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model6 = new SGAnswerInfo("6", "送电操作票步骤", 5, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model7 = new SGAnswerInfo("7", "围栏", 2, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model8 = new SGAnswerInfo("8", "验电", 2, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model9 = new SGAnswerInfo("9", "时间分", 5, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model10 = new SGAnswerInfo("10", "缺陷查找、缺陷处理、缺陷分类分值", 65, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model1 = new SGAnswerInfo("1", "巡检工器具", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model2 = new SGAnswerInfo("2", "排故工器具", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model3 = new SGAnswerInfo("3", "停电操作票", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model4 = new SGAnswerInfo("4", "送电操作票", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model5 = new SGAnswerInfo("5", "停电操作票步骤", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model6 = new SGAnswerInfo("6", "送电操作票步骤", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model7 = new SGAnswerInfo("7", "围栏", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model8 = new SGAnswerInfo("8", "验电", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model9 = new SGAnswerInfo("9", "时间分", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model10 = new SGAnswerInfo("10", "缺陷查找、缺陷处理、缺陷分类分值", 0, 0, 0, "", new List<SGStep>());
|
||||
var answer_info_model11 = new SGAnswerInfo("11", "其它扣分项", 0, 0, 0, "", new List<SGStep>());
|
||||
|
||||
var data = DataBase.achievement_details_list.Where(a => a.AchievementId == achievement_model.AchievementId).OrderBy(a => a.CreateTime).ToList();
|
||||
|
@ -630,6 +631,7 @@ namespace RuralPower
|
|||
var line_tool_model = data.Where(a => a.Type == "巡线工器具").FirstOrDefault();
|
||||
if (line_tool_model != null)
|
||||
{
|
||||
answer_info_model1.AutoScore = double.Parse(line_tool_model.ItemizedScore.ToString());
|
||||
var tool_model = new SGStep(line_tool_model.ItemName, double.Parse(line_tool_model.TotalScore.ToString()), double.Parse(line_tool_model.ItemizedScore.ToString()));
|
||||
all_line_tool_list.Add(tool_model);
|
||||
}
|
||||
|
@ -667,6 +669,7 @@ namespace RuralPower
|
|||
var trouble_tool_model = data.Where(a => a.Type == "排故工器具").FirstOrDefault();
|
||||
if (trouble_tool_model != null)
|
||||
{
|
||||
answer_info_model2.AutoScore = double.Parse(trouble_tool_model.ItemizedScore.ToString());
|
||||
var tool_model = new SGStep(trouble_tool_model.ItemName, double.Parse(trouble_tool_model.TotalScore.ToString()), double.Parse(trouble_tool_model.ItemizedScore.ToString()));
|
||||
all_trouble_tool_list.Add(tool_model);
|
||||
}
|
||||
|
@ -701,6 +704,7 @@ namespace RuralPower
|
|||
var power_failure_model = data.Where(a => a.Type == "停电操作票").FirstOrDefault();
|
||||
if (power_failure_model != null)
|
||||
{
|
||||
answer_info_model3.AutoScore = double.Parse(power_failure_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(power_failure_model.ItemName, double.Parse(power_failure_model.TotalScore.ToString()), double.Parse(power_failure_model.ItemizedScore.ToString()));
|
||||
answer_info_model3.StepArr = new List<SGStep>() { power_model };
|
||||
}
|
||||
|
@ -715,6 +719,7 @@ namespace RuralPower
|
|||
var power_transmission_model = data.Where(a => a.Type == "送电操作票").FirstOrDefault();
|
||||
if (power_transmission_model != null)
|
||||
{
|
||||
answer_info_model4.AutoScore = double.Parse(power_transmission_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(power_transmission_model.ItemName, double.Parse(power_transmission_model.TotalScore.ToString()), double.Parse(power_transmission_model.ItemizedScore.ToString()));
|
||||
answer_info_model4.StepArr = new List<SGStep>() { power_model };
|
||||
}
|
||||
|
@ -730,6 +735,7 @@ namespace RuralPower
|
|||
var power_failure_step_model = data.Where(a => a.Type == "停电操作票步骤").FirstOrDefault();
|
||||
if (power_failure_step_model != null)
|
||||
{
|
||||
answer_info_model5.AutoScore = double.Parse(power_failure_step_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(power_failure_step_model.ItemName, double.Parse(power_failure_step_model.TotalScore.ToString()), double.Parse(power_failure_step_model.ItemizedScore.ToString()));
|
||||
all_power_failure_step_list.Add(power_model);
|
||||
}
|
||||
|
@ -757,6 +763,7 @@ namespace RuralPower
|
|||
var power_transmission_step_model = data.Where(a => a.Type == "送电操作票步骤").FirstOrDefault();
|
||||
if (power_transmission_step_model != null)
|
||||
{
|
||||
answer_info_model6.AutoScore = double.Parse(power_transmission_step_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(power_transmission_step_model.ItemName, double.Parse(power_transmission_step_model.TotalScore.ToString()), double.Parse(power_transmission_step_model.ItemizedScore.ToString()));
|
||||
all_power_transmission_step_list.Add(power_model);
|
||||
}
|
||||
|
@ -782,6 +789,7 @@ namespace RuralPower
|
|||
var place_model = data.Where(a => a.Type == "围栏").FirstOrDefault();
|
||||
if (place_model != null)
|
||||
{
|
||||
answer_info_model7.AutoScore = double.Parse(place_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(place_model.ItemName, double.Parse(place_model.TotalScore.ToString()), double.Parse(place_model.ItemizedScore.ToString()));
|
||||
answer_info_model7.StepArr = new List<SGStep>() { power_model };
|
||||
}
|
||||
|
@ -796,6 +804,7 @@ namespace RuralPower
|
|||
var electricity_model = data.Where(a => a.Type == "验电").FirstOrDefault();
|
||||
if (electricity_model != null)
|
||||
{
|
||||
answer_info_model8.AutoScore = double.Parse(electricity_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(electricity_model.ItemName, double.Parse(electricity_model.TotalScore.ToString()), double.Parse(electricity_model.ItemizedScore.ToString()));
|
||||
answer_info_model8.StepArr = new List<SGStep>() { power_model };
|
||||
}
|
||||
|
@ -810,6 +819,7 @@ namespace RuralPower
|
|||
var time_model = data.Where(a => a.Type == "时间分").FirstOrDefault();
|
||||
if (time_model != null)
|
||||
{
|
||||
answer_info_model9.AutoScore = double.Parse(time_model.ItemizedScore.ToString());
|
||||
var power_model = new SGStep(time_model.ItemName, double.Parse(time_model.TotalScore.ToString()), double.Parse(time_model.ItemizedScore.ToString()));
|
||||
answer_info_model9.StepArr = new List<SGStep>() { power_model };
|
||||
}
|
||||
|
@ -866,6 +876,7 @@ namespace RuralPower
|
|||
}
|
||||
if (all_fault_list.Count() > 0)
|
||||
{
|
||||
answer_info_model10.AutoScore = all_fault_list.Sum(a => a.TotalScore);
|
||||
answer_info_model10.StepArr = all_fault_list;
|
||||
}
|
||||
#endregion
|
||||
|
@ -896,6 +907,7 @@ namespace RuralPower
|
|||
|
||||
if (other_step_list.Count() > 0)
|
||||
{
|
||||
answer_info_model11.AutoScore = other_step_list.Sum(a => a.TotalScore);
|
||||
answer_info_model11.StepArr = other_step_list;
|
||||
}
|
||||
#endregion
|
||||
|
@ -913,14 +925,10 @@ namespace RuralPower
|
|||
answer_info.Add(answer_info_model11);
|
||||
model.AnswerInfo = answer_info;
|
||||
list.Add(model);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
//ResponObject responObject = getPractiseInfo.UploadAnswer(practiseId, userId, answerList);
|
||||
//HttpPractiseService getPractiseInfo = new HttpPractiseService();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1347,7 +1355,7 @@ namespace RuralPower
|
|||
return Write(APICode.Fail, "考生考试已结束");
|
||||
}
|
||||
|
||||
var achievement_model = DataBase.achievement_list.Where(a => a.ExamId == model.ExamId && a.UserId == model.UserId).FirstOrDefault(); ;
|
||||
var achievement_model = DataBase.achievement_list.Where(a => a.ExamId == model.ExamId && a.UserId == model.UserId).FirstOrDefault();
|
||||
if (achievement_model == null)
|
||||
{
|
||||
return Write(APICode.Fail, "考生成绩数据不存在");
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
68ffea9b70775bcd7cf8666a9a194d531d27c259
|
||||
96d58f48116c07bc55adb5036638db9328555e7a
|
||||
|
|
|
@ -63,3 +63,48 @@ F:\项目\国网江苏农电竞赛后台项目\单机对接平台版本\GuoWangJ
|
|||
F:\项目\国网江苏农电竞赛后台项目\单机对接平台版本\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\bbffb84455914db5a5b7f046001dcf53.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\单机对接平台版本\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\ef303b8a22ba445a9fb2ac8b7e142c27.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\单机对接平台版本\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\f5170a2eebb74286ac12fc628578df2e.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\FaultTree.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\09cf8e9e438e433f8f6f4812f42b9d60.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\130325584e444fc99dc0bbe22ed10f54.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\2501023fa4cb4fd69953deddaa68d7bd.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\30f32e8463614c72831d4fc503664cd3.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\3a8ee214bf1c4b4e8341aa53c71e763f.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\494872614e334c8596dfc5f646fc2ff6.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\61391d97c4924e568221a2e5d5f97d95.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\67a9ee9420384ef0bac95d9dbcf63ee1.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\72598d78ecb640b4b97d6e60d72b36e7.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\a238b4cf0e974facaba6c189654ce7f0.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\b3537636ce954bc79e3c61b73d7a76d5.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\b93f0bfabce844fc924e968e70f5f81d.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\bbffb84455914db5a5b7f046001dcf53.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\ef303b8a22ba445a9fb2ac8b7e142c27.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Upload\Cable\2024-04-07\f5170a2eebb74286ac12fc628578df2e.jpg
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam_fault.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam_operation_ticket.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam_tool.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\line.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\platform_area.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\scene.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam1.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam2.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Json\exam3.json
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Test.exe.config
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Test.exe
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Test.pdb
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\RuralPower.dll
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\SGUnitySDK.dll
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\DataService.dll
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Newtonsoft.Json.dll
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\ICSharpCode.SharpZipLib.dll
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\RuralPower.pdb
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\RuralPower.dll.config
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\DataService.pdb
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\DataService.dll.config
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\bin\Debug\Newtonsoft.Json.xml
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.csproj.AssemblyReference.cache
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.csproj.SuggestedBindingRedirects.cache
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.csproj.CoreCompileInputs.cache
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.csproj.CopyComplete
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.exe
|
||||
F:\项目\国网江苏农电竞赛后台项目\GuoWangJingSai-Server\GuoWangJingSai-Server\Test\obj\Debug\Test.pdb
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue