Browse Source

上传物料的bug处理

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@7886 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 9 years ago
parent
commit
7a4cffecab

+ 2 - 2
src/main/java/com/uas/platform/b2b/service/impl/BaseInfoServiceImpl.java

@@ -229,11 +229,11 @@ public class BaseInfoServiceImpl implements BaseInfoService {
 			map.put("error", "物料已存在");
 			map.put("error", "物料已存在");
 			map.put("id", products.get(0).getId());
 			map.put("id", products.get(0).getId());
 		}
 		}
-		if (product != null) {
+		if (product.getId() != null) {
 			map.put("error", "该器件物料已存在,正在跳转详情页面.....");
 			map.put("error", "该器件物料已存在,正在跳转详情页面.....");
 			map.put("id", product.getId());
 			map.put("id", product.getId());
 		}
 		}
-		if (CollectionUtils.isEmpty(products) && product == null) {
+		if (CollectionUtils.isEmpty(products) && product.getId() == null) {
 			prodInfo.setUserUU(SystemSession.getUser().getUserUU());
 			prodInfo.setUserUU(SystemSession.getUser().getUserUU());
 			prodInfo.setEnUU(SystemSession.getUser().getEnterprise().getUu());
 			prodInfo.setEnUU(SystemSession.getUser().getEnterprise().getUu());
 			prodInfo.setSourceApp("B2B");
 			prodInfo.setSourceApp("B2B");