Переглянути джерело

Merge remote-tracking branch 'origin/dev_v3.4.1' into dev_v3.4.1

wangliang 10 місяців тому
батько
коміт
440eedbc28

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java

@@ -450,8 +450,8 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             pdfStringJoiner = SystemConstant.getDirName(pdfStringJoiner, UploadFileEnum.PDF, true);
             pdfStringJoiner.add(SystemConstant.getNanoId()).add(SystemConstant.PDF_PREFIX);
 
-            String htmlDirName = stringJoiner.toString();
-            String pdfDirName = pdfStringJoiner.toString();
+            String htmlDirName = stringJoiner.toString().replaceAll("/", "\\\\");
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("/", "\\\\");
 
             JSONObject jsonObject = new JSONObject();
             jsonObject.put(SystemConstant.PATH, htmlDirName);

+ 3 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

@@ -438,6 +438,7 @@ public class SysController {
             code = basicSchool.getCode();
             authInfoService.appHasExpired(code);
             SysConfig sysConfig = commonCacheService.addSysConfigCache(basicSchool.getId(), SystemConstant.ACCOUNT_SMS_VERIFY);
+            SysConfig cardSize = commonCacheService.addSysConfigCache(basicSchool.getId(), SystemConstant.CARD_SIZE_LIST);
             map.put(SystemConstant.LOGO, basicSchool.getLogo());
             String backgroundImageUrl = null;
             if (StringUtils.isNotBlank(basicSchool.getBackgroundImage())) {
@@ -455,6 +456,8 @@ public class SysController {
             map.put("schoolCode", code);
             // 广药命题界面提示信息
             map.put("examTaskInstr", basicSchool.getExamTaskInstr());
+            map.put("cardSize",Objects.nonNull(cardSize) ? Arrays.asList(
+                    cardSize.getConfigValue().replaceAll("\\[", "").replaceAll("\\]", "").split(", ")) : null);
         } else {
             SysConfig sysConfig = commonCacheService.addSysConfigCache(SystemConstant.ADMIN_LOGO_URL);
             map.put(SystemConstant.LOGO, Objects.nonNull(sysConfig) ? sysConfig.getConfigValue() : null);

+ 23 - 18
distributed-print/src/main/resources/application.properties

@@ -10,17 +10,22 @@ server.tomcat.uri-encoding=UTF-8
 spring.application.name=teachcloud
 
 #\u6570\u636E\u6E90\u914D\u7F6E
-db.host=192.168.10.136
-db.port=3307
-db.name=dps-v3.0.1-test
-db.username=dps_test
-db.password=dps_test
+db.host=localhost
+db.port=3306
+db.name=dps-print-test
+
+db.username=root
+db.password=88888888
 
 #redis\u6570\u636E\u6E90\u914D\u7F6E
-com.qmth.redis.host=127.0.0.1
+com.qmth.redis.host=${db.host}
 com.qmth.redis.port=6379
 com.qmth.redis.db=4
-#com.qmth.redis.password=
+
+#com.qmth.redis.host=${db.host}
+#com.qmth.redis.port=6379
+#com.qmth.redis.db=1
+#com.qmth.redis.password=87863577
 
 #mysql\u914D\u7F6E
 com.qmth.datasource.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
@@ -47,24 +52,24 @@ spring.activiti.check-process-definitions=false
 #full\uFF1A\u4FDD\u5B58\u5386\u53F2\u6570\u636E\u7684\u6700\u9AD8\u7EA7\u522B\uFF0C\u9664\u4E86\u4F1A\u4FDD\u5B58audit\u7EA7\u522B\u7684\u6570\u636E\u5916\uFF0C\u8FD8\u4F1A\u4FDD\u5B58\u5176\u4ED6\u5168\u90E8\u6D41\u7A0B\u76F8\u5173\u7684\u7EC6\u8282\u6570\u636E\uFF0C\u5305\u62EC\u4E00\u4E9B\u6D41\u7A0B\u53C2\u6570\u7B49\u3002
 spring.activiti.history-level=audit
 
-com.qmth.fss.private.config=oss://key:secret@teachcloud-dps-dev-private.oss-api.qmth.com.cn
-com.qmth.fss.private.server=https://oss-file.qmth.com.cn/teachcloud-dps-dev-private
-com.qmth.fss.public.config=oss://key:secret@teachcloud-dps-dev-public.oss-api.qmth.com.cn
-com.qmth.fss.public.server=https://oss-file.qmth.com.cn/teachcloud-dps-dev-public
+#com.qmth.fss.public.config=E:/localFile/print-v3.4.1/file-temp
+#com.qmth.fss.public.server=http://192.168.11.132:7001
+#com.qmth.fss.private.config=E:/localFile/print-v3.4.1/pdf-temp
+#com.qmth.fss.private.server=http://192.168.11.132:7001
 
 #com.qmth.fss.public.config=../static/
 #com.qmth.fss.public.server=/static/
 #com.qmth.fss.private.config=../static/
 #com.qmth.fss.private.server=/static/
 
-#com.qmth.fss.public.config=/Users/king/Downloads/file-temp
-#com.qmth.fss.public.server=/file-temp/
-#com.qmth.fss.private.config=/Users/king/Downloads/pdf-temp
-#com.qmth.fss.private.server=/pdf-temp/
+com.qmth.fss.private.config=oss://key:secret@teachcloud-dps-dev-private.oss-api.qmth.com.cn
+com.qmth.fss.private.server=https://oss-file.qmth.com.cn/teachcloud-dps-dev-private
+com.qmth.fss.public.config=oss://key:secret@teachcloud-dps-dev-public.oss-api.qmth.com.cn
+com.qmth.fss.public.server=https://oss-file.qmth.com.cn/teachcloud-dps-dev-public
 
 #\u7CFB\u7EDF\u914D\u7F6E
-sys.config.oss=true
-sys.config.htmlToPdfUrl=/usr/local/bin/wkhtmltopdf
+sys.config.oss=false
+sys.config.htmlToPdfUrl=E:/devUtils/wkhtmltopdf/bin/wkhtmltopdf.exe
 sys.config.serverUpload=
 spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/META-INF/resources/,classpath:/resources/
 
@@ -88,7 +93,7 @@ spring.jackson.time-zone=GMT+8
 
 #\u65E5\u5FD7\u914D\u7F6E
 com.qmth.logging.root-level=info
-com.qmth.logging.file-path=/Users/king/Downloads/distributed-print.log
+com.qmth.logging.file-path=E:/localFile/print-v3.4.1/distributed-print.log
 
 #com.qmth.solar.access-key=274f823e5f59410f8b3bb6edcd8e2b6e
 #com.qmth.solar.access-secret=y7AO6W0TOdTF8HpWBwGHbp3wfIHsmUKr

+ 56 - 3
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/QuestionVo.java

@@ -3,6 +3,7 @@ package com.qmth.teachcloud.mark.bean.archivescore;
 import io.swagger.annotations.ApiModelProperty;
 
 public class QuestionVo {
+
 	@ApiModelProperty("考生总数")
 	private Integer studentCount;
 
@@ -35,73 +36,125 @@ public class QuestionVo {
 
 	@ApiModelProperty("满分率")
 	private Double fullScoreRate;
+
+	@ApiModelProperty("最高分")
+	private Double maxScore;
+
+	@ApiModelProperty("最低分")
+	private Double minScore;
+
+	@ApiModelProperty("零分人数")
+	private Integer zeroScoreCount;
+
 	public String getTitle() {
 		return title;
 	}
+
 	public void setTitle(String title) {
 		this.title = title;
 	}
+
 	public Integer getMainNumber() {
 		return mainNumber;
 	}
+
 	public void setMainNumber(Integer mainNumber) {
 		this.mainNumber = mainNumber;
 	}
+
 	public Integer getSubNumber() {
 		return subNumber;
 	}
+
 	public void setSubNumber(Integer subNumber) {
 		this.subNumber = subNumber;
 	}
+
 	public Double getScore() {
 		return score;
 	}
+
 	public void setScore(Double score) {
 		this.score = score;
 	}
+
 	public Double getAvgScore() {
 		return avgScore;
 	}
+
 	public void setAvgScore(Double avgScore) {
 		this.avgScore = avgScore;
 	}
-	
+
 	public Double getScoreRate() {
 		return scoreRate;
 	}
+
 	public void setScoreRate(Double scoreRate) {
 		this.scoreRate = scoreRate;
 	}
+
 	public Double getFullScoreRate() {
 		return fullScoreRate;
 	}
+
 	public void setFullScoreRate(Double fullScoreRate) {
 		this.fullScoreRate = fullScoreRate;
 	}
+
 	public Integer getStudentCount() {
 		return studentCount;
 	}
+
 	public void setStudentCount(Integer studentCount) {
 		this.studentCount = studentCount;
 	}
+
 	public Integer getScoreCount() {
 		return scoreCount;
 	}
+
 	public void setScoreCount(Integer scoreCount) {
 		this.scoreCount = scoreCount;
 	}
+
 	public Integer getFullScoreCount() {
 		return fullScoreCount;
 	}
+
 	public void setFullScoreCount(Integer fullScoreCount) {
 		this.fullScoreCount = fullScoreCount;
 	}
+
 	public Double getScoreSum() {
 		return scoreSum;
 	}
+
 	public void setScoreSum(Double scoreSum) {
 		this.scoreSum = scoreSum;
 	}
-	
-	
+
+	public Double getMaxScore() {
+		return maxScore;
+	}
+
+	public void setMaxScore(Double maxScore) {
+		this.maxScore = maxScore;
+	}
+
+	public Double getMinScore() {
+		return minScore;
+	}
+
+	public void setMinScore(Double minScore) {
+		this.minScore = minScore;
+	}
+
+	public Integer getZeroScoreCount() {
+		return zeroScoreCount;
+	}
+
+	public void setZeroScoreCount(Integer zeroScoreCount) {
+		this.zeroScoreCount = zeroScoreCount;
+	}
 }

+ 14 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -1514,6 +1514,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 questionVo.setScoreCount(0);
                 questionVo.setFullScoreCount(0);
                 questionVo.setScoreSum(0.0);
+                questionVo.setZeroScoreCount(0);
                 mainQuestionMap.put(key, questionVo);
             }
         }
@@ -1529,6 +1530,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         List<MarkQuestion> objectiveQuestions = questionDatasource.stream().filter(MarkQuestion::getObjective).collect(Collectors.toList());
         for (ArchiveStudentVo studentVo : studentList) {
             List<ScoreItem> scoreItemList = studentVo.getScoreList(true, objectiveQuestions);
+
             for (String key : mainQuestionMap.keySet()) {
                 String[] arr = key.split("-");
                 int mainNumber = Integer.parseInt(arr[0]);
@@ -1563,8 +1565,20 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 if (studentScore == questionVo.getScore()) {
                     questionVo.setFullScoreCount(questionVo.getFullScoreCount() + 1);
                 }
+                // 零分总数
+                if (studentScore == 0) {
+                    questionVo.setZeroScoreCount(questionVo.getZeroScoreCount() + 1);
+                }
                 // 考生总得分
                 questionVo.setScoreSum(questionVo.getScoreSum() + studentScore);
+                // 最高分
+                if (Objects.isNull(questionVo.getMaxScore()) || studentScore > questionVo.getMaxScore()) {
+                    questionVo.setMaxScore(studentScore);
+                }
+                // 最低分
+                if (Objects.isNull(questionVo.getMinScore()) || studentScore < questionVo.getMinScore()) {
+                    questionVo.setMinScore(studentScore);
+                }
             }
         }
         List<QuestionVo> questionVoList = new ArrayList<>(mainQuestionMap.values());