调整逻辑

This commit is contained in:
wans 2021-06-28 17:05:04 +08:00
parent eff27b8cfb
commit b951422f9e
5 changed files with 31 additions and 9 deletions

View File

@ -46,6 +46,15 @@ public class PersonFilesServiceImpl extends DefaultBaseService implements IPerso
}
PageHelper.startPage(page.getPage(), page.getRows());
List<Map<String, Object>> list = personFilesDao.list(page.getParams());
if(list != null && list.size() > 0){
for (Map<String, Object> 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<Map<String, Object>> 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<String, Object> certificateMapping = personFilesDao.getCertificateMapping(params);
if(certificateMapping == null || certificateMapping.size() == 0){
return new HashMap<>(2);
}
String mappingCode = certificateMapping.get("mappingCode").toString();
String certificateB64 = "";
switch (mappingCode){

View File

@ -32,7 +32,7 @@ public class CertificateUtil {
public String getTS0002(ApplyStudentsNewDTO applyStudentsNewDTO){
Map<String, Object> 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;

View File

@ -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 @@
<if test="applyClassId != null and applyClassId != ''">
AND t1.apply_class_id = #{applyClassId}
</if>
<if test="bindUserAccount != null and bindUserAccount != ''">
AND t1.bind_user_account = #{bindUserAccount}
<if test="creator != null and creator != ''">
AND t1.creator = #{creator}
</if>
limit 1
</select>

View File

@ -109,6 +109,10 @@
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="showEvent">查看</a>';
return dom;
}
if(row['examType'] == '1' && row['examStatus'] == '0'){
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="showEvent">查看</a>';
return dom;
}
if(row['examStatus'] == '1'){
dom += '<a type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="showExamEvent">查看考试</a>';
return dom;
@ -128,6 +132,9 @@
if(row['examType'] === '0' && row['examStatus'] == '0'){
return '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">申请中</a>';
}
if(row['examType'] === '1' && row['examStatus'] == '0'){
return '<a type="button" class="layui-btn layui-btn-warm layui-btn-xs">等待分配考场</a>';
}
if(row['examStatus'] == '1'){
dom += '<a type="button" class="layui-btn layui-btn-info layui-btn-xs">申请通过</a>';
return dom;

View File

@ -83,7 +83,9 @@
templet: function(row) {
var dom = '<div class="layui-btn-group">';
dom += '<button type="button" class="layui-btn layui-btn-xs" lay-event="showPersonFiles">查看详情</button>';
if(row['examPassingType'] == '1'){
dom += '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="showCertificate">查看证件</button>';
}
dom += '</div>';
return dom;
}