|
@@ -3,6 +3,7 @@ package cn.hmsoft.art.enrol.business.decision;
|
|
import cn.hmsoft.application.SpringHelper;
|
|
import cn.hmsoft.application.SpringHelper;
|
|
import cn.hmsoft.art.constants.StdMaterialType;
|
|
import cn.hmsoft.art.constants.StdMaterialType;
|
|
import cn.hmsoft.art.data.dao.sc.ScScoreYmDao;
|
|
import cn.hmsoft.art.data.dao.sc.ScScoreYmDao;
|
|
|
|
+import cn.hmsoft.art.data.model.cf.CfSubject;
|
|
import cn.hmsoft.art.data.model.sc.ScScoreYm;
|
|
import cn.hmsoft.art.data.model.sc.ScScoreYm;
|
|
import cn.hmsoft.art.data.model.std.StdLog;
|
|
import cn.hmsoft.art.data.model.std.StdLog;
|
|
import cn.hmsoft.art.enrol.helper.EnrolMaterialHelper;
|
|
import cn.hmsoft.art.enrol.helper.EnrolMaterialHelper;
|
|
@@ -354,17 +355,30 @@ public abstract class DecisionHelper {
|
|
stdTable.addCell(new Cell(2, 1).add("考试科目:").setFontSize(fontSize)
|
|
stdTable.addCell(new Cell(2, 1).add("考试科目:").setFontSize(fontSize)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.RIGHT).setTextAlignment(TextAlignment.RIGHT)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.RIGHT).setTextAlignment(TextAlignment.RIGHT)
|
|
.setMarginTop(5).setMarginBottom(5).setBold());
|
|
.setMarginTop(5).setMarginBottom(5).setBold());
|
|
- String subject_name = "";
|
|
|
|
|
|
+
|
|
|
|
+ StringBuilder subject_name = new StringBuilder();
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_1())) {
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_1())) {
|
|
- subject_name = "《" + score.getSubject_name_1() + "》";
|
|
|
|
|
|
+ subject_name = new StringBuilder("《" + score.getSubject_name_1() + "》");
|
|
}
|
|
}
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_2())) {
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_2())) {
|
|
- subject_name += "\n《" + score.getSubject_name_2() + "》";
|
|
|
|
|
|
+ subject_name.append("\n《").append(score.getSubject_name_2()).append("》");
|
|
}
|
|
}
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_3())) {
|
|
if (StringHelper.isNotEmpty(score.getSubject_name_3())) {
|
|
- subject_name += "\n《" + score.getSubject_name_3() + "》";
|
|
|
|
|
|
+ subject_name.append("\n《").append(score.getSubject_name_3()).append("》");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String sql;
|
|
|
|
+ if(StringHelper.isEmpty(subject_name.toString())) {
|
|
|
|
+ sql = "select t.* from cf_aspect a,cf_aspect_subject cas, cf_subject t "
|
|
|
|
+ + " where a.aspect_id=cas.aspect_id and cas.subject_id=t.subject_id and aspect_batch=? and aspect_name=? ";
|
|
|
|
+ List<CfSubject> subjectList = scoreYmDao.listBySql(CfSubject.class, sql, score.getBatch().equals("first") ? 1 : 2, score.getAspect_name());
|
|
|
|
+ for(CfSubject subject : subjectList) {
|
|
|
|
+ subject_name.append("《").append(subject.getSubject_name()).append("》\n");
|
|
|
|
+ }
|
|
|
|
+ subject_name.deleteCharAt(subject_name.length() - 1);
|
|
}
|
|
}
|
|
- stdTable.addCell(new Cell(2, 1).add(subject_name).setFontSize(fontSize)
|
|
|
|
|
|
+
|
|
|
|
+ stdTable.addCell(new Cell(2, 1).add(subject_name.toString()).setFontSize(fontSize)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.LEFT).setTextAlignment(TextAlignment.LEFT)
|
|
.setVerticalAlignment(VerticalAlignment.MIDDLE).setHorizontalAlignment(HorizontalAlignment.LEFT).setTextAlignment(TextAlignment.LEFT)
|
|
.setMarginLeft(5).setMarginTop(5).setMarginBottom(5));
|
|
.setMarginLeft(5).setMarginTop(5).setMarginBottom(5));
|
|
|
|
|
|
@@ -481,7 +495,7 @@ public abstract class DecisionHelper {
|
|
ItextPdfHelper.closePdf(doc);
|
|
ItextPdfHelper.closePdf(doc);
|
|
|
|
|
|
//更新文件路径
|
|
//更新文件路径
|
|
- String sql = "update sc_score_ym set review_log_file=? where cert_id=? and aspect_name=? and batch=? ";
|
|
|
|
|
|
+ sql = "update sc_score_ym set review_log_file=? where cert_id=? and aspect_name=? and batch=? ";
|
|
scoreYmDao.updateBySql(sql, file_name, score.getCert_id(), score.getAspect_name(), score.getBatch());
|
|
scoreYmDao.updateBySql(sql, file_name, score.getCert_id(), score.getAspect_name(), score.getBatch());
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|