|
|
@@ -311,7 +311,20 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PurcInquiry findInquiryById(Long id) {
|
|
|
- return purcInquiryDao.findOne(id);
|
|
|
+ PurcInquiry inquiry = purcInquiryDao.findOne(id);
|
|
|
+ if (!CollectionUtils.isEmpty(inquiry.getInquiryItems())) {
|
|
|
+ for (PurcInquiryItem item : inquiry.getInquiryItems()) {
|
|
|
+ if (null == item.getProductId()) {
|
|
|
+ Product product = new Product();
|
|
|
+ product.setTitle(item.getProdTitle());
|
|
|
+ product.setCmpCode(item.getCmpCode());
|
|
|
+ product.setBrand(item.getInbrand());
|
|
|
+ product.setSpec(item.getSpec());
|
|
|
+ item.setProduct(product);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return inquiry;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -823,6 +836,14 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
itemInfo.setAttachUrl(map.get("at_path").toString());
|
|
|
itemInfo.setAttachName(map.get("at_name").toString());
|
|
|
}
|
|
|
+ if (null == itemInfo.getProductId()) {
|
|
|
+ Product product = new Product();
|
|
|
+ product.setTitle(itemInfo.getProdTitle());
|
|
|
+ product.setCmpCode(itemInfo.getCmpCode());
|
|
|
+ product.setBrand(itemInfo.getInbrand());
|
|
|
+ product.setSpec(itemInfo.getSpec());
|
|
|
+ itemInfo.setProduct(product);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return IPageUtils.covert(itemInfoPage);
|
|
|
@@ -896,6 +917,14 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
itemInfo.setQuteId(item.getId());
|
|
|
itemInfo.setQuoted(Constant.YES);
|
|
|
}
|
|
|
+ if (null == itemInfo.getProductId()) {
|
|
|
+ Product product = new Product();
|
|
|
+ product.setTitle(itemInfo.getProdTitle());
|
|
|
+ product.setCmpCode(itemInfo.getCmpCode());
|
|
|
+ product.setBrand(itemInfo.getInbrand());
|
|
|
+ product.setSpec(itemInfo.getSpec());
|
|
|
+ itemInfo.setProduct(product);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return IPageUtils.covert(orders);
|
|
|
@@ -1018,6 +1047,14 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
itemInfo.setQuteId(item.getId());
|
|
|
itemInfo.setQuoted(Constant.YES);
|
|
|
}
|
|
|
+ if (null == itemInfo.getProductId()) {
|
|
|
+ Product product = new Product();
|
|
|
+ product.setTitle(itemInfo.getProdTitle());
|
|
|
+ product.setCmpCode(itemInfo.getCmpCode());
|
|
|
+ product.setBrand(itemInfo.getInbrand());
|
|
|
+ product.setSpec(itemInfo.getSpec());
|
|
|
+ itemInfo.setProduct(product);
|
|
|
+ }
|
|
|
return itemInfo;
|
|
|
}
|
|
|
|