|
@@ -341,7 +341,7 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(StringUtils.isNotBlank(record.getClassName())){
|
|
|
+ if (StringUtils.isNotBlank(record.getClassName())) {
|
|
|
record.setClassName(String.join(",", new HashSet<>(Arrays.asList(record.getClassName().split(",")))));
|
|
|
}
|
|
|
}
|
|
@@ -368,11 +368,11 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
|
|
|
// 累计a3,a4
|
|
|
List<ClientPrintData> list = clientPrintDataService.listBySchoolIdAndMachineCode(schoolId, machineCode);
|
|
|
if (!list.isEmpty()) {
|
|
|
- int paperPages = list.stream().mapToInt(ClientPrintData::getPaperPages).sum();
|
|
|
+ int paperPages = list.stream().filter(m -> m.getPaperPages() != null).mapToInt(ClientPrintData::getPaperPages).sum();
|
|
|
clientPrintTaskTotalDto.setHostPaperPages(paperPages / 2);
|
|
|
- int cardPages = list.stream().mapToInt(ClientPrintData::getCardPages).sum();
|
|
|
+ int cardPages = list.stream().filter(m -> m.getCardPages() != null).mapToInt(ClientPrintData::getCardPages).sum();
|
|
|
clientPrintTaskTotalDto.setHostCardPages(cardPages / 2);
|
|
|
- int pagesA4 = list.stream().mapToInt(ClientPrintData::getPagesA4).sum();
|
|
|
+ int pagesA4 = list.stream().filter(m -> m.getPagesA4() != null).mapToInt(ClientPrintData::getPagesA4).sum();
|
|
|
clientPrintTaskTotalDto.setHostPagesA4(pagesA4 / 2);
|
|
|
}
|
|
|
|
|
@@ -472,10 +472,10 @@ public class ExamPrintPlanServiceImpl extends ServiceImpl<ExamPrintPlanMapper, E
|
|
|
List<ExamPrintPlan> examPrintPlanList = this.list(queryWrapper);
|
|
|
for (ExamPrintPlan examPrintPlan : examPrintPlanList) {
|
|
|
String ordinaryContent = examPrintPlan.getOrdinaryContent();
|
|
|
- if(StringUtils.isNotBlank(ordinaryContent)){
|
|
|
+ if (StringUtils.isNotBlank(ordinaryContent)) {
|
|
|
List<JSONObject> jsonObjectList = JSON.parseArray(ordinaryContent, JSONObject.class);
|
|
|
for (JSONObject jsonObject : jsonObjectList) {
|
|
|
- if(ClassifyEnum.CHECK_IN.name().equals(jsonObject.getString("type")) && templateId.equals(jsonObject.getLong("templateId"))){
|
|
|
+ if (ClassifyEnum.CHECK_IN.name().equals(jsonObject.getString("type")) && templateId.equals(jsonObject.getLong("templateId"))) {
|
|
|
jsonObject.put("attachmentId", String.valueOf(attachmentId));
|
|
|
}
|
|
|
}
|