Răsfoiți Sursa

入库申请

xiaof 4 ani în urmă
părinte
comite
bbb261dcbe

+ 18 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/bean/dto/ExamTaskDto.java

@@ -22,6 +22,8 @@ public class ExamTaskDto {
     private Boolean enable;
     private String createId;
     private Long createTime;
+    private String auditStatus;
+    private String reviewStatus;
 
     private List<BlurryUserDto> users;
 
@@ -152,4 +154,20 @@ public class ExamTaskDto {
     public void setUsers(List<BlurryUserDto> users) {
         this.users = users;
     }
+
+    public String getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(String auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public String getReviewStatus() {
+        return reviewStatus;
+    }
+
+    public void setReviewStatus(String reviewStatus) {
+        this.reviewStatus = reviewStatus;
+    }
 }

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

@@ -5,8 +5,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.qmth.distributed.print.business.bean.dto.BlurryUserDto;
 import com.qmth.distributed.print.business.bean.dto.ExamTaskDto;
-import com.qmth.distributed.print.business.bean.query.BlurryParam;
-import com.qmth.distributed.print.business.bean.query.ExamTaskParam;
 import com.qmth.distributed.print.business.entity.ExamTask;
 import org.apache.ibatis.annotations.Param;
 
@@ -25,4 +23,6 @@ public interface ExamTaskMapper extends BaseMapper<ExamTask> {
     IPage<ExamTaskDto> listPage(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("enable") Boolean enable, @Param("status") String status, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
 
     List<BlurryUserDto> listUser(@Param("schoolId") Long schoolId, @Param("param") String param);
+
+    IPage<ExamTaskDto> listTaskApply(Page<ExamTaskDto> page, @Param("schoolId") Long schoolId, @Param("auditStatus") String auditStatus, @Param("reviewStatus") String reviewStatus, @Param("cardRuleId") Long cardRuleId, @Param("courseCode") String courseCode, @Param("paperNumber") String paperNumber, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
 }

+ 2 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/ExamTaskService.java

@@ -40,4 +40,6 @@ public interface ExamTaskService extends IService<ExamTask> {
     List<ExamTaskImportDto> importFile(MultipartFile file, String md5, ApiUser apiUser);
 
     boolean saveBatch(ExamTask task);
+
+    IPage<ExamTaskDto> listTaskApply(Long schoolId, String auditStatus, String reviewStatus, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize);
 }

+ 7 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -139,4 +139,11 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
         }
         return this.saveBatch(list);
     }
+
+    @Override
+    public IPage<ExamTaskDto> listTaskApply(Long schoolId, String auditStatus, String reviewStatus, Long cardRuleId, String courseCode, String paperNumber, Long startTime, Long endTime, Integer pageNumber, Integer pageSize) {
+        Page<ExamTaskDto> page = new Page<>(pageNumber, pageSize);
+        IPage<ExamTaskDto> examTaskDtoIPage = this.baseMapper.listTaskApply(page, schoolId, auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime);
+        return examTaskDtoIPage;
+    }
 }

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/SysPrivilegeServiceImpl.java

@@ -80,7 +80,7 @@ public class SysPrivilegeServiceImpl extends ServiceImpl<SysPrivilegeMapper, Sys
         }
         // 修改
         else {
-            if (sysPrivilege != null && privilege.getId() != sysPrivilege.getId()) {
+            if (sysPrivilege != null && !Objects.equals(privilege.getId(), sysPrivilege.getId())) {
                 throw ExceptionResultEnum.ERROR.exception("名称已存在");
             }
             isSuccess = this.updateById(privilege);

+ 62 - 0
distributed-print-business/src/main/resources/mapper/ExamTaskMapper.xml

@@ -96,5 +96,67 @@
             </if>
         </where>
     </select>
+    <select id="listTaskApply" resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDto">
+        select * from (SELECT
+            a.id,
+            a.school_id schoolId,
+            a.course_code courseCode,
+            a.course_name courseName,
+            a.specialty,
+            a.paper_number paperNumber,
+            a.card_rule_id cardRuleId,
+            b.name cardRuleName,
+            a.user_id userId,
+            c.real_name userName,
+            a.start_time startTime,
+            a.end_time endTime,
+            a.status,
+            CASE
+                WHEN d.review = 0 THEN '--'
+                WHEN d.review = 1 AND a.review_status IS NULL THEN 'NOT_AUDITED'
+                ELSE 'AUDITED'
+            END auditStatus,
+            CASE
+                WHEN a.review_status IS NULL THEN '--'
+                ELSE a.review_status
+            END reviewStatus,
+            a.enable,
+            a.create_id createId,
+            a.create_time createTime
+        FROM
+            exam_task a
+                LEFT JOIN
+            basic_card_rule b ON a.card_rule_id = b.id
+                LEFT JOIN
+            sys_user c ON a.user_id = c.id
+                LEFT JOIN
+            basic_exam_rule d ON a.school_id = d.school_id) a
+        <where>
+            <if test="schoolId != null and schoolId != ''">
+                and a.schoolId = #{schoolId}
+            </if>
+            <if test="auditStatus != null">
+                and a.auditStatus = #{auditStatus}
+            </if>
+            <if test="reviewStatus != null and status != ''">
+                and a.reviewStatus = #{reviewStatus}
+            </if>
+            <if test="cardRuleId != null and cardRuleId != ''">
+                and a.cardRuleId = #{cardRuleId}
+            </if>
+            <if test="courseCode != null and courseCode != ''">
+                and a.courseCode = #{courseCode}
+            </if>
+            <if test="paperNumber != null and paperNumber != ''">
+                and a.paperNumber = #{paperNumber}
+            </if>
+            <if test="startTime != null and startTime != ''">
+                and a.startTime &gt;= #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and a.startTime &lt;= #{endTime}
+            </if>
+        </where>
+    </select>
 
 </mapper>

+ 5 - 5
distributed-print/src/main/java/com/qmth/distributed/print/api/BasicTemplateController.java

@@ -52,11 +52,11 @@ public class BasicTemplateController {
     @ApiOperation(value = "查询")
     @RequestMapping(value = "/list", method = RequestMethod.POST)
     public Result list(HttpServletRequest request,
-                       @RequestParam Boolean enable,
-                       @RequestParam String type,
-                       @RequestParam String name,
-                       @RequestParam Long startTime,
-                       @RequestParam Long endTime,
+                       @RequestParam(value = "enable",required = false) Boolean enable,
+                       @RequestParam(value = "type", required = false) String type,
+                       @RequestParam(value = "name", required = false) String name,
+                       @RequestParam(value = "startTime", required = false) Long startTime,
+                       @RequestParam(value = "endTime", required = false) Long endTime,
                        @RequestParam Integer pageNumber,
                        @RequestParam Integer pageSize) {
         ApiUser apiUser = RequestUtils.getApiUser(request);

+ 32 - 0
distributed-print/src/main/java/com/qmth/distributed/print/api/ExamTaskController.java

@@ -200,5 +200,37 @@ public class ExamTaskController {
         List<ReviewLogDto> list = examTaskReviewLogService.list(examTaskId);
         return ResultUtil.ok(list);
     }
+
+    /**
+     * 入库申请查询
+     * @param request
+     * @param auditStatus
+     * @param reviewStatus
+     * @param cardRuleId
+     * @param courseCode
+     * @param paperNumber
+     * @param startTime
+     * @param endTime
+     * @param pageNumber
+     * @param pageSize
+     * @return
+     */
+    @ApiOperation(value = "入库申请查询")
+    @RequestMapping(value = "/task_apply/list", method = RequestMethod.POST)
+    public Result reviewList(HttpServletRequest request,
+                             @RequestParam(value = "auditStatus", required = false) String auditStatus,
+                             @RequestParam(value = "reviewStatus", required = false) String reviewStatus,
+                             @RequestParam(value = "cardRuleId", required = false) Long cardRuleId,
+                             @RequestParam(value = "courseCode", required = false) String courseCode,
+                             @RequestParam(value = "paperNumber", required = false) String paperNumber,
+                             @RequestParam(value = "startTime", required = false) Long startTime,
+                             @RequestParam(value = "endTime", required = false) Long endTime,
+                             @RequestParam("pageNumber") Integer pageNumber,
+                             @RequestParam("pageSize") Integer pageSize
+                             ) {
+        ApiUser apiUser = RequestUtils.getApiUser(request);
+        IPage<ExamTaskDto> list = examTaskService.listTaskApply(apiUser.getSchoolId(), auditStatus, reviewStatus, cardRuleId, courseCode, paperNumber, startTime, endTime, pageNumber, pageSize);
+        return ResultUtil.ok(list);
+    }
 }