|
|
@@ -63,6 +63,9 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
@Autowired
|
|
|
private InquiryRemindDao remindDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ProductDao productDao;
|
|
|
+
|
|
|
/**
|
|
|
* 通过明细查询询价详情
|
|
|
*
|
|
|
@@ -71,7 +74,23 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PublicInquiryItem findById(Long id) {
|
|
|
- return infoDao.findOne(id);
|
|
|
+ PublicInquiryItem item = infoDao.findOne(id);
|
|
|
+ if (null != item.getProductId()) {
|
|
|
+ Product product = productDao.findOne(item.getProductId());
|
|
|
+ item.setProduct(product);
|
|
|
+ } else {
|
|
|
+ Product product = new Product();
|
|
|
+ product.setCode(item.getProdCode());
|
|
|
+ product.setSpec(item.getSpec());
|
|
|
+ product.setTitle(item.getProdTitle());
|
|
|
+ product.setCmpCode(item.getCmpCode());
|
|
|
+ product.setBrand(item.getInbrand());
|
|
|
+ if (null == product.getCode()) {
|
|
|
+ product.setCode(item.getCmpCode());
|
|
|
+ }
|
|
|
+ item.setProduct(product);
|
|
|
+ }
|
|
|
+ return item;
|
|
|
}
|
|
|
|
|
|
/**
|