|
|
@@ -450,21 +450,23 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
if (!CollectionUtils.isEmpty(inquiry.getInProducts())) {
|
|
|
for (BatchInProduct batch : inquiry.getInProducts()) {
|
|
|
PurcInquiryItem item = new PurcInquiryItem();
|
|
|
- item.setIsOpen(Constant.YES);
|
|
|
List<Product> products = productDao.findByEnUUAndCode(enuu, batch.getBip_prodcode());
|
|
|
- if (CollectionUtils.isEmpty(products)) {
|
|
|
- throw new NotFoundException("enUU:[" + enuu + "],编号:[" + batch.getBip_prodcode() + "]");
|
|
|
+ if (!CollectionUtils.isEmpty(products)) {
|
|
|
+ item.setProductId(products.get(0).getId());
|
|
|
+ item.setCmpCode(products.get(0).getCmpCode());
|
|
|
+ item.setInbrand(products.get(0).getBrand());
|
|
|
+ item.setProdTitle(products.get(0).getTitle());
|
|
|
+ item.setSpec(products.get(0).getSpec());
|
|
|
+ } else {
|
|
|
+ item.setCmpCode(batch.getPr_orispeccode());
|
|
|
+ item.setInbrand(batch.getPr_brand());
|
|
|
+ item.setProdTitle(batch.getPr_detail());
|
|
|
+ item.setSpec(batch.getPr_spec());
|
|
|
}
|
|
|
- item.setProductId(products.get(0).getId());
|
|
|
- item.setCmpCode(products.get(0).getCmpCode());
|
|
|
- item.setInbrand(products.get(0).getBrand());
|
|
|
- item.setProdTitle(products.get(0).getTitle());
|
|
|
- item.setSpec(products.get(0).getSpec());
|
|
|
+ item.setProdCode(batch.getBip_prodcode());
|
|
|
item.setRemark(batch.getBip_remark());
|
|
|
- item.setProdCode(products.get(0).getCode());
|
|
|
- item.setProdTitle(products.get(0).getTitle());
|
|
|
item.setNumber(batch.getBip_detno());
|
|
|
- item.setFromDate(new Date());
|
|
|
+ item.setFromDate(new Date(System.currentTimeMillis()));
|
|
|
item.setToDate(purcInquiry.getEndDate());
|
|
|
item.setStatus((short) Status.NOT_REPLY.value());
|
|
|
item.setIsOpen(Constant.YES);
|