|
|
@@ -147,7 +147,6 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
@Override
|
|
|
public void save(List<BatchInquiry> inquiries, Long enuu, String address) throws NotFoundException {
|
|
|
List<PurcInquiry> purcInquiries = covert(inquiries, enuu, address);
|
|
|
- List<PurcInquiryItem> inquiryItems = new ArrayList<>();
|
|
|
if(!CollectionUtils.isEmpty(purcInquiries)) {
|
|
|
for(PurcInquiry inquiry : purcInquiries) {
|
|
|
// 判断单号是否已存在
|
|
|
@@ -161,9 +160,8 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
}
|
|
|
try {
|
|
|
items = purcInquiryItemDao.save(items);
|
|
|
- inquiryItems.addAll(items);
|
|
|
- if (!CollectionUtils.isEmpty(inquiryItems)) {
|
|
|
- notify(inquiryItems, PRODUCERAPP);
|
|
|
+ if (!CollectionUtils.isEmpty(items)) {
|
|
|
+ notify(items, PRODUCERAPP);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -198,7 +196,8 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
for (ProductUsers user : users) {
|
|
|
User u = userDao.findOne(null != item.getInquiry().getRecorderUU() ? item.getInquiry().getRecorderUU() : 0L);
|
|
|
Enterprise e = enterpriseDao.findOne(item.getInquiry().getEnUU());
|
|
|
- String content = "发布关于“" + product.getTitle() + "”的公共询价信息,邀请您参与报价";
|
|
|
+ String cmp = product.getCmpCode().length() > 10 ? product.getCmpCode().substring(0, 10).concat("...") : product.getCmpCode();
|
|
|
+ String content = "发布关于“" + cmp + "”的公共询价信息,邀请您参与报价";
|
|
|
if (null != e) {
|
|
|
content = e.getEnName() + content;
|
|
|
} else if (null != u) {
|