|
|
@@ -287,7 +287,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
product.setSourceApp(inquiryItem.getQutoApp());
|
|
|
product.setSpec(StringUtils.isEmpty(inquiryItem.getSpec()) ? inquiryItem.getCmpCode() : inquiryItem.getSpec());
|
|
|
product.setKind(inquiryItem.getProdTitle());
|
|
|
- product.setSpec((inquiryItem.getSpec() == null || inquiryItem.getSpec().equals("")) ? inquiryItem.getCmpCode() : inquiryItem.getSpec());
|
|
|
+ product.setSpec((inquiryItem.getSpec() == null || "".equals(inquiryItem.getSpec())) ? inquiryItem.getCmpCode() : inquiryItem.getSpec());
|
|
|
// 调用公共物料服务的接口
|
|
|
try {
|
|
|
String url = PS_PRODUCT_URL + "/product/save/inquiry";
|
|
|
@@ -299,7 +299,6 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
long start = System.currentTimeMillis();
|
|
|
String res = HttpUtil.doPost(url, FlexJsonUtils.toJsonDeep(product));
|
|
|
log.info("/product/save/inquiry 耗时:{}", (System.currentTimeMillis() - start));
|
|
|
- log.info("替代料报价,添加替代物料返回{}", res);
|
|
|
JSONObject result = JSONObject.parseObject(res);
|
|
|
Boolean success = (Boolean) result.get("success");
|
|
|
if (success) {
|
|
|
@@ -310,7 +309,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
} catch (Exception e) {
|
|
|
log.info("/product/save/inquiry 报价成功后保存到个人物料库中 出错:{}", e.getMessage());
|
|
|
e.printStackTrace();
|
|
|
- String reason = e.getMessage().length() > 10 ? e.getMessage().substring(0, 999).concat("") : e.getMessage();
|
|
|
+ String reason = e.getMessage().length() > 999 ? e.getMessage().substring(0, 999).concat("") : e.getMessage();
|
|
|
log.info("报价成功后保存到个人物料库,保存报价id【{}】到个人物料库失败,原因:{},UserUU:{}, EnUU:{},保存询价的应用:{}", inquiryItem.getId(), reason, product.getUserUU(), product.getEnUU(), inquiryItem.getSource());
|
|
|
}
|
|
|
}
|