change 3 жил өмнө
parent
commit
7774f5ee59

+ 12 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamApplyController.java

@@ -6,6 +6,7 @@ import java.util.Arrays;
 import com.zhongzheng.modules.exam.bo.*;
 import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
 import com.zhongzheng.modules.exam.service.IExamApplySiteService;
+import com.zhongzheng.modules.exam.vo.ExamApplySiteVo;
 import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -70,6 +71,17 @@ public class ExamApplyController extends BaseController {
         return AjaxResult.success(iExamApplyService.queryById(applyId));
     }
 
+    /**
+     * 获取考试地点 考培地点
+     */
+    @ApiOperation("获取考试安排详细信息")
+    @PreAuthorize("@ss.hasPermi('system:apply:query')")
+    @GetMapping("/siteInfo")
+    public TableDataInfo<ExamApplySiteVo> getSiteInfo(ExamApplyQueryBo bo) {
+        List<ExamApplySiteVo> examApplySiteVo = iExamApplyService.getSiteInfo(bo);
+        return getDataTable(examApplySiteVo);
+    }
+
     /**
      * 新增考试安排
      */

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamApplyQueryBo.java

@@ -37,6 +37,9 @@ public class ExamApplyQueryBo extends BaseEntity {
 	private String isAsc;
 
 
+	/** 考试Id */
+	@ApiModelProperty("考试Id")
+	private Long applyId;
 	/** 考试封面 */
 	@ApiModelProperty("考试封面")
 	private String applyUrl;
@@ -67,6 +70,10 @@ public class ExamApplyQueryBo extends BaseEntity {
 	@ApiModelProperty("教育类型id")
 	private Long educationTypeId;
 
+	/** 教育类型id */
+	@ApiModelProperty("1考试地点 2考培地点 ")
+	private Long addressStatus;
+
 	/** 业务层次id */
 	@ApiModelProperty("业务层次id")
 	private Long businessId;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamApplyMapper.java

@@ -24,7 +24,7 @@ public interface ExamApplyMapper extends BaseMapper<ExamApply> {
 
     List<ExamNumberGoodsVo> examNumberGoodsVos(Long applyId);
 
-    List<ExamApplySiteVo> addressExam(@Param("applyId") Long applyId,@Param("status") int i);
+    List<ExamApplySiteVo> addressExam(@Param("applyId") Long applyId,@Param("status") Long i);
 
     List<ExamApplySiteTimeVo> addressTimeExam(Long id);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamApplyService.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.exam.service;
 
 import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
 import com.zhongzheng.modules.exam.domain.ExamApply;
+import com.zhongzheng.modules.exam.vo.ExamApplySiteVo;
 import com.zhongzheng.modules.exam.vo.ExamApplyVo;
 import com.zhongzheng.modules.exam.bo.ExamApplyQueryBo;
 import com.zhongzheng.modules.exam.bo.ExamApplyAddBo;
@@ -53,4 +54,6 @@ public interface IExamApplyService extends IService<ExamApply> {
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
     List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo);
+
+	List<ExamApplySiteVo> getSiteInfo(ExamApplyQueryBo bo);
 }

+ 12 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamApplyServiceImpl.java

@@ -42,12 +42,12 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
         ExamApply db = this.baseMapper.selectById(applyId);
         ExamApplyVo examApplyVo = BeanUtil.toBean(db, ExamApplyVo.class);
         List<ExamNumberGoodsVo> examNumberGoodsVos = baseMapper.examNumberGoodsVos(applyId);
-        List<ExamApplySiteVo> examApplySite = baseMapper.addressExam(applyId,1);
+        List<ExamApplySiteVo> examApplySite = baseMapper.addressExam(applyId,1L);
         for (ExamApplySiteVo examApplySiteVo : examApplySite) {
             List<ExamApplySiteTimeVo> examApplySiteTime = baseMapper.addressTimeExam(examApplySiteVo.getId());
             examApplySiteVo.setExamApplySiteTime(examApplySiteTime);
         }
-        List<ExamApplySiteVo> examApplySiteTrain = baseMapper.addressExam(applyId,2);
+        List<ExamApplySiteVo> examApplySiteTrain = baseMapper.addressExam(applyId,2L);
         for (ExamApplySiteVo examApplySiteVo : examApplySiteTrain) {
             List<ExamApplySiteTimeVo> examApplySiteTime = baseMapper.addressTimeExam(examApplySiteVo.getId());
             examApplySiteVo.setExamApplySiteTime(examApplySiteTime);
@@ -143,4 +143,14 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
     public List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo) {
         return baseMapper.listGoods(bo);
     }
+
+    @Override
+    public List<ExamApplySiteVo> getSiteInfo(ExamApplyQueryBo bo) {
+        List<ExamApplySiteVo> examApplySite = baseMapper.addressExam(bo.getApplyId(),bo.getAddressStatus());
+        for (ExamApplySiteVo examApplySiteVo : examApplySite) {
+            List<ExamApplySiteTimeVo> examApplySiteTime = baseMapper.addressTimeExam(examApplySiteVo.getId());
+            examApplySiteVo.setExamApplySiteTime(examApplySiteTime);
+        }
+        return examApplySite;
+    }
 }