|
@@ -1239,6 +1239,8 @@ public class MsPaperQtypeService {
|
1239
|
1239
|
} else {
|
1240
|
1240
|
que.setQtype(2);
|
1241
|
1241
|
}
|
|
1242
|
+ if(que.getScoreset() == null) que.setScoreset(0);
|
|
1243
|
+ if(que.getLoseoption() == null) que.setLoseoption(0.0);
|
1242
|
1244
|
}
|
1243
|
1245
|
msPaperQtypeQuestionMapper.insertList(qtypeQuestions);
|
1244
|
1246
|
|
|
@@ -1303,9 +1305,9 @@ public class MsPaperQtypeService {
|
1303
|
1305
|
// 保存题型
|
1304
|
1306
|
msPaperQtypeMapper.updateByPrimaryKeySelective(paperQtype);
|
1305
|
1307
|
// 删除题型下原有试题
|
1306
|
|
- msPaperQtypeQuestionMapper.deleteByMptid(paperQtype.getId());
|
|
1308
|
+ msPaperQtypeQuestionMapper.deleteByMptid(paperQtype.getMptid());
|
1307
|
1309
|
|
1308
|
|
- Integer mptid = paperQtype.getId();
|
|
1310
|
+ Integer mptid = paperQtype.getMptid();
|
1309
|
1311
|
List<MsPaperQtypeQuestion> qtypeQuestions = paperQtype.getQuestions();
|
1310
|
1312
|
for (MsPaperQtypeQuestion que : qtypeQuestions) {
|
1311
|
1313
|
que.setMptid(mptid);
|
|
@@ -1316,6 +1318,8 @@ public class MsPaperQtypeService {
|
1316
|
1318
|
} else {
|
1317
|
1319
|
que.setQtype(2);
|
1318
|
1320
|
}
|
|
1321
|
+ if(que.getScoreset() == null) que.setScoreset(0);
|
|
1322
|
+ if(que.getLoseoption() == null) que.setLoseoption(0.0);
|
1319
|
1323
|
}
|
1320
|
1324
|
msPaperQtypeQuestionMapper.insertList(qtypeQuestions);
|
1321
|
1325
|
|
|
@@ -1445,10 +1449,13 @@ public class MsPaperQtypeService {
|
1445
|
1449
|
movevalue = 1;// 在原来基础上加一
|
1446
|
1450
|
bmovevalue = -1;
|
1447
|
1451
|
}
|
1448
|
|
- params.setMovevalue(1);
|
|
1452
|
+ params.setMovevalue(movevalue);
|
1449
|
1453
|
moveQtype.setMptorder(movevalue);
|
1450
|
1454
|
// 被交换位置的试题
|
1451
|
1455
|
MsPaperQtype qtype = msPaperQtypeMapper.getQtypeForMoverOrder(params);
|
|
1456
|
+ if(qtype == null){
|
|
1457
|
+ throw new RuntimeException("请检查移动是否合理");
|
|
1458
|
+ }
|
1452
|
1459
|
qtype.setMptorder(bmovevalue);
|
1453
|
1460
|
|
1454
|
1461
|
List<MsPaperQtype> changeQuestions = new ArrayList<>();
|
|
@@ -1559,10 +1566,13 @@ public class MsPaperQtypeService {
|
1559
|
1566
|
movevalue = 1;// 在原来基础上加一
|
1560
|
1567
|
bmovevalue = -1;
|
1561
|
1568
|
}
|
1562
|
|
- params.setMovevalue(1);
|
|
1569
|
+ params.setMovevalue(movevalue);
|
1563
|
1570
|
moveQuestion.setQorder(movevalue);
|
1564
|
1571
|
// 被交换位置的试题
|
1565
|
1572
|
MsPaperQtypeQuestion question = msPaperQtypeQuestionMapper.getQuestionForMoverOrder(params);
|
|
1573
|
+ if(question == null){
|
|
1574
|
+ throw new RuntimeException("请检查移动是否合理");
|
|
1575
|
+ }
|
1566
|
1576
|
question.setQorder(bmovevalue);
|
1567
|
1577
|
|
1568
|
1578
|
List<MsPaperQtypeQuestion> changeQuestions = new ArrayList<>();
|