he2802 3 жил өмнө
parent
commit
60d630d07f
27 өөрчлөгдсөн 261 нэмэгдсэн , 55 устгасан
  1. 13 1
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/goods/GoodsController.java
  2. 4 4
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserSubscribeController.java
  3. 4 3
      zhongzheng-api/src/main/java/com/zhongzheng/controller/plan/UserPlanController.java
  4. 3 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNumberGoodsQueryBo.java
  5. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamApplyMapper.java
  6. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamBeforeMapper.java
  7. 2 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamApplyServiceImpl.java
  8. 1 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamBeforeServiceImpl.java
  9. 6 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamApplyVo.java
  10. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamBeforeVo.java
  11. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsAddBo.java
  12. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsEditBo.java
  13. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/domain/Goods.java
  14. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java
  15. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java
  16. 7 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java
  17. 15 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsVo.java
  18. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayAisleServiceImpl.java
  19. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserPlanEditBo.java
  20. 3 2
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserPlanMapper.java
  21. 2 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserPlanService.java
  22. 6 4
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserPlanServiceImpl.java
  23. 2 2
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseSubjectMapper.xml
  24. 23 2
      zhongzheng-system/src/main/resources/mapper/modules/exam/ExamApplyMapper.xml
  25. 21 1
      zhongzheng-system/src/main/resources/mapper/modules/exam/ExamBeforeMapper.xml
  26. 50 2
      zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml
  27. 68 13
      zhongzheng-system/src/main/resources/mapper/modules/user/UserPlanMapper.xml

+ 13 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/goods/GoodsController.java

@@ -6,6 +6,8 @@ import java.util.Arrays;
 
 import com.zhongzheng.modules.bank.bo.ExamQuestionQueryBo;
 import com.zhongzheng.modules.bank.vo.ExamQuestionVo;
+import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
+import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.*;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
@@ -195,5 +197,15 @@ public class GoodsController extends BaseController {
         return toAjax(iGoodsService.updateFrontByEditBo(bo) ? 1 : 0);
     }
 
-
+    /**
+     * 查询考试配置绑定商品列表
+     */
+    @ApiOperation("查询前培或补考商品列表")
+    @PreAuthorize("@ss.hasPermi('system:goods:list')")
+    @GetMapping("/listGoods")
+    public TableDataInfo<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo) {
+        startPage();
+        List<ExamNumberGoodsVo> list = iGoodsService.listGoods(bo);
+        return getDataTable(list);
+    }
 }

+ 4 - 4
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserSubscribeController.java

@@ -35,7 +35,7 @@ import io.swagger.annotations.ApiOperation;
  * @author ruoyi
  * @date 2021-12-07
  */
