|
|
@@ -1,9 +1,11 @@
|
|
|
package com.uas.ps.inquiry.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.uas.ps.core.util.ContextUtils;
|
|
|
import com.uas.ps.entity.Product;
|
|
|
import com.uas.ps.entity.ProductUsers;
|
|
|
import com.uas.ps.entity.Status;
|
|
|
+import com.uas.ps.inquiry.AccessConfiguration;
|
|
|
import com.uas.ps.inquiry.dao.*;
|
|
|
import com.uas.ps.inquiry.entity.*;
|
|
|
import com.uas.ps.inquiry.model.*;
|
|
|
@@ -118,6 +120,16 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
*/
|
|
|
private final String CONSUMERAPP = "B2B,MALL,ERP";
|
|
|
|
|
|
+ /**
|
|
|
+ * 公共物料访问地址
|
|
|
+ */
|
|
|
+ private final String PS_PRODUCT_URL = ContextUtils.getBean(AccessConfiguration.class).getPsProductUrl();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公共消息访问地址
|
|
|
+ */
|
|
|
+ private final String PS_MESSAGE_URL = ContextUtils.getBean(AccessConfiguration.class).getPsMessageUrl();
|
|
|
+
|
|
|
/**
|
|
|
* 保存公共询价信息
|
|
|
*
|
|
|
@@ -160,7 +172,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
*/
|
|
|
private void notify(List<PurcInquiryItem> inquiryItems) {
|
|
|
for (PurcInquiryItem item : inquiryItems) {
|
|
|
- String url = "http://192.168.253.12:24000/productuser/getProductUsersByEnUUAndCmpCode";
|
|
|
+ String url = PS_PRODUCT_URL + "/productuser/getProductUsersByEnUUAndCmpCode";
|
|
|
JSONObject formData = new JSONObject();
|
|
|
formData.put("enUU", item.getInquiry().getEnUU());
|
|
|
formData.put("cmpCode", item.getCmpCode());
|
|
|
@@ -216,7 +228,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- HttpUtil.doPost("http://192.168.253.131:8080", FlexJsonUtils.toJsonDeep(models));
|
|
|
+ HttpUtil.doPost(PS_MESSAGE_URL, FlexJsonUtils.toJsonDeep(models));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -271,6 +283,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
item.setUserName(batch.getEm_name());
|
|
|
item.setUserTel(batch.getBip_mobile());
|
|
|
item.setUserCode(batch.getBip_buyercode());
|
|
|
+ item.setOfferAmount(0);
|
|
|
if(null != inquiry.getBi_date()) {
|
|
|
item.setDate(inquiry.getBi_date());
|
|
|
} else {
|
|
|
@@ -676,9 +689,10 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
info.expression(PredicateUtils.lte("date", new Date(filter.getEndDate()), false));
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(filter.getKeyword())) {
|
|
|
- SimpleExpression code = new SimpleExpression("cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE);
|
|
|
+ SimpleExpression cmpCode = new SimpleExpression("cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE);
|
|
|
SimpleExpression brand = new SimpleExpression("inbrand", filter.getKeyword(), CriterionExpression.Operator.LIKE);
|
|
|
- SimpleExpression[] simpleExpressions = new SimpleExpression[]{code, brand};
|
|
|
+ SimpleExpression code = new SimpleExpression("product.cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE);
|
|
|
+ SimpleExpression[] simpleExpressions = new SimpleExpression[]{cmpCode, code, brand};
|
|
|
LogicalExpression logicalExpression = PredicateUtils.or(simpleExpressions);
|
|
|
info.expression(logicalExpression);
|
|
|
}
|