|
@@ -15,6 +15,9 @@ import java.util.Set;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
+import com.ym.mec.biz.dal.page.GoodsQueryInfo;
|
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
|
+import com.ym.mec.util.collection.MapUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.ss.usermodel.PictureData;
|
|
import org.apache.poi.ss.usermodel.PictureData;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -670,4 +673,18 @@ public class GoodsServiceImpl extends BaseServiceImpl<Integer, Goods> implement
|
|
public List<GoodsSellDto> queryGoodsSellDtos(String goodsId) {
|
|
public List<GoodsSellDto> queryGoodsSellDtos(String goodsId) {
|
|
return goodsDao.queryGoodsSellDtos(goodsId);
|
|
return goodsDao.queryGoodsSellDtos(goodsId);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public PageInfo<Goods> queryGoodsPage(GoodsQueryInfo queryInfo) {
|
|
|
|
+ PageInfo<Goods> goodsPageInfo = this.queryPage(queryInfo);
|
|
|
|
+ List<Goods> rows = goodsPageInfo.getRows();
|
|
|
|
+ if(rows != null && rows.size() > 0){
|
|
|
|
+ List<Integer> goodsIds = rows.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
|
+ Map<Integer,String> goodsNameMap = MapUtil.convertMybatisMap(goodsDao.findGoodsOrganNames(goodsIds));
|
|
|
|
+ for (Goods row : rows) {
|
|
|
|
+ row.setOrganName(goodsNameMap.get(row.getId()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return goodsPageInfo;
|
|
|
|
+ }
|
|
}
|
|
}
|