|
@@ -52,29 +52,39 @@ public class MethodGoodsDemandService {
|
|
|
|
|
|
//获取需求表ID
|
|
|
Long id = item.getId();
|
|
|
+ so.delete("id");
|
|
|
//查询报价表
|
|
|
so.put("demandId",id);
|
|
|
//报价结果[0=待确认,1=确认,2=拒绝]
|
|
|
so.put("quotationResult",1);
|
|
|
so.put("deleteStatus",DeleteStatus.DELETE_STATUS_ON.getCode());
|
|
|
List<TbDemandQuotation> tbDemandQuotations = tbDemandQuotationMapper.getList(so);
|
|
|
- if(tbDemandQuotations.size() == 0)return;
|
|
|
- //查询商品基本信息
|
|
|
- TbDemandQuotation tbDemandQuotation = tbDemandQuotations.get(0);
|
|
|
- GoodsDto goodsDto = levelOneServerInterface.getByGoodsId(item.getLevelOneGoodsId());
|
|
|
+
|
|
|
//开始封装数据
|
|
|
GoodsDemandVo goodsDemandVo = new GoodsDemandVo();
|
|
|
+
|
|
|
+ //查询商品基本信息
|
|
|
+ GoodsDto goodsDto = levelOneServerInterface.getByGoodsId(item.getLevelOneGoodsId());
|
|
|
+ // TODO: 2023/8/8 获取商品图片暂时不需要
|
|
|
+ //goodsDemandVo.setGoodsImg(goodsDto.getAvatar());
|
|
|
+
|
|
|
goodsDemandVo.setGoodsDemandId(id);
|
|
|
- goodsDemandVo.setDemandQuotationId(tbDemandQuotation.getId());
|
|
|
- goodsDemandVo.setGoodsImg(goodsDto.getAvatar());
|
|
|
- goodsDemandVo.setGoodsName(goodsDto.getName());
|
|
|
- goodsDemandVo.setGroupName(item.getGoodsName());
|
|
|
- goodsDemandVo.setCreateName(tbDemandQuotation.getCreateName());
|
|
|
- goodsDemandVo.setCreateTime(tbDemandQuotation.getCreateTime());
|
|
|
- goodsDemandVo.setQuotation(tbDemandQuotation.getQuotation());
|
|
|
- goodsDemandVo.setRemark(tbDemandQuotation.getRemark());
|
|
|
goodsDemandVo.setGoodsQuantity(item.getGoodsQuantity());
|
|
|
goodsDemandVo.setGoodsDemandTime(item.getCreateTime());
|
|
|
+ goodsDemandVo.setGoodsName(item.getGoodsName());
|
|
|
+ goodsDemandVo.setIsOrders(item.getIsOrders());
|
|
|
+
|
|
|
+ // 获取收购商发布需求中,关联的已确认的报价信息
|
|
|
+ if(tbDemandQuotations.size() > 0) {
|
|
|
+ TbDemandQuotation tbDemandQuotation = tbDemandQuotations.get(0);
|
|
|
+ goodsDemandVo.setDemandQuotationId(tbDemandQuotation.getId());
|
|
|
+ goodsDemandVo.setCreateName(tbDemandQuotation.getCreateName());
|
|
|
+ goodsDemandVo.setCreateTime(tbDemandQuotation.getCreateTime());
|
|
|
+ goodsDemandVo.setQuotation(tbDemandQuotation.getQuotation());
|
|
|
+ goodsDemandVo.setRemark(tbDemandQuotation.getRemark());
|
|
|
+ goodsDemandVo.setGroupName(tbDemandQuotation.getGroupName());
|
|
|
+ }
|
|
|
+
|
|
|
//执行添加
|
|
|
resultList.add(goodsDemandVo);
|
|
|
|