diff --git a/WebContent/WEB-INF/templates/sch1.ftl b/WebContent/WEB-INF/templates/sch1.ftl
index d1c8b12ae4232214091c78bc7c7afc4bf01ff1c5..da0d6bf583ff355602a70df3ba5c38d8648ae2c7 100644
--- a/WebContent/WEB-INF/templates/sch1.ftl
+++ b/WebContent/WEB-INF/templates/sch1.ftl
@@ -1148,7 +1148,7 @@
-${coursemode.score}/${coursemode.time}
+${coursemode.score}/${coursemode.hour}(${coursemode.dispersehour})/${coursemode.week}(${coursemode.disperseweek})周
@@ -1207,7 +1207,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -1390,7 +1390,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -1539,7 +1539,7 @@
-${coursemode.score}/${coursemode.time}
+${coursemode.score}/${coursemode.hour}/${coursemode.week}周
@@ -1598,7 +1598,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -1782,7 +1782,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -1949,7 +1949,7 @@
-${coursemode.score}/${coursemode.time}
+${coursemode.score}/${coursemode.hour}/${coursemode.week}周
@@ -2006,7 +2006,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -2190,7 +2190,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -2342,7 +2342,7 @@
-${coursemode.score}/${coursemode.time}
+${coursemode.score}/${coursemode.hour}/${coursemode.week}周
@@ -2399,7 +2399,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -2581,7 +2581,7 @@
-${course.score}/${course.time}/${course.semester}
+${course.score}/${course.hour}/${course.semester}
@@ -2681,7 +2681,7 @@
-${total_coursetype_compulsory_theoretical_score}/${total_coursetype_compulsory_theoretical_time+total_coursetype_compulsory_experiement_time} ${total_coursetype_compulsory_practice_score}/${total_coursetype_compulsory_practice_time}
+${total_coursetype_compulsory_theoretical_score}学分/${total_coursetype_compulsory_theoretical_hour+total_coursetype_compulsory_experiement_hour}(${total_coursetype_compulsory_disperse_theoretical_hour+total_coursetype_compulsory_disperse_experiement_hour})学时/${total_coursetype_compulsory_theoretical_week + total_coursetype_compulsory_experiement_week}(${total_coursetype_compulsory_disperse_theoretical_week + total_coursetype_compulsory_disperse_experiement_week})周 ${total_coursetype_compulsory_practice_score}学分/${total_coursetype_compulsory_practice_hour}(${total_coursetype_compulsory_disperse_practice_hour})学时/${total_coursetype_compulsory_practice_week}(${total_coursetype_compulsory_disperse_practice_week})周
@@ -2751,7 +2751,7 @@
-${total_coursemode_elective_theoretical_score}/${total_coursetype_elective_theoretical_time + total_coursetype_elective_experiement_time} ${total_coursemode_elective_practice_score}/${total_coursetype_elective_practice_time}
+${total_coursemode_elective_theoretical_score}学分/${total_coursetype_elective_theoretical_hour + total_coursetype_elective_experiement_hour}(${total_coursetype_elective_disperse_theoretical_hour + total_coursetype_elective_disperse_experiement_hour})学时/${total_coursetype_elective_theoretical_week + total_coursetype_elective_experiement_week}(${total_coursetype_elective_disperse_experiement_hour + total_coursetype_elective_disperse_experiement_week})周 ${total_coursemode_elective_practice_score}学分/${total_coursetype_elective_practice_hour}(${total_coursetype_elective_disperse_practice_hour})学时${total_coursetype_elective_practice_week}(${total_coursetype_elective_disperse_practice_week})周
@@ -2841,7 +2841,7 @@
-${totaltheoreticalscore + totalpracticescore}/${totaltheoreticaltime + totalexperiementtime + totalpracticetime} ${totaltheoreticalscore}/${totaltheoreticaltime + totalexperiementtime} ${totalpracticescore}/${totalpracticetime}
+${totaltheoreticalscore + totalpracticescore}学分/${totaltheoreticalhour + totalexperiementhour + totalpracticehour}(${totaltheoreticaldispersehour + totalexperiementdispersehour + totalpracticedispersehour})学时/${totaltheoreticalweek + totalexperiementweek + totalpracticeweek}(${totaltheoreticaldisperseweek + totalexperiementdisperseweek + totalpracticedisperseweek})周 ${totaltheoreticalscore}学分/${totaltheoreticalhour + totalexperiementhour}(${totaltheoreticaldispersehour + totalexperiementdispersehour})学时 ${totalpracticescore}学分/${totalpracticehour}(${totalpracticedispersehour})学时/${totalpracticeweek}/(${totalpracticedisperseweek})周
diff --git a/WebContent/generatorConfig.xml b/WebContent/generatorConfig.xml
index 6f9e60b2d395405307ecbcf7aa05ecbad4f2e04d..607fa85cc3c66bf05f8ca19892510e18f537eee3 100644
--- a/WebContent/generatorConfig.xml
+++ b/WebContent/generatorConfig.xml
@@ -100,7 +100,7 @@
-->
-
+
diff --git a/WebContent/jsp/QueryCurriculums.jsp b/WebContent/jsp/QueryCurriculums.jsp
index fde79c4f1de737fc46f25a419ba92be2269ddf1d..d1681a6251db153cdcdd8db6a16303d3f0fc5813 100644
--- a/WebContent/jsp/QueryCurriculums.jsp
+++ b/WebContent/jsp/QueryCurriculums.jsp
@@ -39,8 +39,14 @@
set_dnd();
set_editable();
+
+ init();
})
+ function init(){
+
+ }
+
var dragSrcEl = null;
var $dragSrcEl = null;
var dragSrcTBODY = null;
@@ -145,35 +151,101 @@
}
function compute_total($whichbody){
- var total = new Array()
+ var total = new Array();
+ var total_disperse = 0;//小计分散
+ var theoretical_disperse = 0;//小计理论分散
+ var experiment_disperse = 0;//小计实验分散
+ var total_hpw = 0;//每周学时数
+ var total_week = 0;//总周
+ var total_week_disperse = 0;//总分散周
+
var $dest_trs = $whichbody.children('tr');
//var $dest_trs_avaliable = $(":checkbox:checked").closest("tr");
- var $dest_trs_avaliable =$whichbody.find(":checkbox:checked").closest("tr");
+ var $dest_trs_avaliable = $whichbody.find("input[class='available']:checked").closest("tr");
+ var $dest_trs_disperse = $whichbody.find("input[class='disperse']:checked").closest("tr");
- //初始化小计的数量
- for(var i = 0; i < 20 ; i++){
- total[i] = 0;
+ //设置分散的括号==============================================
+ for(var i = 0;i < $dest_trs.length; i++){//所有行,先清除分散括号
+ $dest_tds = $($dest_trs[i]).children();
+
+ for(var j = 4 ; j <= 8; j++){
+ str = $($dest_tds[j]).text();
+ var s = str.replace("(","");
+ s = s.replace(")","");
+
+ $($dest_tds[j]).text(s);
+ }
}
- //先根据理论学时 + 实验学时 计算机总学时
+ //先根据理论学时 + 实验学时 计算总学时
for(var i = 0;i < $dest_trs.length; i++){//所有行
var $dest_tds = $($dest_trs[i]).children();
- if(i < $dest_trs.length - 1){//前面的行
+ if(i < $dest_trs.length - 1){//前面的行 除了最后一行小计
+ //计算出总学时(理论学时+实验学时)
$dest_tds[4].innerHTML = parseInt($dest_tds[5].innerHTML) + parseInt($dest_tds[6].innerHTML); + "";
}
}
- //计算开课的小计
+ for(var j = 0;j < $dest_trs.length; j++){//所有分散课
+ var $dest__tds = $($dest_trs[j]).children();
+ if($($dest__tds[12]).text() == '1'){//如果单位为周
+ $($dest__tds[7]).text($dest__tds[4].innerHTML);
+ }else{//单位为学时
+
+ }
+ }
+
+ //===========================================================
+ //初始化小计的数量
+ for(var i = 0; i < 20 ; i++){
+ total[i] = 0;
+ }
+
+ //计算开课、分散的小计
var $dest_tds = undefined;
- for(var i = 0;i < $dest_trs_avaliable.length; i++){//所有行
- $dest_tds = $($dest_trs_avaliable[i]).children();
-
- for(var j = 0; j < $dest_tds.length ; j ++ ){
- if(j >= 3 && j <= 7){
- total[j] += parseInt($dest_tds[j].innerHTML);
+ for(var i = 0;i < $dest_trs_avaliable.length; i++){//所有开课行
+ for(var j = 0;j < $dest_trs_disperse.length; j++){//所有分散课
+ if($dest_trs_avaliable[i] == $dest_trs_disperse[j]){//开课,并分散进行
+ var $dest_disperse_tds = $($dest_trs_disperse[j]).children();
+ total_disperse += parseInt($($dest_disperse_tds[4]).text());
+ theoretical_disperse += parseInt($($dest_disperse_tds[5]).text());
+ experiment_disperse += parseInt($($dest_disperse_tds[6]).text());
+
+ if($($dest_disperse_tds[12]).text() == '1'){//如果单位为周
+ total_week_disperse += (parseFloat($($dest_disperse_tds[7]).text()));//总分散周数
+ }
+
+ }
+ }
+ }
+ //计算开课、未分散的小计
+ for(var i = 0;i < $dest_trs_avaliable.length; i++){//所有开课行
+ var found_same = false;
+ for(var j = 0;j < $dest_trs_disperse.length; j++){//所有分散课
+ if($dest_trs_avaliable[i] == $dest_trs_disperse[j]){//开课,并分散进行
+ found_same = true;
+ break;
+ }
+ }
+ //所有开课,计算学分学时
+ $dest_tdss = $($dest_trs_avaliable[i]).children();
+ //没有找到相同的,计算
+ if(!found_same){
+ for(var k = 0; k < $dest_tdss.length ; k ++ ){
+ if(k >= 3 && k < 7){
+ total[k] += parseInt($dest_tdss[k].innerHTML);
+ }
+ }
+
+ if($($dest_tdss[12]).text() == '1'){//如果单位为周
+ total_week += (parseFloat($($dest_tdss[7]).text()));//总周数
+ }else{
+ total[7] += parseInt($dest_tdss[7].innerHTML)
}
+
}
+
}
//设置小计的内容
@@ -181,6 +253,61 @@
for(var j = 0; j < $dest_tds.length ; j ++ ){
if(j >= 3 && j <= 7){
$dest_tds[j].innerHTML = total[j] + "";
+ if(j == 4){//总学时数
+ if(total_disperse > 0){
+ $dest_tds[j].innerHTML = $dest_tds[j].innerHTML + "(" + total_disperse + ")";
+ }
+ }
+
+ if(j == 5){//总理论学时数
+ if(total_disperse > 0){
+ $dest_tds[j].innerHTML = $dest_tds[j].innerHTML + "(" + theoretical_disperse + ")";
+ }
+ }
+
+ if(j == 6){//总实验学时数
+ if(total_disperse > 0){
+ $dest_tds[j].innerHTML = $dest_tds[j].innerHTML + "(" + experiment_disperse + ")";
+ }
+ }
+
+ if(j == 7){//周学时
+ if(total_week > 0 || total_week_disperse > 0){
+ $dest_tds[7].innerHTML += "/";
+ }
+
+ if(total_week > 0){
+ $dest_tds[7].innerHTML += total_week;
+ }
+
+ if(total_week_disperse > 0){
+ $dest_tds[7].innerHTML += "(" + total_week_disperse + ")";
+ }
+
+ if(total_week > 0 || total_week_disperse > 0){
+ $dest_tds[7].innerHTML += "周";
+ }
+ }
+ }
+ }
+
+ //对于分散的课学时,加上括号表示
+ for(var i = 0 ; i < $dest_trs_disperse.length; i++){//
+ var $dest_disperse_tds = $($dest_trs_disperse[i]).children();
+ for(var j = 4 ; j <= 6; j++){
+ $dest_disperse_tds[j].innerHTML = "(" + $dest_disperse_tds[j].innerHTML + ")";
+ }
+
+ if($($dest_disperse_tds[12]).text() == '1'){//如果单位为周
+ $($dest_disperse_tds[7]).text("(" + $($dest_disperse_tds[7]).text() + ")" +"周");
+ }
+ }
+ //单位为周的,加上单位
+ for(var i = 0 ; i < $dest_trs.length - 1; i++){//
+ var $tds = $($dest_trs[i]).children();
+
+ if($($tds[12]).text() == '1'){//如果单位为周
+ $($tds[7]).text($($tds[4]).text() +"周");
}
}
@@ -261,6 +388,7 @@
obj['hpw'] = parseInt($(tds[7]).text());
obj['sort'] = 0;
obj['available'] = tds[10].firstChild.checked;
+ obj['disperse'] = tds[11].firstChild.checked;
//
curriculums.push(obj);
}
@@ -346,7 +474,9 @@
0 |
1 |
17 |
- |
+ |
+ |
+ ${course.unit} |
@@ -394,6 +524,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -409,10 +540,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -427,6 +563,7 @@
---- |
---- |
---- |
+ ---- |
@@ -449,6 +586,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -464,10 +602,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -482,6 +625,7 @@
---- |
---- |
---- |
+ ---- |
@@ -505,6 +649,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -520,10 +665,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -538,6 +688,7 @@
---- |
---- |
---- |
+ ---- |
@@ -561,6 +712,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -576,10 +728,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -594,6 +751,7 @@
---- |
---- |
---- |
+ ---- |
@@ -615,6 +773,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -630,10 +789,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -648,6 +812,7 @@
---- |
---- |
---- |
+ ---- |
@@ -667,6 +832,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -682,10 +848,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -700,6 +871,7 @@
---- |
---- |
---- |
+ ---- |
@@ -719,6 +891,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -734,10 +907,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -752,6 +930,7 @@
---- |
---- |
---- |
+ ---- |
@@ -771,6 +950,7 @@
起始周 |
结束周 |
开课 |
+ 分散 |
@@ -786,10 +966,15 @@
${curriculum.hpw } |
${curriculum.start } |
${curriculum.end } |
- checked="checked"
onclick="checkboxOnclick(this);" />
- |
+
+ checked="checked"
+ onclick="checkboxOnclick(this);" />
+ |
+ ${curriculum.unit} |
@@ -804,6 +989,7 @@
---- |
---- |
---- |
+ ---- |
diff --git a/WebContent/jsp/QueryCurriculums2.jsp b/WebContent/jsp/QueryCurriculums2.jsp
new file mode 100644
index 0000000000000000000000000000000000000000..67031805ff620a7fbd3f455ac6268aa041abb428
--- /dev/null
+++ b/WebContent/jsp/QueryCurriculums2.jsp
@@ -0,0 +1,885 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
+<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+
+
+
+
+
+
+ 实施进程表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/classes/cn/edu/hrbcu/curriculum/controller/CurriculumController.class b/build/classes/cn/edu/hrbcu/curriculum/controller/CurriculumController.class
index ec43fe519f13fef1727ff91beb4ec1378fdc274c..9db0881e5082ea98a3dd72b74c476b3daf460022 100644
Binary files a/build/classes/cn/edu/hrbcu/curriculum/controller/CurriculumController.class and b/build/classes/cn/edu/hrbcu/curriculum/controller/CurriculumController.class differ
diff --git a/build/classes/cn/edu/hrbcu/curriculum/mapper/CurriculumMapper.xml b/build/classes/cn/edu/hrbcu/curriculum/mapper/CurriculumMapper.xml
index d677f7068e3901753cd41b92b6244612c9cea83f..489dff6b8c7f19276d0d323adc737ff58e79d50d 100644
--- a/build/classes/cn/edu/hrbcu/curriculum/mapper/CurriculumMapper.xml
+++ b/build/classes/cn/edu/hrbcu/curriculum/mapper/CurriculumMapper.xml
@@ -11,6 +11,7 @@
+
@@ -71,7 +72,7 @@
- id, specialityid, courseid, semester, start, end, hpw, sort, available
+ id, specialityid, courseid, semester, start, end, hpw, sort, available, disperse