@@ -0,0 +1,69 @@ | |||||
数字化智慧校园 | |||||
统一身份认证补充接口 | |||||
V1.0 | |||||
概述 | |||||
根据特定需求开发补充接口 | |||||
登录接口 | |||||
采用标准Http GET 请求发送用户名、密码到认证接口,接口实现用户名密码判定后返回标准json; | |||||
请求地址:http://10.30.0.10:8000/Login/CheckLoginForSSOBC | |||||
请求方式:发送标准Http GET请求到认证地址 | |||||
接口请求参数 | |||||
参数 | |||||
说明 | |||||
u | |||||
用户名 | |||||
p | |||||
密码 | |||||
认证接口返回参数 | |||||
参数 | |||||
说明 | |||||
code | |||||
状态码 返回200成功、其他失败 | |||||
info | |||||
状态消息 返回login success表示登录成功、其他失败 | |||||
data | |||||
保留 暂时无用 | |||||
登录成功后,认证服务器将在用户浏览器cookies中写入数字化智慧校园系统数据,第三方系统可直接跳转到http://10.30.0.10:8000/Home/Index 进入数字化智慧校园系统。 | |||||
退出登录接口 | |||||
第三方系统退出时,需要主动调用退出登录接口以同步数字化智慧校园系统退出状态。 | |||||
采用标准Http POST 请求,返回标准json; | |||||
请求地址:http://10.30.0.10:8000/Login/OutLoginForSSOBC | |||||
请求方式:发送标准Http POST请求到认证地址 | |||||
接口请求参数:无 | |||||
认证接口返回参数 | |||||
参数 | |||||
说明 | |||||
code | |||||
状态码 返回200成功、其他失败 | |||||
info | |||||
状态消息 返回logout success表示退出成功、其他失败 | |||||
data | |||||
保留 暂时无用 | |||||
@@ -149,6 +149,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
emItemEntity.ClassRoomName = olpoe.ClassRoomName; | emItemEntity.ClassRoomName = olpoe.ClassRoomName; | ||||
listElectiveMergeItemEntity.Add(emItemEntity); | listElectiveMergeItemEntity.Add(emItemEntity); | ||||
} | } | ||||
if (listElectiveMergeItemEntity.Select(m=>m.LessonSection.Substring(0,1)).Distinct().Count()>1) | |||||
{ | |||||
return Fail("合班失败!请确认所选课程是否为同一天课程。"); | |||||
} | |||||
electiveMergeIBLL.SaveEntity(null, emMergeEntity, listElectiveMergeItemEntity); | electiveMergeIBLL.SaveEntity(null, emMergeEntity, listElectiveMergeItemEntity); | ||||
return Success("合班成功!"); | return Success("合班成功!"); | ||||
} | } | ||||
@@ -183,8 +183,9 @@ var bootstrap = function ($, learun) { | |||||
formatter: function (cellvalue, row) { | formatter: function (cellvalue, row) { | ||||
if (cellvalue.indexOf(',') == -1) | if (cellvalue.indexOf(',') == -1) | ||||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | ||||
else | |||||
else { | |||||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | ||||
} | |||||
} | } | ||||
}, | }, | ||||
{ label: "上课时间", name: "LessonTime", width: 150, align: "left" }, | { label: "上课时间", name: "LessonTime", width: 150, align: "left" }, | ||||
@@ -26,21 +26,24 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
<div class="lr-layout-tool-item"> | |||||
选课要求:至少需要选择3门不同的课程 | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||||
<a id="lr_apply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名</a> | |||||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名</a> | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||||
<a id="lr_applyPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名(预)</a> | |||||
<a id="lr_cancelPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名(预)</a> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||||
<a id="lr_apply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名</a> | |||||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm btnBox" learun-authorize="yes"> | |||||
<a id="lr_applyPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 报名(预)</a> | |||||
<a id="lr_cancelPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消报名(预)</a> | |||||
</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -21,6 +21,9 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item"> | |||||
选课要求:至少需要选择3门不同的课程 | |||||
</div> | |||||
</div> | </div> | ||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
@@ -200,6 +200,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
foreach (var lessontime in item.paike.timeText.TrimEnd(',').Split(',')) | foreach (var lessontime in item.paike.timeText.TrimEnd(',').Split(',')) | ||||
{ | { | ||||
string tmplessontime = ""; | |||||
if (item.paike.section == "7") | |||||
{ | |||||
tmplessontime = "18:00-18:45"; | |||||
} | |||||
if (item.paike.section == "8") | |||||
{ | |||||
tmplessontime = "18:45-19:30"; | |||||
} | |||||
if (item.paike.section == "9") | |||||
{ | |||||
tmplessontime = "20:30-21:15"; | |||||
} | |||||
if (item.paike.section == "10") | |||||
{ | |||||
tmplessontime = "21:15-22:00"; | |||||
} | |||||
var insertData = new ArrangeLessonTermOfElectiveEntity | var insertData = new ArrangeLessonTermOfElectiveEntity | ||||
{ | { | ||||
Id = Guid.NewGuid().ToString(), | Id = Guid.NewGuid().ToString(), | ||||
@@ -210,7 +227,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
LessonNo = item.paike.curriculunNumber, | LessonNo = item.paike.curriculunNumber, | ||||
LessonName = item.paike.curriculunName, | LessonName = item.paike.curriculunName, | ||||
LessonSortNo = "2", | LessonSortNo = "2", | ||||
LessonTime = (item.paike.section == "7" ? "16:20-17:05" : "17:15-18:00"), | |||||
LessonTime = tmplessontime, | |||||
LessonSection = item.paike.week + item.paike.section, | LessonSection = item.paike.week + item.paike.section, | ||||
StudyScore = lessonData.FirstOrDefault(x => x.LessonNo == item.paike.curriculunNumber)?.StudyScore, | StudyScore = lessonData.FirstOrDefault(x => x.LessonNo == item.paike.curriculunNumber)?.StudyScore, | ||||
EmpNo = item.paike.teacherNumber, | EmpNo = item.paike.teacherNumber, | ||||
@@ -113,7 +113,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
db.BeginTrans(); | db.BeginTrans(); | ||||
var deldatalist = db.FindList<ElectiveMergeItemEntity>(m => m.EmId == keyValue).OrderBy(m=>m.LessonSection); | |||||
var deldatalist = db.FindList<ElectiveMergeItemEntity>(m => m.EmId == keyValue).OrderBy(m=>Convert.ToInt32(m.LessonSection)); | |||||
var deldatafirst = deldatalist.First(); | var deldatafirst = deldatalist.First(); | ||||
var deldatalast= deldatalist.Last(); | var deldatalast= deldatalist.Last(); | ||||
var opfirst = db.FindEntity<OpenLessonPlanOfElectiveEntity>(m => m.Id == deldatafirst.OLPOEId); | var opfirst = db.FindEntity<OpenLessonPlanOfElectiveEntity>(m => m.Id == deldatafirst.OLPOEId); | ||||
@@ -162,7 +162,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
db.Insert(electiveMergeItemEntity); | db.Insert(electiveMergeItemEntity); | ||||
var ids =string.Join(",",electiveMergeItemEntity.Select(n => n.OLPOEId)); | var ids =string.Join(",",electiveMergeItemEntity.Select(n => n.OLPOEId)); | ||||
var olplist = db.FindList<OpenLessonPlanOfElectiveEntity>(m => | var olplist = db.FindList<OpenLessonPlanOfElectiveEntity>(m => | ||||
ids.Contains(m.Id)).OrderBy(c=>c.LessonSection); | |||||
ids.Contains(m.Id)).OrderBy(c=>Convert.ToInt32(c.LessonSection)); | |||||
var opfirst = olplist.First(); | var opfirst = olplist.First(); | ||||
var oplast = olplist.Last(); | var oplast = olplist.Last(); | ||||
opfirst.LessonSection +=","+ oplast.LessonSection; | opfirst.LessonSection +=","+ oplast.LessonSection; | ||||
@@ -177,6 +177,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
//相同时间不能报名 | //相同时间不能报名 | ||||
return; | return; | ||||
} | } | ||||
//相同课程不能报名 | |||||
if (sslleListOfNow1.Where(x => x.LessonNo == olpeEntity.LessonNo).Any()) | |||||
{ | |||||
//相同课程不能报名 | |||||
return; | |||||
} | |||||
//新增报名数据 | //新增报名数据 | ||||
var model = new StuSelectLessonListOfElectiveEntity() | var model = new StuSelectLessonListOfElectiveEntity() | ||||
{ | { | ||||