当不存在需要切题时,将 is_cutout 写为1
This commit is contained in:
parent
8d3f9db037
commit
9768e1d555
|
|
@ -36,7 +36,7 @@
|
|||
<ul class="xul">
|
||||
<li style="font-size: 18px; border: 1px solid #ddd;">序号:
|
||||
<label style="font-weight: bold; color: #f00; font-size: 30px;"><%=xuhao %></label>
|
||||
小题:<label><%=xiaoti %></label><br />
|
||||
<%--小题:--%><label style="display:none"><%=xiaoti %></label><br />
|
||||
分数:<label style="font-weight: bold; color: #f00; font-size: 30px;" id="oldScore"><%=fenshu %></label>
|
||||
阅卷跳分:<label><%=yuejuanfen %></label></li>
|
||||
</ul>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<div style="float: left; margin-top: 10px;">
|
||||
题号:<input type="text" id="zhuguan_tihao" style="width: 200px; font-size: 14px; height: 30px;" value="" placeholder="题号不能与原题号一致建议13.1" /><br />
|
||||
<br />
|
||||
小题:<input type="text" id="zhuguan_xiaoti" style="width: 80px; font-size: 14px; height: 30px;" value="0" placeholder="" />
|
||||
<%--小题:--%><input type="text" id="zhuguan_xiaoti" style="width: 80px; font-size: 14px; height: 30px; display:none;" value="0" placeholder="" />
|
||||
分数:
|
||||
<select id="zgquestionscroe" style="font-size: 14px; width: 80px; height: 30px; text-align: center;">
|
||||
<option value="">无分</option>
|
||||
|
|
@ -126,8 +126,9 @@
|
|||
}
|
||||
|
||||
if (confirm("拆题后,之前的数据将无法恢复,请谨慎使用")) {
|
||||
var totalScorew = $("#totalScorew").html();
|
||||
var oldScore = $("#oldScore").html();
|
||||
var totalScorew = $("#totalScorew").html() == '' ? 0 : parseFloat($("#totalScorew").html());
|
||||
var oldScore = $("#oldScore").html() == '' ? 0 : parseFloat($("#oldScore").html());
|
||||
|
||||
if (totalScorew != oldScore) {
|
||||
if (confirm("原始分数与拆解后分数不一致,是否继续?")) {
|
||||
|
||||
|
|
@ -211,8 +212,8 @@
|
|||
|
||||
var html = "<div class=\"boxscore\" id='box_" + zhuguan_tihao + "'>";
|
||||
html += "";
|
||||
html += "<label><b>号:" + zhuguan_tihao + "</b></label>";
|
||||
html += "<label>小题:" + zhuguan_xiaoti + "</label>";
|
||||
html += "<label><b>题号:" + zhuguan_tihao + "</b></label>";
|
||||
html += "<label style=\"display:none\">小题:" + zhuguan_xiaoti + "</label>";
|
||||
html += "<label>分数:<b class='scoreTotal'>" + score + "</b></label>";
|
||||
html += "<label>间隔:" + scoretype + "</label>";
|
||||
html += "<label>" + lineWhTx + "</label>";
|
||||
|
|
|
|||
|
|
@ -171,8 +171,15 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
ids += new MysqlDBHelper(tenant).ExecuteScalar(sql).ToString() + ",";
|
||||
}
|
||||
questionNumList = questionNumList.Trim('$');
|
||||
|
||||
int is_cutout = 0;
|
||||
if (Convert.ToInt32(new MysqlDBHelper(tenant).ExecuteScalar("SELECT COUNT(1) FROM `MK_ExamResult` where ExamSubjectId=" + exam_subject_id + " AND QuestionNumber_int='" + questionNum + "'")) <= 0)
|
||||
{
|
||||
is_cutout = 1;
|
||||
}
|
||||
|
||||
//写入任务表
|
||||
sql = "Insert Into mk_subjective_cut_record(temp_main_id,temp_detail_id,temp_question_num,is_cutout,exam_subject_id,temp_question_Newdata_ids,subjective_questions_data,cutted_question_num) VALUES(" + tempMainID + "," + TemDataID + ",'" + questionNum + "',0," + exam_subject_id + ",'" + ids.Trim(',') + "','" + zhuguantiList + "','" + questionNumList + "')";
|
||||
sql = "Insert Into mk_subjective_cut_record(temp_main_id,temp_detail_id,temp_question_num,is_cutout,exam_subject_id,temp_question_Newdata_ids,subjective_questions_data,cutted_question_num) VALUES(" + tempMainID + "," + TemDataID + ",'" + questionNum + "',"+ is_cutout + "," + exam_subject_id + ",'" + ids.Trim(',') + "','" + zhuguantiList + "','" + questionNumList + "')";
|
||||
new MysqlDBHelper(tenant).ExecuteNoQuery(sql, sp);
|
||||
|
||||
Response.Write("1");
|
||||
|
|
@ -205,15 +212,15 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
token = Globals.Request("token");
|
||||
if (action == 0)
|
||||
{
|
||||
string sql = "SELECT exam_subject_id,question_num FROM marking_setting_subjective WHERE id=" + subjective;
|
||||
DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||
if (dt.Rows.Count == 0)
|
||||
string sql = "SELECT exam_subject_id,question_num,score,score_interval FROM marking_setting_subjective WHERE id=" + subjective;
|
||||
DataTable dtSubSetting = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||
if (dtSubSetting.Rows.Count == 0)
|
||||
{
|
||||
Response.Write("<script>alert('无模板数据');window.close();</script>");
|
||||
return;
|
||||
}
|
||||
exam_subject_id = Convert.ToInt64(dt.Rows[0]["exam_subject_id"]);
|
||||
questionNum = dt.Rows[0]["question_num"].ToString();
|
||||
exam_subject_id = Convert.ToInt64(dtSubSetting.Rows[0]["exam_subject_id"]);
|
||||
questionNum = dtSubSetting.Rows[0]["question_num"].ToString();
|
||||
|
||||
sql = "SELECT template_id FROM exam_subject WHERE id=" + exam_subject_id;
|
||||
long template_id_main = Convert.ToInt64(new MysqlDBHelper(tenant).ExecuteScalar(sql));
|
||||
|
|
@ -223,7 +230,7 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
TempMainID = template_id_main.ToString();
|
||||
|
||||
sql = "SELECT ID_bigint,TempValue_nvarchar,TempPicture64_nvarchar FROM MK_TempleteData WHERE MainID_bigint=" + template_id_main;
|
||||
dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||
DataTable dt = new MysqlDBHelper(tenant).ExecuteQuery(sql);
|
||||
bool isHave = false;
|
||||
TempID = "";
|
||||
|
||||
|
|
@ -246,8 +253,8 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
QuestionTempValue = q;
|
||||
xuhao = questionNum;
|
||||
xiaoti = q.Split(',')[5];
|
||||
fenshu = q.Split(',')[6];
|
||||
yuejuanfen = q.Split(',')[8];
|
||||
fenshu = dtSubSetting.Rows[0]["score"].ToString();
|
||||
yuejuanfen = dtSubSetting.Rows[0]["score_interval"].ToString();
|
||||
isHave = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -293,9 +300,9 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
{
|
||||
UpdateData();
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
Response.Write("拆题失败");
|
||||
Response.Write("拆题失败" + ex);
|
||||
}
|
||||
|
||||
Response.End();
|
||||
|
|
@ -353,7 +360,7 @@ public partial class Temp_SplitQuestion : System.Web.UI.Page
|
|||
else if (Request.Url.Host.ToLower().Contains("localhost"))
|
||||
{
|
||||
// 开发地址
|
||||
url = "https://192.168.2.8:6500/";
|
||||
url = "http://192.168.2.8:6500/";
|
||||
}
|
||||
url += "api/marking-setting/sub/" + id + "/cut";
|
||||
WebRequest request = WebRequest.Create(url);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
border-radius: 5px;
|
||||
}
|
||||
.boxscore {
|
||||
width: 130px; margin-right:5px;
|
||||
width: 180px; margin-right:5px;
|
||||
font-size: 12px;
|
||||
border: 1px solid #ddd;
|
||||
height: 80px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue