change 3 жил өмнө
parent
commit
17dc0eb24e

+ 9 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -27,6 +27,7 @@ import com.zhongzheng.modules.grade.bo.ClassGradeUserEditBo;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
 import com.zhongzheng.modules.grade.service.IClassGradeUserService;
+import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
 import java.util.Collection;
@@ -207,7 +208,14 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
                             userPeriodQueryBo.setChapterId(classPeriodChapterVo.getId());
                             userPeriodQueryBo.setModuleId(classPeriodVo.getId());
                             List<UserPeriodStatusVo> userPeriodStatusVos = userPeriodStatusService.selectPeriodStatus(userPeriodQueryBo);
-
+                            if (!CollectionUtils.isEmpty(userPeriodStatusVos)){
+                                UserPeriodStatusVo userPeriodStatusVo = userPeriodStatusVos.get(0);
+                                LambdaQueryWrapper<UserStudyRecordPhoto> lqw = Wrappers.lambdaQuery();
+                                lqw.eq(UserStudyRecordPhoto::getPeriodId,userPeriodStatusVo.getId());
+                                classPeriodSectionVo.setUserStudyRecordPhotoList(entity2PhotoVo(userStudyRecordPhotoService.list(lqw)));
+                                classPeriodSectionVo.setNumIndex(1L);
+                                classPeriodSectionVo.setNumList(Convert.toLong(userPeriodStatusVos.size()));
+                            }
                         }
                         classPeriodSectionVos.addAll(baseMapper.listperiodExam(classPeriodVo.getId(), bo.getGoodsId(),classPeriodVo.getCourseId(), bo.getUserId()));
                         classPeriodChapterVo.setClassPeriodSectionList(classPeriodSectionVos);

+ 16 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/vo/ClassPeriodSectionVo.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.grade.vo;
 
 import com.zhongzheng.common.annotation.Excel;
+import com.zhongzheng.modules.user.vo.UserStudyRecordPhotoVo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -81,6 +82,21 @@ public class ClassPeriodSectionVo {
 	@ApiModelProperty("审核数量")
 	private Long auditNum;
 
+	/** 當前位置 */
+	@Excel(name = "當前位置")
+	@ApiModelProperty("當前位置")
+	private Long numIndex;
+
+	/** 审核时间 */
+	@Excel(name = "共有多少條")
+	@ApiModelProperty("共有多少條")
+	private Long numList;
+
+	/** 审核时间 */
+	@Excel(name = "审核照片")
+	@ApiModelProperty("审核照片")
+	private List<UserStudyRecordPhotoVo> userStudyRecordPhotoList;
+
 
 	/** 审核数量*/
 	@Excel(name = "以往审核记录")

+ 17 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/impl/SysUserServiceImpl.java

@@ -62,7 +62,23 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     @Override
     @DataScope(deptAlias = "d", userAlias = "u")
     public List<SysUser> selectUserList(SysUser user) {
-        return baseMapper.selectUserList(user);
+        List<SysUser> sysUsers = baseMapper.selectUserList(user);
+        for (SysUser sysUser : sysUsers) {
+            List<Long> testList = new ArrayList();
+            for (SysRole role : sysUser.getRoles()) {
+                testList.add(role.getRoleId());
+            }
+            //初始化需要得到的数组
+            Long[] array = new Long[testList.size()];
+
+            //使用for循环得到数组
+            for(int i = 0; i < testList.size();i++){
+                array[i] = testList.get(i);
+            }
+
+            sysUser.setRoleIds(array);
+        }
+        return sysUsers;
     }
 
     /**