diff --git a/src/main/java/cn/com/tenlion/service/personfiles/impl/PersonFilesServiceImpl.java b/src/main/java/cn/com/tenlion/service/personfiles/impl/PersonFilesServiceImpl.java index 5195cde..699c533 100644 --- a/src/main/java/cn/com/tenlion/service/personfiles/impl/PersonFilesServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/personfiles/impl/PersonFilesServiceImpl.java @@ -46,6 +46,15 @@ public class PersonFilesServiceImpl extends DefaultBaseService implements IPerso } PageHelper.startPage(page.getPage(), page.getRows()); List> list = personFilesDao.list(page.getParams()); + if(list != null && list.size() > 0){ + for (Map item : list){ + // 判断考试成绩是否已经录入 + String examGrade = item.get("exam_grade") == null ? "" : item.get("exam_grade").toString(); + if(examGrade != null && examGrade.length() > 0){ + item.put("examPassingType", "1"); + } + } + } PageInfo> pageInfo = new PageInfo<>(list); return new SuccessResultList(list, pageInfo.getPageNum(), pageInfo.getTotal()); } @@ -60,8 +69,11 @@ public class PersonFilesServiceImpl extends DefaultBaseService implements IPerso ApplyStudentsNewDTO applyStudentsNewDTO = studentsNewService.get(applyStudentsNewId); ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsNewDTO.getClassPlanId()); String workTypeId = classPlanDTO.getWorkerCatalog(); - params.put("workTypeId","9f1ac1a6-7c17-4e1f-a44b-0d2de9b623ef"); + params.put("workTypeId",workTypeId); Map certificateMapping = personFilesDao.getCertificateMapping(params); + if(certificateMapping == null || certificateMapping.size() == 0){ + return new HashMap<>(2); + } String mappingCode = certificateMapping.get("mappingCode").toString(); String certificateB64 = ""; switch (mappingCode){ diff --git a/src/main/java/cn/com/tenlion/util/CertificateUtil.java b/src/main/java/cn/com/tenlion/util/CertificateUtil.java index a689e99..ad7d472 100644 --- a/src/main/java/cn/com/tenlion/util/CertificateUtil.java +++ b/src/main/java/cn/com/tenlion/util/CertificateUtil.java @@ -32,7 +32,7 @@ public class CertificateUtil { public String getTS0002(ApplyStudentsNewDTO applyStudentsNewDTO){ Map query = new HashMap<>(8); query.put("applyClassId", applyStudentsNewDTO.getClassPlanId()); - query.put("bindUserAccount",applyStudentsNewDTO.getUserId()); + query.put("creator",applyStudentsNewDTO.getUserId()); ApplyStudentsDTO studentsDTO = studentsService.get(query); CardentialDTO cardentialDTO = new CardentialDTO(); cardentialDTO.setPhoto(studentsDTO.getApplyUserCardPhoto()); @@ -49,9 +49,9 @@ public class CertificateUtil { cardentialDTO.setIdentity(applyStudentsNewDTO.getCardNumber()); cardentialDTO.setDepartment(applyStudentsNewDTO.getWorkUnit()); cardentialDTO.setPosition(applyStudentsNewDTO.getWorkTitle()); - cardentialDTO.setSueDate(applyStudentsNewDTO.getGetCardTime()); - cardentialDTO.setStartDate(applyStudentsNewDTO.getGetCardTime()); - cardentialDTO.setEndDate(applyStudentsNewDTO.getGetCardTime()); + cardentialDTO.setSueDate(applyStudentsNewDTO.getCardTime().substring(0,10)); + cardentialDTO.setStartDate(applyStudentsNewDTO.getCardValidity()); + cardentialDTO.setEndDate(applyStudentsNewDTO.getCardValidityEnd()); cardentialDTO.setNumber(applyStudentsNewDTO.getIdCard()); cardentialDTO.setQrCode(""); String certificateB64; diff --git a/src/main/resources/mybatis/mapper/applystudents/apply-students-mapper.xml b/src/main/resources/mybatis/mapper/applystudents/apply-students-mapper.xml index 28f8b42..db92779 100644 --- a/src/main/resources/mybatis/mapper/applystudents/apply-students-mapper.xml +++ b/src/main/resources/mybatis/mapper/applystudents/apply-students-mapper.xml @@ -308,7 +308,8 @@ t1.apply_user_card_photo, t1.apply_audit_state, t1.apply_test_scores, - t1.bind_user_account + t1.bind_user_account, + t1.creator FROM e_apply_students t1 WHERE @@ -319,8 +320,8 @@ AND t1.apply_class_id = #{applyClassId} - - AND t1.bind_user_account = #{bindUserAccount} + + AND t1.creator = #{creator} limit 1 diff --git a/src/main/resources/static/route/classplan/list-report-exam.html b/src/main/resources/static/route/classplan/list-report-exam.html index 094a274..f20e448 100644 --- a/src/main/resources/static/route/classplan/list-report-exam.html +++ b/src/main/resources/static/route/classplan/list-report-exam.html @@ -109,6 +109,10 @@ dom += '查看'; return dom; } + if(row['examType'] == '1' && row['examStatus'] == '0'){ + dom += '查看'; + return dom; + } if(row['examStatus'] == '1'){ dom += '查看考试'; return dom; @@ -128,6 +132,9 @@ if(row['examType'] === '0' && row['examStatus'] == '0'){ return '申请中'; } + if(row['examType'] === '1' && row['examStatus'] == '0'){ + return '等待分配考场'; + } if(row['examStatus'] == '1'){ dom += '申请通过'; return dom; diff --git a/src/main/resources/static/route/personfiles/list-person-files.html b/src/main/resources/static/route/personfiles/list-person-files.html index 4407b5a..dd02e19 100644 --- a/src/main/resources/static/route/personfiles/list-person-files.html +++ b/src/main/resources/static/route/personfiles/list-person-files.html @@ -83,7 +83,9 @@ templet: function(row) { var dom = '
'; dom += ''; - dom += ''; + if(row['examPassingType'] == '1'){ + dom += ''; + } dom += '
'; return dom; }