-@Api(value = "用户预约考试控制器", tags = {"用户预约考试管理"})
+@Api(value = "报考数据控制器", tags = {"报考数据控制器"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
 @RequestMapping("/system/subscribe")
@@ -48,7 +48,7 @@ public class UserSubscribeController extends BaseController {
     /**
      * 查询用户预约考试列表
      */
-    @ApiOperation("查询用户预约考试列表")
+    @ApiOperation("查询报考数据列表")
     @PreAuthorize("@ss.hasPermi('system:subscribe:list')")
     @GetMapping("/list")
     public TableDataInfo<UserSubscribeVo> listSubscribe(UserSubscribeQueryBo bo) {
@@ -62,7 +62,7 @@ public class UserSubscribeController extends BaseController {
     /**
      * 修改用户预约考试
      */
-    @ApiOperation("批量取消预约,批量选考试登记状态,批量修改预约状态")
+    @ApiOperation("批量取消预约,批量选考试登记状态,批量修改预约状态,批量前培账号开通")
     @PreAuthorize("@ss.hasPermi('system:subscribe:edit')")
     @Log(title = "用户预约考试", businessType = BusinessType.UPDATE)
     @PostMapping("edit")
@@ -73,7 +73,7 @@ public class UserSubscribeController extends BaseController {
     /**
      * 修改用户预约考试
      */
-    @ApiOperation("批量取消预约,批量选考试登记状态")
+    @ApiOperation("批量选考试登记状态")
     @PreAuthorize("@ss.hasPermi('system:subscribe:edit')")
     @Log(title = "用户预约考试", businessType = BusinessType.UPDATE)
     @PostMapping()

+ 4 - 3
zhongzheng-api/src/main/java/com/zhongzheng/controller/plan/UserPlanController.java

@@ -7,6 +7,7 @@ import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.framework.web.service.*;
 import com.zhongzheng.modules.course.domain.Course;
 import com.zhongzheng.modules.course.vo.CourseVo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.user.entity.ClientLoginUser;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -108,13 +109,13 @@ public class UserPlanController extends BaseController {
     /**
      * 查询学习计划列表
      */
-    @ApiOperation("查询学员能生成学习计划的商品")
+    @ApiOperation("查询学员拥有商品能生成学习计划的商品")
     @PreAuthorize("@ss.hasPermi('system:plan:list')")
     @GetMapping("/listGoods")
-    public TableDataInfo<CourseVo> listCourse(UserPlanQueryBo bo) {
+    public TableDataInfo<GoodsVo> listGoods(UserPlanQueryBo bo) {
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());
-        List<CourseVo> list = iUserPlanService.listCourse(bo);
+        List<GoodsVo> list = iUserPlanService.listGoods(bo);
         return getDataTable(list);
     }
 }

+ 3 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNumberGoodsQueryBo.java

@@ -57,7 +57,9 @@ public class ExamNumberGoodsQueryBo extends BaseEntity {
 	@ApiModelProperty("业务层次id")
 	private Long businessId;
 	/** 项目ID */
-	@Excel(name = "项目ID")
 	@ApiModelProperty("项目ID")
 	private Long projectId;
+
+	@ApiModelProperty("1 前培 2补考")
+	private Long filtration;
 }

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

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.exam.mapper;
 
+import com.zhongzheng.modules.exam.bo.ExamApplyQueryBo;
 import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
 import com.zhongzheng.modules.exam.domain.ExamApply;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -30,4 +31,6 @@ public interface ExamApplyMapper extends BaseMapper<ExamApply> {
     List<ExamApplySiteTimeVo> addressTimeExam(Long id);
 
     ExamApplyVo selectByApply(Long applyId);
+
+    List<ExamApplyVo> queryExam(ExamApplyQueryBo bo);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamBeforeMapper.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.exam.mapper;
 
+import com.zhongzheng.modules.exam.bo.ExamBeforeQueryBo;
 import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
 import com.zhongzheng.modules.exam.domain.ExamBefore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -21,4 +22,6 @@ public interface ExamBeforeMapper extends BaseMapper<ExamBefore> {
     List<ExamNumberGoodsVo> examNumberGoodsVos(Long beforeId);
 
     ExamBeforeVo selectByBefore(Long beforeId);
+
+    List<ExamBeforeVo> queryBefore(ExamBeforeQueryBo bo);
 }

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

@@ -59,15 +59,8 @@ public class ExamApplyServiceImpl extends ServiceImpl<ExamApplyMapper, ExamApply
 
     @Override
     public List<ExamApplyVo> queryList(ExamApplyQueryBo bo) {
-        LambdaQueryWrapper<ExamApply> lqw = Wrappers.lambdaQuery();
-        lqw.eq(StrUtil.isNotBlank(bo.getApplyUrl()), ExamApply::getApplyUrl, bo.getApplyUrl());
-        lqw.like(StrUtil.isNotBlank(bo.getApplyName()), ExamApply::getApplyName, bo.getApplyName());
-        lqw.eq(StrUtil.isNotBlank(bo.getApplyIntroduce()), ExamApply::getApplyIntroduce, bo.getApplyIntroduce());
-        lqw.eq(bo.getApplyStatus() != null, ExamApply::getApplyStatus, bo.getApplyStatus());
-        lqw.eq(bo.getApplyStartTime() != null, ExamApply::getApplyStartTime, bo.getApplyStartTime());
-        lqw.eq(bo.getApplyEndTime() != null, ExamApply::getApplyEndTime, bo.getApplyEndTime());
-        lqw.in(bo.getStatus() != null, ExamApply::getStatus, bo.getStatus());
-        return entity2Vo(this.list(lqw));
+
+        return baseMapper.queryExam(bo);
     }
 
     /**

+ 1 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamBeforeServiceImpl.java

@@ -40,15 +40,7 @@ public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBef
 
     @Override
     public List<ExamBeforeVo> queryList(ExamBeforeQueryBo bo) {
-        LambdaQueryWrapper<ExamBefore> lqw = Wrappers.lambdaQuery();
-        lqw.eq(StrUtil.isNotBlank(bo.getCode()), ExamBefore::getCode, bo.getCode());
-        lqw.like(StrUtil.isNotBlank(bo.getBeforeName()), ExamBefore::getBeforeName, bo.getBeforeName());
-        lqw.eq(bo.getBeforeStartTime() != null, ExamBefore::getBeforeStartTime, bo.getBeforeStartTime());
-        lqw.eq(bo.getBeforeEndTime() != null, ExamBefore::getBeforeEndTime, bo.getBeforeEndTime());
-        lqw.eq(bo.getBeforeStatus() != null, ExamBefore::getBeforeStatus, bo.getBeforeStatus());
-        lqw.eq(bo.getBeforeUrl() != null, ExamBefore::getBeforeUrl, bo.getBeforeUrl());
-        lqw.in(bo.getStatus() != null, ExamBefore::getStatus, bo.getStatus());
-        return entity2Vo(this.list(lqw));
+        return baseMapper.queryBefore(bo);
     }
 
     /**

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamApplyVo.java

@@ -75,6 +75,12 @@ public class ExamApplyVo {
 	@ApiModelProperty("业务名称")
 	private String businessName;
 
+	@ApiModelProperty("取消人次")
+	private Long cancelPeople;
+
+	@ApiModelProperty("正常人次")
+	private Long people;
+
 
 	/** 考试编码 */
 	@ApiModelProperty("考试编码")

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamBeforeVo.java

@@ -85,6 +85,9 @@ public class ExamBeforeVo {
 	@ApiModelProperty("业务名称")
 	private String businessName;
 
+	@ApiModelProperty("正常人次")
+	private Long people;
+
 	@ApiModelProperty("商品")
 	private List<ExamNumberGoodsVo> examNumberGoods;
 

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsAddBo.java

@@ -135,4 +135,8 @@ public class GoodsAddBo {
     @ApiModelProperty("学习次数")
     private Long studyCount;
 
+    /** 前培和补考商品关联 */
+    @ApiModelProperty("前培和补考商品关联")
+    private Long makeGoodsId;
+
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/bo/GoodsEditBo.java

@@ -164,5 +164,9 @@ public class GoodsEditBo {
     @ApiModelProperty("学习次数")
     private Long studyCount;
 
+    /** 前培和补考商品关联 */
+    @ApiModelProperty("前培和补考商品关联")
+    private Long makeGoodsId;
+
 
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/domain/Goods.java

@@ -110,4 +110,7 @@ private static final long serialVersionUID=1L;
     private Long makeEndTime;
     /** 学习次数 */
     private Long studyCount;
+
+    /** 前培和补考商品关联 */
+    private Long makeGoodsId;
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java

@@ -3,6 +3,8 @@ package com.zhongzheng.modules.goods.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.course.bo.CourseQueryBo;
 import com.zhongzheng.modules.course.vo.CourseVo;
+import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
+import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
@@ -18,4 +20,6 @@ import java.util.List;
 public interface GoodsMapper extends BaseMapper<Goods> {
     List<GoodsVo> selectList(GoodsQueryBo bo);
     GoodsVo selectDetail(Long goodsId);
+
+    List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo);
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java

@@ -1,6 +1,8 @@
 package com.zhongzheng.modules.goods.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
+import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.*;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
@@ -63,4 +65,6 @@ public interface IGoodsService extends IService<Goods> {
     boolean insertFrontByAddBo(GoodsAddBo bo);
 
 	boolean updateFrontByEditBo(GoodsEditBo bo);
+
+	List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo);
 }

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -9,6 +9,8 @@ import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.CourseChapterSectionListAddBo;
 import com.zhongzheng.modules.course.domain.CourseChapterSection;
 import com.zhongzheng.modules.course.mapper.CourseChapterMapper;
+import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
+import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import com.zhongzheng.modules.goods.bo.*;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.domain.GoodsAttached;
@@ -333,4 +335,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);
     }
+
+    @Override
+    public List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo) {
+        return baseMapper.listGoods(bo);
+    }
 }

+ 15 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsVo.java

@@ -214,4 +214,19 @@ public class GoodsVo {
 	@Excel(name = "学习次数")
 	@ApiModelProperty("学习次数")
 	private Long studyCount;
+
+	/** 前培和补考商品关联 */
+	@Excel(name = "前培和补考商品关联")
+	@ApiModelProperty("前培和补考商品关联")
+	private Long makeGoodsId;
+
+	/** 前培和补考商品关联 */
+	@Excel(name = "前培和补考商品关联")
+	@ApiModelProperty("前培和补考商品关联商品名")
+	private String makeGoodsName;
+
+	/** 前培和补考商品关联 */
+	@Excel(name = "前培和补考商品关联")
+	@ApiModelProperty("前培和补考商品关联编码")
+	private String makeGoodsCode;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayAisleServiceImpl.java

@@ -83,6 +83,8 @@ public class PayAisleServiceImpl extends ServiceImpl<PayAisleMapper, PayAisle> i
             throw new RuntimeException("重复支付通道名字");
         }
         validEntityBeforeSave(add);
+        add.setCreateTime(DateUtils.getNowTime());
+        add.setUpdateTime(DateUtils.getNowTime());
         return this.save(add);
     }
 

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserPlanEditBo.java

@@ -74,7 +74,7 @@ public class UserPlanEditBo {
 
     /** 生成计划的课程 */
     @ApiModelProperty("生成计划的课程")
-    private Long[] courseId;
+    private Long[] goodsId;
 
 
 }

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserPlanMapper.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.user.mapper;
 
 import com.zhongzheng.modules.course.vo.CourseVo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.user.bo.UserPlanEditBo;
 import com.zhongzheng.modules.user.bo.UserPlanQueryBo;
 import com.zhongzheng.modules.user.domain.UserPlan;
@@ -16,7 +17,7 @@ import java.util.List;
  */
 public interface UserPlanMapper extends BaseMapper<UserPlan> {
 
-    Integer selectCountCourse(UserPlanEditBo bo);
+    List<GoodsVo> listGoods(UserPlanQueryBo bo);
 
-    List<CourseVo> listCourse(UserPlanQueryBo bo);
+    Integer selectCountGoods(UserPlanEditBo bo);
 }

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserPlanService.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.user.service;
 
 import com.zhongzheng.modules.course.vo.CourseVo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.user.domain.UserPlan;
 import com.zhongzheng.modules.user.vo.UserPlanVo;
 import com.zhongzheng.modules.user.bo.UserPlanQueryBo;
@@ -53,5 +54,5 @@ public interface IUserPlanService extends IService<UserPlan> {
 
     UserPlanVo listPlan(UserPlanEditBo bo);
 
-	List<CourseVo> listCourse(UserPlanQueryBo bo);
+	List<GoodsVo> listGoods(UserPlanQueryBo bo);
 }

+ 6 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserPlanServiceImpl.java

@@ -6,6 +6,7 @@ import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.vo.CourseVo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -118,10 +119,11 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
     }
 
     @Override
-    public List<CourseVo> listCourse(UserPlanQueryBo bo) {
-        return baseMapper.listCourse(bo);
+    public List<GoodsVo> listGoods(UserPlanQueryBo bo) {
+        return baseMapper.listGoods(bo);
     }
 
+
     /**
      * 保存前的数据校验
      *
@@ -129,9 +131,9 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
      */
     private void validEntityPlanBeforeSave(UserPlanEditBo bo){
         //判断是否课程已被生成过课程
-        Integer rank = baseMapper.selectCountCourse(bo);
+        Integer rank = baseMapper.selectCountGoods(bo);
         if (rank > 0){
-            throw new IllegalArgumentException("您当前有课程的计划,请到计划修改上修改计划");
+            throw new IllegalArgumentException("您当前商品的拥有计划,请到计划修改上修改计划");
         }
 
     }

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSubjectMapper.xml

@@ -76,10 +76,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </foreach>
         </if>
         <if test="educationId != null and educationId!=0 ">
-            and (SELECT COUNT(p.id) FROM course_subject_project t LEFT JOIN course_project_type p on t.project_id = p.id where p.education_id = #{educationId} ) > 0
+            and (SELECT COUNT(p.id) FROM course_subject_project t LEFT JOIN course_project_type p on t.project_id = p.id where p.education_id = #{educationId} AND t.subject_id = s.id ) > 0
         </if>
         <if test="projectId != null and projectId!=0 ">
-            and (SELECT COUNT(t.id) FROM course_subject_project t  where t.project_id = #{projectId}) > 0
+            and (SELECT COUNT(t.id) FROM course_subject_project t  where t.project_id = #{projectId} AND t.subject_id = s.id) > 0
         </if>
         <if test="subjectName != null and subjectName!='' ">
             AND s.subject_name = #{subjectName}

+ 23 - 2
zhongzheng-system/src/main/resources/mapper/modules/exam/ExamApplyMapper.xml

@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.exam.vo.ExamApplyVo" id="ExamApplyVo">
-        <result property="applyId" column="exam_apply_id"/>
+        <result property="applyId" column="apply_id"/>
         <result property="applyUrl" column="apply_url"/>
         <result property="applyName" column="apply_name"/>
         <result property="applyIntroduce" column="apply_introduce"/>
@@ -29,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="educationName" column="education_name"/>
         <result property="projectName" column="project_name"/>
         <result property="businessName" column="business_name"/>
+        <result property="cancelPeople" column="cancel_people"/>
+        <result property="people" column="people"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo" id="ExamNumberGoodsVoResult">
@@ -58,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="examTime" column="exam_time"/>
     </resultMap>
 
-    <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberQueryBo" resultMap="ExamNumberGoodsVoResult">
+    <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo" resultMap="ExamNumberGoodsVoResult">
         SELECT
         goods_id,
         goods_name,
@@ -143,4 +145,23 @@ and (SELECT COUNT(eay.apply_id) FROM exam_apply eay LEFT JOIN exam_apply_goods e
         where 1=1
           and ea.apply_id = #{applyId}
     </select>
+
+    <select id="queryExam" parameterType="com.zhongzheng.modules.exam.bo.ExamApplyQueryBo" resultMap="ExamApplyVo">
+        SELECT
+        * ,
+        (select cet.education_name FROM course_education_type cet where ea.education_type_id= cet.id) as education_name,
+        (select cpt.project_name FROM course_project_type cpt where ea.project_id= cpt.id) as project_name,
+        (select cb.business_name FROM course_business cb where ea.business_id= cb.id) as business_name,
+        (SELECT COUNT(us.apply_id) FROM user_subscribe us where us.apply_id = ea.apply_id and us.subscribe_status = 1) as people,
+        (SELECT COUNT(us.apply_id) FROM user_subscribe us where us.apply_id = ea.apply_id and us.subscribe_status = 2) as cancel_people
+        FROM
+        exam_apply ea
+        where 1=1
+        <if test="status != null and status.size()!=0 ">
+            AND ea.status in
+            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+    </select>
 </mapper>

+ 21 - 1
zhongzheng-system/src/main/resources/mapper/modules/exam/ExamBeforeMapper.xml

@@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="url" column="url"/>
         <result property="educationName" column="education_name"/>
         <result property="projectName" column="project_name"/>
+        <result property="people" column="people"/>
         <result property="businessName" column="business_name"/>
     </resultMap>
 
@@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="goodsStatus" column="goods_status"/>
     </resultMap>
 
-    <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberQueryBo" resultMap="ExamNumberGoodsVoResult">
+    <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo" resultMap="ExamNumberGoodsVoResult">
         SELECT
         goods_id,
         goods_name,
@@ -99,4 +100,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where 1=1
           and eb.before_id = #{beforeId}
     </select>
+
+    <select id="queryBefore" parameterType="com.zhongzheng.modules.exam.bo.ExamBeforeQueryBo" resultMap="ExamBeforeVo">
+        SELECT
+            *,
+            (select cet.education_name FROM course_education_type cet where eb.education_type_id= cet.id) as education_name,
+            (select cpt.project_name FROM course_project_type cpt where eb.project_id= cpt.id) as project_name,
+            (select cb.business_name FROM course_business cb where eb.business_id= cb.id) as business_name,
+            (SELECT COUNT(us.apply_id) FROM user_subscribe us where us.before_id = eb.before_id and us.before_status = 1) as people
+        FROM
+            exam_before eb
+                LEFT JOIN exam_before_url ebu on eb.before_url=ebu.before_url_id
+        where 1=1
+        <if test="status != null and status.size()!=0 ">
+            AND eb.status in
+            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+    </select>
 </mapper>

+ 50 - 2
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -92,6 +92,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="makeStartTime" column="make_start_time"/>
         <result property="makeEndTime" column="make_end_time"/>
         <result property="studyCount" column="study_count"/>
+        <result property="makeGoodsName" column="make_goods_name"/>
+        <result property="makeGoodsCode" column="make_goods_code"/>
+    </resultMap>
+
+    <resultMap type="com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo" id="ExamNumberGoodsVoResult">
+        <result property="id" column="id"/>
+        <result property="examNumberId" column="exam_number_id"/>
+        <result property="goodsId" column="goods_id"/>
+        <result property="goodsName" column="goods_name"/>
+        <result property="code" column="code"/>
+        <result property="standPrice" column="stand_price"/>
+        <result property="goodsStatus" column="goods_status"/>
     </resultMap>
 
     <select id="selectList" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="GoodsResultVo">
@@ -103,7 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cb.business_name,
         s.school_name,
         m.category_name,
-        ot.type AS template_type
+        ot.type AS template_type,
+        (SELECT gs.goods_name FROM goods gs where 1=1 and g.make_goods_id = gs.goods_id) as make_goods_name,
+        (SELECT gs.code FROM goods gs where 1=1 and g.make_goods_id = gs.goods_id) as make_goods_code
         FROM
         goods g
         LEFT JOIN pay_supply ps ON g.supply_id = ps.supply_id
@@ -169,7 +183,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             cb.business_name,
             s.school_name,
             m.category_name,
-            ot.type AS template_type
+            ot.type AS template_type,
+            (SELECT gs.goods_name FROM goods gs where 1=1 and g.make_goods_id = gs.goods_id) as make_goods_name,
+            (SELECT gs.code FROM goods gs where 1=1 and g.make_goods_id = gs.goods_id) as make_goods_code
         FROM
             goods g
                 LEFT JOIN pay_supply ps ON g.supply_id = ps.supply_id
@@ -182,4 +198,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
             g.goods_id = #{goodsId}
     </select>
+
+    <select id="listGoods" parameterType="com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo" resultMap="ExamNumberGoodsVoResult">
+        SELECT
+        goods_id,
+        goods_name,
+        CODE,
+        stand_price,
+        <if test="filtration != null and filtration == 1">
+            (case WHEN (SELECT COUNT(gs.goods_id) FROM goods gs where 1=1 and gs.make_goods_id = g.goods_id and gs.status =1 and gs.goods_type =4) >0 then 0 ELSE 1 end) as goods_status
+        </if>
+        <if test="filtration != null and filtration == 2">
+        (case WHEN (SELECT COUNT(gs.goods_id) FROM goods gs where 1=1 and gs.make_goods_id = g.goods_id and gs.status =1 and gs.goods_type =3) >0 then 0 ELSE 1 end) as goods_status
+        </if>
+        FROM
+        goods g
+        WHERE
+        1 = 1
+        and g.status in(1)
+        and g.goods_type=1
+        <if test="businessId != null and businessId != ''">
+            and g.business_id = #{businessId}
+        </if>
+        <if test="goodsId != null and goodsId != ''">
+            and g.goods_id = #{goodsId}
+        </if>
+        <if test="projectId != null and projectId != ''">
+            and g.project_id = #{projectId}
+        </if>
+        <if test="goodsType != null and goodsType != ''">
+            and g.goods_type = #{goodsType}
+        </if>
+    </select>
 </mapper>

+ 68 - 13
zhongzheng-system/src/main/resources/mapper/modules/user/UserPlanMapper.xml

@@ -21,18 +21,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="studyNum" column="study_num"/>
     </resultMap>
 
-    <select id="selectCountCourse" parameterType="com.zhongzheng.modules.user.bo.UserPlanEditBo"  resultType="int">
-        SELECT COUNT(c.source_id)
-        FROM user_plan_cource c LEFT JOIN user_plan u ON u.plan_id = c.plan_id
-        WHERE 1=1 and u.status=1
-        <if test="courseId != null and courseId !=''">
-            and c.source_id in
-            <foreach collection="courseId" open="(" separator="," close=")" item="courseId">
-                #{courseId}
-            </foreach>
-        </if>
-        <if test="userId != null and userId !=''">
-            and u.user_id = #{userId}
-        </if>
+    <resultMap type="com.zhongzheng.modules.goods.vo.GoodsVo" id="GoodsResultVo">
+        <result property="goodsId" column="goods_id"/>
+        <result property="year" column="year"/>
+        <result property="supplyId" column="supply_id"/>
+        <result property="goodsType" column="goods_type"/>
+        <result property="educationTypeId" column="education_type_id"/>
+        <result property="businessId" column="business_id"/>
+        <result property="schoolId" column="school_id"/>
+        <result property="majorId" column="major_id"/>
+        <result property="goodsName" column="goods_name"/>
+        <result property="standPrice" column="stand_price"/>
+        <result property="lowestPrice" column="lowest_price"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="status" column="status"/>
+        <result property="validityStartTime" column="validity_start_time"/>
+        <result property="validityEndTime" column="validity_end_time"/>
+        <result property="studyStartTime" column="study_start_time"/>
+        <result property="studyEndTime" column="study_end_time"/>
+        <result property="certificateIds" column="certificate_ids"/>
+        <result property="introduce" column="introduce"/>
+        <result property="suitableObject" column="suitable_object"/>
+        <result property="buyNote" column="buy_note"/>
+        <result property="pcDetailHtml" column="pc_detail_html"/>
+        <result property="mobileDetailHtml" column="mobile_detail_html"/>
+        <result property="goodsStatus" column="goods_status"/>
+        <result property="coverUrl" column="cover_url"/>
+        <result property="classHours" column="class_hours"/>
+        <result property="standPriceJson" column="stand_price_json"/>
+        <result property="code" column="code"/>
+        <result property="projectId" column="project_id"/>
+        <result property="goodsAuditionConfig" column="goods_audition_config"/>
+        <result property="goodsPhotographConfig" column="goods_photograph_config"/>
+        <result property="goodsAuditionExamConfig" column="goods_audition_exam_config"/>
+        <result property="goodsPlayConfig" column="goods_play_config"/>
+        <result property="goodsExamConfig" column="goods_exam_config"/>
+
+        <result property="supplyName" column="supply_name"/>
+        <result property="educationName" column="education_name"/>
+        <result property="projectName" column="project_name"/>
+        <result property="businessName" column="business_name"/>
+        <result property="schoolName" column="school_name"/>
+        <result property="categoryName" column="category_name"/>
+        <result property="handoutsId" column="handouts_id"/>
+        <result property="templateType" column="template_type"/>
+        <result property="period" column="period"/>
+        <result property="makeStartTime" column="make_start_time"/>
+        <result property="makeEndTime" column="make_end_time"/>
+        <result property="studyCount" column="study_count"/>
+        <result property="makeGoodsName" column="make_goods_name"/>
+        <result property="makeGoodsCode" column="make_goods_code"/>
+    </resultMap>
+
+
+
+    <select id="listGoods" parameterType="com.zhongzheng.modules.user.bo.UserPlanQueryBo"  resultMap="GoodsResultVo">
+        SELECT
+            g.*
+        FROM
+            goods g
+                LEFT JOIN order_goods og ON g.goods_id = og.goods_id
+                LEFT JOIN `order` o ON o.order_sn = og.order_sn
+        WHERE
+            o.user_id = #{userId}
+          AND og.refund_status in (0,3)
+          and og.`status`= 1
+          and og.pay_status in(2,3)
+          and g.goods_type =1
     </select>
 </mapper>