diff --git a/ynexam-admin/src/main/resources/application-dev.yml b/ynexam-admin/src/main/resources/application-dev.yml index 19223b0..533f1aa 100644 --- a/ynexam-admin/src/main/resources/application-dev.yml +++ b/ynexam-admin/src/main/resources/application-dev.yml @@ -8,14 +8,14 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 - master: - url: jdbc:mysql://localhost:3306/yn_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: root # master: -# url: jdbc:mysql://182.92.73.21:3370/yn_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://localhost:3306/yn_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: root -# password: long09aa@1345225844@. +# password: root + master: + url: jdbc:mysql://182.92.73.21:3370/yn_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: long09aa@1345225844@. # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ynexam-ynedu/src/main/java/com/xhm/ynedu/service/impl/YnExportServiceImpl.java b/ynexam-ynedu/src/main/java/com/xhm/ynedu/service/impl/YnExportServiceImpl.java index c92b3f2..f6f1844 100644 --- a/ynexam-ynedu/src/main/java/com/xhm/ynedu/service/impl/YnExportServiceImpl.java +++ b/ynexam-ynedu/src/main/java/com/xhm/ynedu/service/impl/YnExportServiceImpl.java @@ -773,6 +773,8 @@ public class YnExportServiceImpl implements IYExportService { int size = ynExaminerLeads.size() - 2; //一项要素的平均分 v = score /size; + BigDecimal bigDecimal = new BigDecimal(v + ""); + BigDecimal v1 = bigDecimal.setScale(2, BigDecimal.ROUND_HALF_UP); YnSubject ynSubject = ynSubjectMapper.selectYnSubjectById(o); Integer row = 1; for (int i1 = 1; i1 <= ynSubjects.size(); i1++) { @@ -788,7 +790,7 @@ public class YnExportServiceImpl implements IYExportService { va5.setVal(STVerticalJc.CENTER); ctTc5.getPList().get(0).addNewPPr().addNewJc().setVal(STJc.CENTER); cell5.getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.RESTART); - cell5.setText(String.valueOf(v)); + cell5.setText(String.valueOf(v1)); } }