|
@@ -3,16 +3,13 @@ package com.zhongzheng.modules.exam.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamNumberGoodsQueryBo;
|
|
|
+import com.zhongzheng.modules.exam.bo.*;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamBeforeAddBo;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamBeforeQueryBo;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamBeforeEditBo;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamBefore;
|
|
|
import com.zhongzheng.modules.exam.mapper.ExamBeforeMapper;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamBeforeVo;
|
|
@@ -111,4 +108,19 @@ public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBef
|
|
|
public List<ExamNumberGoodsVo> listGoods(ExamNumberGoodsQueryBo bo) {
|
|
|
return baseMapper.listGoods(bo);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ExamBeforeVo getGoodsInfo(ExamBeforeQueryBo bo) {
|
|
|
+ ExamBeforeVo examBeforeVo = baseMapper.selectByBefore(bo.getBeforeId());
|
|
|
+ List<ExamNumberGoodsVo> examNumberGoodsVos = baseMapper.examNumberGoodsVos(bo.getBeforeId());
|
|
|
+ examBeforeVo.setExamNumberGoods(examNumberGoodsVos);
|
|
|
+ //初始化需要得到的数组
|
|
|
+ Long[] array = new Long[examNumberGoodsVos.size()];
|
|
|
+ //使用for循环得到数组
|
|
|
+ for(int i = 0; i < examNumberGoodsVos.size();i++){
|
|
|
+ array[i] = examNumberGoodsVos.get(i).getGoodsId();
|
|
|
+ }
|
|
|
+ examBeforeVo.setGoodsId(array);
|
|
|
+ return examBeforeVo;
|
|
|
+ }
|
|
|
}
|