瀏覽代碼

处理报价个人账户发起的询价单时空指针异常的问题。

dongbw 7 年之前
父節點
當前提交
98d0bf3e7d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/uas/ps/inquiry/service/impl/InquiryForSaleServiceImpl.java

+ 2 - 2
src/main/java/com/uas/ps/inquiry/service/impl/InquiryForSaleServiceImpl.java

@@ -779,7 +779,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
             result.put("message", "找不到当前公共询价");
             result.put("message", "找不到当前公共询价");
             return true;
             return true;
         }
         }
-        if (item.getInquiry() != null && item.getInquiry().getEnUU().equals(publicInquiryItem.getVendUU())) {
+        if (item.getInquiry() != null && publicInquiryItem.getVendUU().equals(item.getInquiry().getEnUU())) {
             result.put("message", "不能对自己单据进行报价");
             result.put("message", "不能对自己单据进行报价");
             return true;
             return true;
         }
         }
@@ -855,7 +855,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
             }
             }
             // 转报价后 主表信息保存
             // 转报价后 主表信息保存
             inquiry = new PublicInquiry(item.getInquiry());
             inquiry = new PublicInquiry(item.getInquiry());
-            if (null == inquiry.getEnName()) {
+            if (null == inquiry.getEnName() && null != inquiry.getEnUU()) {
                 Enterprise e = enterpriseDao.findOne(inquiry.getEnUU());
                 Enterprise e = enterpriseDao.findOne(inquiry.getEnUU());
                 inquiry.setEnName(e.getEnName());
                 inquiry.setEnName(e.getEnName());
             }
             }