|
|
@@ -3,6 +3,7 @@ package com.zd.laboratory.service.impl;
|
|
|
|
|
|
import com.zd.common.core.security.TokenService;
|
|
|
import com.zd.common.core.utils.DateUtils;
|
|
|
+import com.zd.common.core.utils.StringUtils;
|
|
|
import com.zd.laboratory.api.entity.LabMessageUser;
|
|
|
import com.zd.laboratory.api.vo.LabMessageUserListVO;
|
|
|
import com.zd.laboratory.domain.LabMessageDynamic;
|
|
|
@@ -225,54 +226,56 @@ public class LabMessageUserServiceImpl implements ILabMessageUserService {
|
|
|
// map.put("listModel",listTemp);//模板
|
|
|
// }
|
|
|
// map.put("labSecurityApply",labSecurityApplyVO);//安全准入申请信息
|
|
|
- map.put("applyId",labMessageDynamic.getDynamicId());//安全准入申请id
|
|
|
- if(labMessageDynamic.getMessClass()==1){
|
|
|
- //查询安全准入相关信息
|
|
|
- LabSecurityApplyVO labSecurityApplyVO = labSecurityApplyMapper.selectLabSecurityApplyById(labMessageDynamic.getDynamicId());
|
|
|
- R<SysUser> rDate =remoteUserService.getUserInfoByUserId(labSecurityApplyVO.getUserId(), SecurityConstants.INNER);
|
|
|
- SysUser sysUser = rDate.getData();
|
|
|
- labSecurityApplyVO.setSysUser(sysUser);
|
|
|
+ if(StringUtils.isNotNull(labMessageDynamic)){
|
|
|
+ map.put("applyId",labMessageDynamic.getDynamicId());//安全准入申请id
|
|
|
+ if(labMessageDynamic.getMessClass()==1){
|
|
|
+ //查询安全准入相关信息
|
|
|
+ LabSecurityApplyVO labSecurityApplyVO = labSecurityApplyMapper.selectLabSecurityApplyById(labMessageDynamic.getDynamicId());
|
|
|
+ R<SysUser> rDate =remoteUserService.getUserInfoByUserId(labSecurityApplyVO.getUserId(), SecurityConstants.INNER);
|
|
|
+ SysUser sysUser = rDate.getData();
|
|
|
+ labSecurityApplyVO.setSysUser(sysUser);
|
|
|
|
|
|
- List<LabSecurityMaterialDataVO> listTemp=Collections.emptyList();//模板
|
|
|
- //学生登录
|
|
|
- if(UserConstants.USER_TYPE_STUDENT.equals(sysUser.getUserType())){
|
|
|
- //模板查询
|
|
|
+ List<LabSecurityMaterialDataVO> listTemp=Collections.emptyList();//模板
|
|
|
+ //学生登录
|
|
|
+ if(UserConstants.USER_TYPE_STUDENT.equals(sysUser.getUserType())){
|
|
|
+ //模板查询
|
|
|
// listModel =labSecurityMaterialDataMapper.selectLabSecurityMaterialDataStudent(labSecurityApplyVO.getSubjectId());
|
|
|
- //模板查询
|
|
|
- listTemp =labSecurityMaterialDataMapper.selectLabSecurityMaterialDataStudent(labSecurityApplyVO.getSubjectId());
|
|
|
- for (int i=0;i<listTemp.size();i++){
|
|
|
- //如果是关联模板 查询出具体关联的内容
|
|
|
- if(1==listTemp.get(i).getMaterialType()){
|
|
|
- //上传材料查询
|
|
|
- LabSecurityMaterialrelation lmr = new LabSecurityMaterialrelation();
|
|
|
- lmr.setApplyId(labSecurityApplyVO.getId());
|
|
|
- lmr.setMaterialId(listTemp.get(i).getId());
|
|
|
- List<LabSecurityMaterialrelation> list =labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationList(lmr);
|
|
|
- listTemp.get(i).setListMr(list);
|
|
|
+ //模板查询
|
|
|
+ listTemp =labSecurityMaterialDataMapper.selectLabSecurityMaterialDataStudent(labSecurityApplyVO.getSubjectId());
|
|
|
+ for (int i=0;i<listTemp.size();i++){
|
|
|
+ //如果是关联模板 查询出具体关联的内容
|
|
|
+ if(1==listTemp.get(i).getMaterialType()){
|
|
|
+ //上传材料查询
|
|
|
+ LabSecurityMaterialrelation lmr = new LabSecurityMaterialrelation();
|
|
|
+ lmr.setApplyId(labSecurityApplyVO.getId());
|
|
|
+ lmr.setMaterialId(listTemp.get(i).getId());
|
|
|
+ List<LabSecurityMaterialrelation> list =labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationList(lmr);
|
|
|
+ listTemp.get(i).setListMr(list);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- map.put("listModel",listTemp);//模板
|
|
|
- }else if("11".equals(sysUser.getUserType())){
|
|
|
- //教职工 模板查询
|
|
|
+ map.put("listModel",listTemp);//模板
|
|
|
+ }else if("11".equals(sysUser.getUserType())){
|
|
|
+ //教职工 模板查询
|
|
|
// listModel= labSecurityMaterialDataMapper.selectLabSecurityMaterialDataTeacher(labSecurityApplyVO.getSubjectId());
|
|
|
- //教职工 模板查询
|
|
|
- listTemp= labSecurityMaterialDataMapper.selectLabSecurityMaterialDataTeacher(labSecurityApplyVO.getSubjectId());
|
|
|
- for (int i=0;i<listTemp.size();i++){
|
|
|
- //如果是关联模板 查询出具体关联的内容
|
|
|
- if(1==listTemp.get(i).getMaterialType()){
|
|
|
- //上传材料查询
|
|
|
- LabSecurityMaterialrelation lmr = new LabSecurityMaterialrelation();
|
|
|
- lmr.setApplyId(labSecurityApplyVO.getId());
|
|
|
- lmr.setMaterialId(listTemp.get(i).getId());
|
|
|
- List<LabSecurityMaterialrelation> list =labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationList(lmr);
|
|
|
- listTemp.get(i).setListMr(list);
|
|
|
+ //教职工 模板查询
|
|
|
+ listTemp= labSecurityMaterialDataMapper.selectLabSecurityMaterialDataTeacher(labSecurityApplyVO.getSubjectId());
|
|
|
+ for (int i=0;i<listTemp.size();i++){
|
|
|
+ //如果是关联模板 查询出具体关联的内容
|
|
|
+ if(1==listTemp.get(i).getMaterialType()){
|
|
|
+ //上传材料查询
|
|
|
+ LabSecurityMaterialrelation lmr = new LabSecurityMaterialrelation();
|
|
|
+ lmr.setApplyId(labSecurityApplyVO.getId());
|
|
|
+ lmr.setMaterialId(listTemp.get(i).getId());
|
|
|
+ List<LabSecurityMaterialrelation> list =labSecurityMaterialrelationMapper.selectLabSecurityMaterialrelationList(lmr);
|
|
|
+ listTemp.get(i).setListMr(list);
|
|
|
+ }
|
|
|
}
|
|
|
+ map.put("listModel",listTemp);//模板
|
|
|
}
|
|
|
- map.put("listModel",listTemp);//模板
|
|
|
+ map.put("labSecurityApply",labSecurityApplyVO);//安全准入申请信息
|
|
|
+ }else if(labMessageDynamic.getMessClass()==2){
|
|
|
+ map.put("dynamicId",labMessageDynamic.getDynamicId());//随手拍主键id
|
|
|
}
|
|
|
- map.put("labSecurityApply",labSecurityApplyVO);//安全准入申请信息
|
|
|
- }else if(labMessageDynamic.getMessClass()==2){
|
|
|
- map.put("dynamicId",labMessageDynamic.getDynamicId());//随手拍主键id
|
|
|
}
|
|
|
return map;
|
|
|
}
|