@@ -385,10 +385,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue); | var StuEnrollData = stuEnrollIBLL.GetStuEnrollEntity(keyValue); | ||||
//获取中考成绩 | //获取中考成绩 | ||||
var MidExamScoreData = stuEnrollIBLL.GetMidExamScoreData(keyValue).OrderBy(x => x.sort); | var MidExamScoreData = stuEnrollIBLL.GetMidExamScoreData(keyValue).OrderBy(x => x.sort); | ||||
if (string.IsNullOrEmpty(StuEnrollData.CheckInUrl)) | if (string.IsNullOrEmpty(StuEnrollData.CheckInUrl)) | ||||
{ | { | ||||
StuEnrollData.CheckInUrl = Guid.NewGuid().ToString(); | StuEnrollData.CheckInUrl = Guid.NewGuid().ToString(); | ||||
} | } | ||||
if (string.IsNullOrEmpty(StuEnrollData.SubsidizeUrl)) | if (string.IsNullOrEmpty(StuEnrollData.SubsidizeUrl)) | ||||
{ | { | ||||
@@ -128,9 +128,10 @@ var bootstrap = function ($, learun) { | |||||
if (!!data.StuEnrollMidExamScore) { | if (!!data.StuEnrollMidExamScore) { | ||||
$.each(data.StuEnrollMidExamScore, | $.each(data.StuEnrollMidExamScore, | ||||
function (i, item) { | function (i, item) { | ||||
var score = item.score > 0 ? item.score : ''; | |||||
str += '<div class="col-xs-6 lr-form-item" data-table="StuEnrollMidExamScore">'; | str += '<div class="col-xs-6 lr-form-item" data-table="StuEnrollMidExamScore">'; | ||||
str += '<div class="lr-form-item-title">' + item.subjectName + '</div>'; | str += '<div class="lr-form-item-title">' + item.subjectName + '</div>'; | ||||
str += '<input id="' + item.Id + '" type="text" class="form-control SEMidExamScore" value="' + item.score + '" />'; | |||||
str += '<input id="' + item.Id + '" type="text" class="form-control SEMidExamScore" value="' + score + '" />'; | |||||
str += '</div>'; | str += '</div>'; | ||||
}); | }); | ||||
$('#scoreDiv').html(str); | $('#scoreDiv').html(str); | ||||
@@ -109,9 +109,10 @@ var bootstrap = function ($, learun) { | |||||
if (data.StuEnrollMidExamScore) { | if (data.StuEnrollMidExamScore) { | ||||
$.each(data.StuEnrollMidExamScore, | $.each(data.StuEnrollMidExamScore, | ||||
function (i, item) { | function (i, item) { | ||||
var score = item.score > 0 ? item.score : ''; | |||||
str += '<div class="col-xs-6 lr-form-item" data-table="StuEnrollMidExamScore">'; | str += '<div class="col-xs-6 lr-form-item" data-table="StuEnrollMidExamScore">'; | ||||
str += '<div class="lr-form-item-title">' + item.subjectName + '</div>'; | str += '<div class="lr-form-item-title">' + item.subjectName + '</div>'; | ||||
str += '<input id="' + item.Id + '" type="text" class="form-control SEMidExamScore" value="' + item.score + '" />'; | |||||
str += '<input id="' + item.Id + '" type="text" class="form-control SEMidExamScore" value="' + score + '" />'; | |||||
str += '</div>'; | str += '</div>'; | ||||
}); | }); | ||||
$('#scoreDiv').html(str); | $('#scoreDiv').html(str); | ||||
@@ -8024,6 +8024,7 @@ | |||||
<None Include="Properties\PublishProfiles\FolderProfile4.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile4.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile7.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\learunadms6.1.pubxml" /> | <None Include="Properties\PublishProfiles\learunadms6.1.pubxml" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -1949,7 +1949,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindList<StuEnrollMidExamScoreEntity>(x => x.StuEnrollId == keyValue); | |||||
var list = this.BaseRepository("CollegeMIS").FindList<StuEnrollMidExamScoreEntity>(x => x.StuEnrollId == keyValue).ToList(); | |||||
if (list == null || list.Count() <= 0) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS"); | |||||
db.BeginTrans(); | |||||
var dataItem = this.BaseRepository().FindList<DataItemDetailEntity>("select b.* from [dbo].[LR_Base_DataItem] a join [dbo].[LR_Base_DataItemDetail] b on a.f_itemid=b.f_itemid where a.F_ItemCode='MidTermSubject' and b.f_deletemark=0 and b.f_enabledmark=1").OrderBy(x => x.F_SortCode); | |||||
foreach (var data in dataItem) | |||||
{ | |||||
StuEnrollMidExamScoreEntity entity = new StuEnrollMidExamScoreEntity(); | |||||
entity.Create(); | |||||
entity.StuEnrollId = keyValue; | |||||
entity.subjectName = data.F_ItemName; | |||||
entity.subjectCode = data.F_ItemCode; | |||||
entity.sort = data.F_SortCode; | |||||
db.Insert(entity); | |||||
list.Add(entity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
return list; | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||