Browse Source

Merge remote-tracking branch 'origin/dev_v3.2.2' into dev_v3.2.2

wangliang 2 years ago
parent
commit
896d1243e1

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/mapper/ExamTaskMapper.java

@@ -31,9 +31,9 @@ public interface ExamTaskMapper extends BaseMapper<ExamTask> {
 
 
     List<BlurryUserDto> listUser(@Param("schoolId") Long schoolId, @Param("param") String param, @Param("orgIds") Set<Long> orgIds);
     List<BlurryUserDto> listUser(@Param("schoolId") Long schoolId, @Param("param") String param, @Param("orgIds") Set<Long> orgIds);
 
 
-    IPage<ExamTaskDto> listTaskApply(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("auditStatus") String auditStatus, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("dpr") DataPermissionRule dpr, @Param("userName") String userName);
+    IPage<ExamTaskDto> listTaskApply(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("auditStatus") String auditStatus, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime,@Param("userId") Long userId, @Param("userName") String userName);
 
 
-    IPage<ExamTaskDto> listTaskReviewUnaudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("dpr") DataPermissionRule dpr, @Param("startCreateTime") Long startCreateTime, @Param("endCreateTime") Long endCreateTime, @Param("createName") String createName, @Param("currentUserId") Long currentUserId);
+    IPage<ExamTaskDto> listTaskReviewUnaudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("startCreateTime") Long startCreateTime, @Param("endCreateTime") Long endCreateTime, @Param("createName") String createName, @Param("currentUserId") Long currentUserId);
 
 
     IPage<ExamTaskDto> listTaskReviewAudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("reviewStatus") String reviewStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds, @Param("startCreateTime") Long startCreateTime, @Param("endCreateTime") Long endCreateTime, @Param("createName") String createName, @Param("currentUserId") Long currentUserId);
     IPage<ExamTaskDto> listTaskReviewAudited(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("semesterId") Long semesterId, @Param("examId") Long examId, @Param("reviewStatus") String reviewStatus, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("userId") Long userId, @Param("cardRuleId") Long cardRuleId, @Param("startTime") Long startTime, @Param("endTime") Long endTime, @Param("orgIds") Set<Long> orgIds, @Param("startCreateTime") Long startCreateTime, @Param("endCreateTime") Long endCreateTime, @Param("createName") String createName, @Param("currentUserId") Long currentUserId);
 
 

+ 2 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -768,8 +768,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         userName = SystemConstant.translateSpecificSign(userName);
         userName = SystemConstant.translateSpecificSign(userName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
-        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskApply(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, auditStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, dpr, userName);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskApply(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, auditStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, sysUser.getId(), userName);
         for (ExamTaskDto record : examTaskDtoIPage.getRecords()) {
         for (ExamTaskDto record : examTaskDtoIPage.getRecords()) {
             if ((record.getReview() && FlowStatusEnum.FINISH.name().equals(record.getAuditStatus()) && !ExamModelEnum.MODEL3.equals(record.getExamModel()))) {
             if ((record.getReview() && FlowStatusEnum.FINISH.name().equals(record.getAuditStatus()) && !ExamModelEnum.MODEL3.equals(record.getExamModel()))) {
                 record.setApproveFormStatus(true);
                 record.setApproveFormStatus(true);
@@ -786,8 +785,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
         createName = SystemConstant.translateSpecificSign(createName);
         createName = SystemConstant.translateSpecificSign(createName);
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
         Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
-        DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(schoolId, sysUser.getId(), ServletUtil.getRequest().getServletPath());
-        return this.baseMapper.listTaskReviewUnaudited(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, dpr, startCreateTime, endCreateTime, createName, sysUser.getId());
+        return this.baseMapper.listTaskReviewUnaudited(new Page<>(pageNumber, pageSize), schoolId, semesterId, examId, courseCode, paperNumber, userId, cardRuleId, startTime, endTime, startCreateTime, endCreateTime, createName, sysUser.getId());
     }
     }
 
 
     @Override
     @Override

+ 3 - 22
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -226,6 +226,9 @@
         LEFT JOIN t_f_flow_join tffj on tffj.flow_id = e.flow_id
         LEFT JOIN t_f_flow_join tffj on tffj.flow_id = e.flow_id
         <where>
         <where>
             a.enable = true
             a.enable = true
+            <if test="userId != null and userId != ''">
+                and a.user_id = #{userId}
+            </if>
             <if test="schoolId != null and schoolId != ''">
             <if test="schoolId != null and schoolId != ''">
                 and a.school_id = #{schoolId}
                 and a.school_id = #{schoolId}
             </if>
             </if>
@@ -256,17 +259,6 @@
             <if test="userName != null and userName != ''">
             <if test="userName != null and userName != ''">
                 and c.real_name like concat('%',#{userName},'%')
                 and c.real_name like concat('%',#{userName},'%')
             </if>
             </if>
-            <if test="dpr != null">
-                <if test="dpr.requestUserId != null">
-                    AND a.create_id = #{dpr.requestUserId}
-                </if>
-                <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                    AND a.org_id IN
-                    <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
-                </if>
-            </if>
         </where>
         </where>
         order by a.id desc
         order by a.id desc
     </select>
     </select>
@@ -370,17 +362,6 @@
             <if test="createName != null and createName != ''">
             <if test="createName != null and createName != ''">
                 and d.real_name like concat('%',#{createName},'%')
                 and d.real_name like concat('%',#{createName},'%')
             </if>
             </if>
-            <if test="dpr != null">
-                <if test="dpr.requestUserId != null">
-                    AND a.create_id = #{dpr.requestUserId}
-                </if>
-                <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
-                    AND a.org_id IN
-                    <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
-                        #{item}
-                    </foreach>
-                </if>
-            </if>
         </where>
         </where>
         ) t
         ) t
         order by t.id desc
         order by t.id desc