|
@@ -93,7 +93,7 @@ public class PaperService {
|
93
|
93
|
|
94
|
94
|
//答题卡中试题
|
95
|
95
|
List<TPaperScantron> scanlist = new ArrayList<>();
|
96
|
|
- qtypes.forEach(t->{
|
|
96
|
+ qtypes.forEach(t -> {
|
97
|
97
|
scanlist.addAll(t.getScantrons());
|
98
|
98
|
});
|
99
|
99
|
paper.setPapernum(scanlist.size());
|
|
@@ -104,17 +104,17 @@ public class PaperService {
|
104
|
104
|
|
105
|
105
|
//保存作业关联信息
|
106
|
106
|
List<TPaperFile> lst = paper.getPfiles();
|
107
|
|
- if(lst==null || lst.size()==0 || scanlist ==null || scanlist.size()==0){
|
108
|
|
- }else{
|
|
107
|
+ if (lst == null || lst.size() == 0 || scanlist == null || scanlist.size() == 0) {
|
|
108
|
+ } else {
|
109
|
109
|
//保存作业附件
|
110
|
110
|
savePaperScantronFile(paper);
|
111
|
111
|
//保存答题卡信息
|
112
|
|
- savePaperScantronQtype(paper,qtypes);
|
|
112
|
+ savePaperScantronQtype(paper, qtypes);
|
113
|
113
|
//保存分析
|
114
|
114
|
//savePaperScantronAnalyze(paperid,paper.getSchoolid());
|
115
|
115
|
}
|
116
|
116
|
|
117
|
|
- }catch (Exception e){
|
|
117
|
+ } catch (Exception e) {
|
118
|
118
|
log.error("保存答题卡作业失败:" + e.getMessage());
|
119
|
119
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
120
|
120
|
throw new Exception("保存答题卡作业失败");
|
|
@@ -124,12 +124,13 @@ public class PaperService {
|
124
|
124
|
}
|
125
|
125
|
|
126
|
126
|
/**
|
127
|
|
- *功能描述 答题卡作业--修改
|
128
|
|
- * @author WN
|
129
|
|
- * @date 2020/6/11
|
130
|
|
- * @param * @param paper
|
|
127
|
+ * 功能描述 答题卡作业--修改
|
|
128
|
+ *
|
|
129
|
+ * @param * @param paper
|
131
|
130
|
* @param qtypes
|
132
|
131
|
* @return boolean
|
|
132
|
+ * @author WN
|
|
133
|
+ * @date 2020/6/11
|
133
|
134
|
*/
|
134
|
135
|
@Transactional(rollbackFor = Exception.class)
|
135
|
136
|
public boolean updateScantronPaper(TPaper paper, List<TPaperScantronQtype> qtypes) throws Exception {
|
|
@@ -138,7 +139,7 @@ public class PaperService {
|
138
|
139
|
|
139
|
140
|
//答题卡中试题
|
140
|
141
|
List<TPaperScantron> scanlist = new ArrayList<>();
|
141
|
|
- qtypes.forEach(t->{
|
|
142
|
+ qtypes.forEach(t -> {
|
142
|
143
|
scanlist.addAll(t.getScantrons());
|
143
|
144
|
});
|
144
|
145
|
paper.setPapernum(scanlist.size());
|
|
@@ -167,7 +168,7 @@ public class PaperService {
|
167
|
168
|
}
|
168
|
169
|
|
169
|
170
|
|
170
|
|
- }catch (Exception e){
|
|
171
|
+ } catch (Exception e) {
|
171
|
172
|
log.error("修改答题卡作业失败:" + e.getMessage());
|
172
|
173
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
173
|
174
|
throw new Exception("修改答题卡作业失败");
|
|
@@ -176,13 +177,13 @@ public class PaperService {
|
176
|
177
|
}
|
177
|
178
|
|
178
|
179
|
|
179
|
|
-
|
180
|
180
|
/**
|
181
|
181
|
* 保存作业
|
|
182
|
+ *
|
|
183
|
+ * @return void
|
182
|
184
|
* @Param [paper]
|
183
|
185
|
* @Author ywx
|
184
|
186
|
* @Date 2020/6/10 10:29
|
185
|
|
- * @return void
|
186
|
187
|
**/
|
187
|
188
|
private Integer savePaper(TPaper paper) {
|
188
|
189
|
paper.setPaperstate(21);//作业状态:21未布置 22 已布置
|
|
@@ -197,10 +198,10 @@ public class PaperService {
|
197
|
198
|
}
|
198
|
199
|
|
199
|
200
|
//答题卡--保存作业附件信息
|
200
|
|
- private void savePaperScantronFile(TPaper paper){
|
|
201
|
+ private void savePaperScantronFile(TPaper paper) {
|
201
|
202
|
int fileorder = 1;
|
202
|
203
|
List<TPaperFile> lst = paper.getPfiles();
|
203
|
|
- for(TPaperFile pf : lst){
|
|
204
|
+ for (TPaperFile pf : lst) {
|
204
|
205
|
pf.setCreateid(paper.getCreateid());
|
205
|
206
|
pf.setCreatetime(N_Utils.getSecondTimestamp());
|
206
|
207
|
pf.setSchoolid(paper.getSchoolid());
|
|
@@ -247,7 +248,7 @@ public class PaperService {
|
247
|
248
|
}
|
248
|
249
|
|
249
|
250
|
//保存答题卡分析
|
250
|
|
- private Integer savePaperScantronAnalyze(Integer paperid,Integer schoolid){
|
|
251
|
+ private Integer savePaperScantronAnalyze(Integer paperid, Integer schoolid) {
|
251
|
252
|
List<Map<String, Object>> list = paperScantronMapper.listQtypeAnalyze(paperid);
|
252
|
253
|
|
253
|
254
|
TPaperAnalyze paperAnalyze = new TPaperAnalyze();
|
|
@@ -260,24 +261,37 @@ public class PaperService {
|
260
|
261
|
}
|
261
|
262
|
|
262
|
263
|
/**
|
263
|
|
- *功能描述 删除作业
|
|
264
|
+ * 功能描述 删除作业
|
|
265
|
+ *
|
|
266
|
+ * @param * @param paper
|
|
267
|
+ * @return void
|
264
|
268
|
* @author WN
|
265
|
269
|
* @date 2020/6/9
|
266
|
|
- * @param * @param paper
|
267
|
|
- * @return void
|
268
|
270
|
*/
|
269
|
|
- public Integer delPaper(TPaper paper){
|
270
|
|
- List<String> resourceUrls = paperFileService.listFolder(paper.getPaperid());//获取作业文件夹
|
271
|
|
- messageSender.resourceDel(resourceUrls);//给文件服务器发送mq删除文件
|
|
271
|
+ public Integer delPaper(TPaper paper) {
|
|
272
|
+ List<TPaperFile> pfilelist = paperFileService.listObjsByPaperid(paper.getPaperid());//获取作业文件夹
|
|
273
|
+ if (N_Utils.isListNotEmpty(pfilelist)) {
|
|
274
|
+ List<String> resourceUrls = new ArrayList<>();
|
|
275
|
+ for (int i = 0; i < pfilelist.size(); i++) {
|
|
276
|
+ TPaperFile pf = pfilelist.get(i);
|
|
277
|
+ resourceUrls.add(pf.getFilepath());
|
|
278
|
+ if (i == 0) {
|
|
279
|
+ resourceUrls.add(pf.getSourcepath());
|
|
280
|
+ }
|
|
281
|
+ }
|
|
282
|
+ messageSender.resourceDel(resourceUrls);//给文件服务器发送mq删除文件
|
|
283
|
+ }
|
|
284
|
+
|
272
|
285
|
return paperMapper.delPaper(paper.getPaperid());
|
273
|
286
|
}
|
274
|
287
|
|
275
|
288
|
/**
|
276
|
289
|
* 结构性试题作业--保存
|
|
290
|
+ *
|
|
291
|
+ * @return boolean
|
277
|
292
|
* @Param [paper, qtypes]
|
278
|
293
|
* @Author ywx
|
279
|
294
|
* @Date 2020/6/10 8:11
|
280
|
|
- * @return boolean
|
281
|
295
|
**/
|
282
|
296
|
@Transactional(rollbackFor = Exception.class)
|
283
|
297
|
public Integer saveQuestionPaper(TPaper paper, List<TPaperQtype> qtypes) throws Exception {
|
|
@@ -288,20 +302,21 @@ public class PaperService {
|
288
|
302
|
paper.setPaperid(paperid);
|
289
|
303
|
savePaperQtype(paper, qtypes);//保存作业题型信息
|
290
|
304
|
//generatePaperAnalyze(paperid, paper.getSchoolid());//生成作业分析
|
291
|
|
- }catch (Exception e){
|
|
305
|
+ } catch (Exception e) {
|
292
|
306
|
log.error("保存结构性试题作业失败:" + e.getMessage());
|
293
|
307
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
294
|
308
|
throw new Exception("保存结构性试题作业失败");
|
295
|
|
- }
|
|
309
|
+ }
|
296
|
310
|
return paperid;
|
297
|
311
|
}
|
298
|
312
|
|
299
|
313
|
/**
|
300
|
314
|
* 设置作业分值和试题数量
|
|
315
|
+ *
|
|
316
|
+ * @return void
|
301
|
317
|
* @Param [paper, qtypes]
|
302
|
318
|
* @Author ywx
|
303
|
319
|
* @Date 2020/6/28 18:05
|
304
|
|
- * @return void
|
305
|
320
|
**/
|
306
|
321
|
private void setPaperScoreAndNum(TPaper paper, List<TPaperQtype> qtypes) {
|
307
|
322
|
List<QuestionVo> questionList = new ArrayList<>();
|
|
@@ -325,7 +340,7 @@ public class PaperService {
|
325
|
340
|
//paperAnalyzeMapper.deleteByPaperid(paper.getPaperid());//删除分析信息
|
326
|
341
|
//generatePaperAnalyze(paper.getPaperid(), paper.getSchoolid());//生成作业分析
|
327
|
342
|
rtn = true;
|
328
|
|
- }catch (Exception e){
|
|
343
|
+ } catch (Exception e) {
|
329
|
344
|
log.error("保存结构性试题作业失败:" + e.getMessage());
|
330
|
345
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
331
|
346
|
throw new Exception("保存结构性试题作业失败");
|
|
@@ -335,10 +350,11 @@ public class PaperService {
|
335
|
350
|
|
336
|
351
|
/**
|
337
|
352
|
* 保存作业题型信息
|
|
353
|
+ *
|
|
354
|
+ * @return void
|
338
|
355
|
* @Param [paper, qtypes]
|
339
|
356
|
* @Author ywx
|
340
|
357
|
* @Date 2020/6/28 17:58
|
341
|
|
- * @return void
|
342
|
358
|
**/
|
343
|
359
|
private void savePaperQtype(TPaper paper, List<TPaperQtype> qtypes) {
|
344
|
360
|
Integer paperid = paper.getPaperid();
|
|
@@ -382,10 +398,11 @@ public class PaperService {
|
382
|
398
|
|
383
|
399
|
/**
|
384
|
400
|
* 生成作业分析
|
|
401
|
+ *
|
|
402
|
+ * @return java.lang.Integer
|
385
|
403
|
* @Param [paperid, schoolid]
|
386
|
404
|
* @Author ywx
|
387
|
405
|
* @Date 2020/6/10 9:57
|
388
|
|
- * @return java.lang.Integer
|
389
|
406
|
**/
|
390
|
407
|
private Integer generatePaperAnalyze(Integer paperid, Integer schoolid) {
|
391
|
408
|
//1.题型统计
|
|
@@ -405,13 +422,14 @@ public class PaperService {
|
405
|
422
|
}
|
406
|
423
|
|
407
|
424
|
/**
|
408
|
|
- *功能描述 详情--答题卡
|
|
425
|
+ * 功能描述 详情--答题卡
|
|
426
|
+ *
|
|
427
|
+ * @param * @param paperid
|
|
428
|
+ * @return com.xhkjedu.vo.paper.PaperScantronVo
|
409
|
429
|
* @author WN
|
410
|
430
|
* @date 2020/6/11
|
411
|
|
- * @param * @param paperid
|
412
|
|
- * @return com.xhkjedu.vo.paper.PaperScantronVo
|
413
|
431
|
*/
|
414
|
|
- public PaperScantronVo getPaperScantronDetial(Integer paperid){
|
|
432
|
+ public PaperScantronVo getPaperScantronDetial(Integer paperid) {
|
415
|
433
|
PaperVo paper = paperMapper.findById(paperid);
|
416
|
434
|
PaperScantronVo ps = new PaperScantronVo();
|
417
|
435
|
ps.setPaperid(paperid);
|
|
@@ -439,10 +457,11 @@ public class PaperService {
|
439
|
457
|
|
440
|
458
|
/**
|
441
|
459
|
* 作业详情--结构性试题
|
|
460
|
+ *
|
|
461
|
+ * @return com.xhkjedu.vo.paper.PaperVo
|
442
|
462
|
* @Param [paperid]
|
443
|
463
|
* @Author ywx
|
444
|
464
|
* @Date 2020/6/10 14:33
|
445
|
|
- * @return com.xhkjedu.vo.paper.PaperVo
|
446
|
465
|
**/
|
447
|
466
|
public PaperVo findById(Integer paperid) {
|
448
|
467
|
PaperVo paper = paperMapper.findById(paperid);
|
|
@@ -457,7 +476,7 @@ public class PaperService {
|
457
|
476
|
for (QuestionVo question : questions) {
|
458
|
477
|
String questionid = question.getQuestionid();
|
459
|
478
|
List<Map> qsList = students.stream().filter(s -> s.get("questionids").toString().contains(questionid))
|
460
|
|
- .collect(Collectors.toList());
|
|
479
|
+ .collect(Collectors.toList());
|
461
|
480
|
Map<Integer, List<Map>> classCollect = qsList.stream().collect(Collectors.groupingBy(m -> (Integer) m.get("classid")
|
462
|
481
|
, LinkedHashMap::new, Collectors.toList()));
|
463
|
482
|
List<Map> classes = new ArrayList<>();
|
|
@@ -480,28 +499,30 @@ public class PaperService {
|
480
|
499
|
|
481
|
500
|
/**
|
482
|
501
|
* 作业列表
|
|
502
|
+ *
|
|
503
|
+ * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
483
|
504
|
* @Param [paper]
|
484
|
505
|
* @Author ywx
|
485
|
506
|
* @Date 2020/6/11 16:30
|
486
|
|
- * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
487
|
507
|
**/
|
488
|
508
|
public List<PaperListVo> findAll(PaperSearchVo paper) {
|
489
|
|
- if(paper.getPsstate()!=null && paper.getPsstate() == 21){
|
|
509
|
+ if (paper.getPsstate() != null && paper.getPsstate() == 21) {
|
490
|
510
|
//未布置作业
|
491
|
511
|
return paperMapper.listWfbPapers(paper);
|
492
|
|
- }else{
|
|
512
|
+ } else {
|
493
|
513
|
//全部作业
|
494
|
|
- List<PaperListVo> list = paperMapper.listAll(paper);
|
|
514
|
+ List<PaperListVo> list = paperMapper.listAll(paper);
|
495
|
515
|
return getPaperListVo(list);
|
496
|
516
|
}
|
497
|
517
|
}
|
498
|
518
|
|
499
|
519
|
/**
|
500
|
520
|
* 设置批改方式
|
|
521
|
+ *
|
|
522
|
+ * @return void
|
501
|
523
|
* @Param [param]
|
502
|
524
|
* @Author ywx
|
503
|
525
|
* @Date 2020/6/12 7:57
|
504
|
|
- * @return void
|
505
|
526
|
**/
|
506
|
527
|
@Transactional(rollbackFor = Exception.class)
|
507
|
528
|
public void setCheckType(PaperParam param) throws Exception {
|
|
@@ -510,12 +531,12 @@ public class PaperService {
|
510
|
531
|
|
511
|
532
|
try {
|
512
|
533
|
paperMapper.updateCheckType(paperid, checktype);//设置批改方式
|
513
|
|
- if (checktype == 1){//教师批阅
|
|
534
|
+ if (checktype == 1) {//教师批阅
|
514
|
535
|
if (N_Utils.isEmptyInteger(param.getTeacherid())) {//不同班级分别指定教师
|
515
|
536
|
List<PaperCheckParam> checkParams = JSON.parseArray(param.getClassids(), PaperCheckParam.class);
|
516
|
537
|
paperStudentMapper.updateCheckId2(paperid, checkParams);
|
517
|
538
|
} else {//不同班级指定同一个教师
|
518
|
|
- paperStudentMapper.updateCheckId(paperid,param.getTeacherid());//设置批改人
|
|
539
|
+ paperStudentMapper.updateCheckId(paperid, param.getTeacherid());//设置批改人
|
519
|
540
|
}
|
520
|
541
|
} else {
|
521
|
542
|
List<PaperCheckParam> checkParams = JSON.parseArray(param.getClassids(), PaperCheckParam.class);
|
|
@@ -525,7 +546,7 @@ public class PaperService {
|
525
|
546
|
for (int i = 0; i < checkParams.size(); i++) {
|
526
|
547
|
PaperCheckParam gs = checkParams.get(i);
|
527
|
548
|
List<Integer> studentids = classStudents.stream().filter(cs -> cs.getClassid().equals(gs.getClassid()))
|
528
|
|
- .map(PaperCheckParam::getCheckid).collect(Collectors.toList());
|
|
549
|
+ .map(PaperCheckParam::getCheckid).collect(Collectors.toList());
|
529
|
550
|
gs.setStudentids(studentids);
|
530
|
551
|
if (checktype == 2) {
|
531
|
552
|
//学生互改
|
|
@@ -563,38 +584,39 @@ public class PaperService {
|
563
|
584
|
}
|
564
|
585
|
} catch (Exception e) {
|
565
|
586
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
566
|
|
- log.error("设置批改方式失败:"+e.getMessage());
|
|
587
|
+ log.error("设置批改方式失败:" + e.getMessage());
|
567
|
588
|
throw new Exception("设置批改方式失败");
|
568
|
589
|
}
|
569
|
590
|
}
|
570
|
591
|
|
571
|
592
|
/**
|
572
|
593
|
* 设置学生批改人对应关系
|
|
594
|
+ *
|
|
595
|
+ * @return java.util.List<com.xhkjedu.model.paperstudent.TPaperStudent>
|
573
|
596
|
* @Param [paperid, checkParams, checktype, map]
|
574
|
597
|
* @Author ywx
|
575
|
598
|
* @Date 2020/6/12 9:05
|
576
|
|
- * @return java.util.List<com.xhkjedu.model.paperstudent.TPaperStudent>
|
577
|
599
|
**/
|
578
|
600
|
private List<TPaperStudent> setStudentCheckId(Integer paperid, List<PaperCheckParam> checkParams, Integer checktype, Map<Integer, Integer> map) {
|
579
|
601
|
List<TPaperStudent> list = new ArrayList<>();
|
580
|
|
- for(int i=0;i<checkParams.size();i++){
|
|
602
|
+ for (int i = 0; i < checkParams.size(); i++) {
|
581
|
603
|
PaperCheckParam cp = checkParams.get(i);
|
582
|
|
- for(int j=0;j<cp.getStudentids().size();j++){
|
|
604
|
+ for (int j = 0; j < cp.getStudentids().size(); j++) {
|
583
|
605
|
TPaperStudent ps = new TPaperStudent();
|
584
|
606
|
ps.setPaperid(paperid);
|
585
|
607
|
ps.setClassid(cp.getClassid());
|
586
|
608
|
Integer studentid = cp.getStudentids().get(j);
|
587
|
609
|
ps.setStudentid(studentid);
|
588
|
610
|
Integer checkid;
|
589
|
|
- if(checktype==1){
|
|
611
|
+ if (checktype == 1) {
|
590
|
612
|
checkid = cp.getCheckids().get(0);
|
591
|
|
- } else if(checktype==2){
|
|
613
|
+ } else if (checktype == 2) {
|
592
|
614
|
checkid = cp.getCheckids().get(j);
|
593
|
|
- }else{
|
|
615
|
+ } else {
|
594
|
616
|
//第一种只有一个批改人的
|
595
|
|
- if(cp.getCheckids().size()==1){
|
|
617
|
+ if (cp.getCheckids().size() == 1) {
|
596
|
618
|
checkid = cp.getCheckids().get(0);
|
597
|
|
- }else{
|
|
619
|
+ } else {
|
598
|
620
|
checkid = map.get(studentid);
|
599
|
621
|
}
|
600
|
622
|
}
|
|
@@ -606,32 +628,32 @@ public class PaperService {
|
606
|
628
|
}
|
607
|
629
|
|
608
|
630
|
//设置作业批改人(选择指定学生)
|
609
|
|
- private Map<Integer,Integer> setStudentIdCheckerId(PaperCheckParam gs){
|
610
|
|
- Map<Integer,Integer> map = new HashMap<>();
|
|
631
|
+ private Map<Integer, Integer> setStudentIdCheckerId(PaperCheckParam gs) {
|
|
632
|
+ Map<Integer, Integer> map = new HashMap<>();
|
611
|
633
|
//选择学生批改
|
612
|
634
|
List<Integer> allstudents = new ArrayList<>();//所有有作业的学生
|
613
|
635
|
allstudents.addAll(gs.getStudentids());
|
614
|
636
|
//去除选中的是批改人的作业
|
615
|
|
- for(int k=0;k<gs.getCheckids().size();k++){
|
|
637
|
+ for (int k = 0; k < gs.getCheckids().size(); k++) {
|
616
|
638
|
allstudents.remove(gs.getCheckids().get(k));//把批改人的作业去除
|
617
|
639
|
}
|
618
|
640
|
|
619
|
641
|
List<List<Integer>> result = N_Utils.averageAssignList(allstudents, gs.getCheckids().size());
|
620
|
642
|
Collections.shuffle(gs.getCheckids());//重置批改作业人顺序
|
621
|
643
|
|
622
|
|
- for(int l=0;l<result.size();l++){
|
|
644
|
+ for (int l = 0; l < result.size(); l++) {
|
623
|
645
|
List<Integer> groupstu = new ArrayList<>();
|
624
|
646
|
groupstu.addAll(result.get(l));
|
625
|
647
|
|
626
|
|
- if(l==0){
|
|
648
|
+ if (l == 0) {
|
627
|
649
|
//把最有一个用户的作业插入这个集合中(避免数据自己批改自己的作业)
|
628
|
|
- groupstu.add(gs.getCheckids().get(result.size()-1));
|
629
|
|
- }else{
|
|
650
|
+ groupstu.add(gs.getCheckids().get(result.size() - 1));
|
|
651
|
+ } else {
|
630
|
652
|
//否则把上一个加入到作业集合中(避免数据自己批改自己的作业)
|
631
|
|
- int n = l-1;
|
|
653
|
+ int n = l - 1;
|
632
|
654
|
groupstu.add(gs.getCheckids().get(n));
|
633
|
655
|
}
|
634
|
|
- for(int m=0;m<groupstu.size();m++){
|
|
656
|
+ for (int m = 0; m < groupstu.size(); m++) {
|
635
|
657
|
map.put(groupstu.get(m), gs.getCheckids().get(l));//设置批改人
|
636
|
658
|
}
|
637
|
659
|
}
|
|
@@ -639,23 +661,24 @@ public class PaperService {
|
639
|
661
|
}
|
640
|
662
|
|
641
|
663
|
/**
|
642
|
|
- *获取批改学生列表
|
|
664
|
+ * 获取批改学生列表
|
|
665
|
+ *
|
|
666
|
+ * @return com.xhkjedu.vo.paper.CheckClassVo
|
643
|
667
|
* @Param [paperid, checkid, classid]
|
644
|
668
|
* @Author ywx
|
645
|
669
|
* @Date 2020/6/12 11:00
|
646
|
|
- * @return com.xhkjedu.vo.paper.CheckClassVo
|
647
|
670
|
**/
|
648
|
671
|
public CheckClassVo listStudentsByPaperIdCheckId(Integer paperid, Integer checkid, Integer classid) {
|
649
|
672
|
CheckClassVo checkVo = paperMapper.listStudentsByPaperIdCheckId(paperid, checkid, classid);
|
650
|
673
|
Integer ytjnum = checkVo.getYtjnum();
|
651
|
|
- checkVo.setWtjnum(checkVo.getClassnum()-ytjnum);
|
652
|
|
- if (!N_Utils.isEmptyInteger(ytjnum)){
|
653
|
|
- double scale = N_Utils.getIntegerDivideAndMulitiply(checkVo.getYpynum(),ytjnum);
|
|
674
|
+ checkVo.setWtjnum(checkVo.getClassnum() - ytjnum);
|
|
675
|
+ if (!N_Utils.isEmptyInteger(ytjnum)) {
|
|
676
|
+ double scale = N_Utils.getIntegerDivideAndMulitiply(checkVo.getYpynum(), ytjnum);
|
654
|
677
|
checkVo.setScale(scale);
|
655
|
678
|
} else {
|
656
|
679
|
checkVo.setScale(0);
|
657
|
680
|
}
|
658
|
|
- if(checkVo.getYpynum() == null){
|
|
681
|
+ if (checkVo.getYpynum() == null) {
|
659
|
682
|
checkVo.setYpynum(0);
|
660
|
683
|
}
|
661
|
684
|
return checkVo;
|
|
@@ -663,10 +686,11 @@ public class PaperService {
|
663
|
686
|
|
664
|
687
|
/**
|
665
|
688
|
* 教师批阅列表
|
|
689
|
+ *
|
|
690
|
+ * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
666
|
691
|
* @Param [checkid]
|
667
|
692
|
* @Author ywx
|
668
|
693
|
* @Date 2020/6/18 14:55
|
669
|
|
- * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
670
|
694
|
**/
|
671
|
695
|
public List<PaperListVo> correctList(Integer checkid) {
|
672
|
696
|
List<PaperListVo> list = paperMapper.correctList(checkid);
|
|
@@ -675,14 +699,15 @@ public class PaperService {
|
675
|
699
|
|
676
|
700
|
/**
|
677
|
701
|
* 作业列表
|
|
702
|
+ *
|
|
703
|
+ * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
678
|
704
|
* @Param [list]
|
679
|
705
|
* @Author ywx
|
680
|
706
|
* @Date 2020/6/18 15:09
|
681
|
|
- * @return java.util.List<com.xhkjedu.vo.paper.PaperListVo>
|
682
|
707
|
**/
|
683
|
708
|
private List<PaperListVo> getPaperListVo(List<PaperListVo> list) {
|
684
|
709
|
for (PaperListVo p : list) {
|
685
|
|
- if (p.getPaperstate() == 21){//未布置
|
|
710
|
+ if (p.getPaperstate() == 21) {//未布置
|
686
|
711
|
p.setClasses(null);
|
687
|
712
|
} else {
|
688
|
713
|
List<PaperClassVo> classes = p.getClasses();
|
|
@@ -698,10 +723,11 @@ public class PaperService {
|
698
|
723
|
|
699
|
724
|
/**
|
700
|
725
|
* 作业附件列表
|
|
726
|
+ *
|
|
727
|
+ * @return java.util.List<com.xhkjedu.model.paper.TPaperFile>
|
701
|
728
|
* @Param [paperid]
|
702
|
729
|
* @Author ywx
|
703
|
730
|
* @Date 2020/6/23 21:53
|
704
|
|
- * @return java.util.List<com.xhkjedu.model.paper.TPaperFile>
|
705
|
731
|
**/
|
706
|
732
|
public List<TPaperFile> listPaperFile(Integer paperid, Integer fileclass) {
|
707
|
733
|
return paperMapper.listPaperFile(paperid, fileclass);
|
|
@@ -715,7 +741,7 @@ public class PaperService {
|
715
|
741
|
//获取今天布置作业数量
|
716
|
742
|
public String getPaperNum(String subjectid, Integer createid, Integer createtime) {
|
717
|
743
|
Integer num = paperMapper.getPaperNum(subjectid, createid, createtime);
|
718
|
|
- String paperNum = "("+ N_Utils.NumberToChn(num)+")";
|
|
744
|
+ String paperNum = "(" + N_Utils.NumberToChn(num) + ")";
|
719
|
745
|
return paperNum;
|
720
|
746
|
}
|
721
|
747
|
|