|
@@ -26,8 +26,12 @@ import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
|
|
-import java.net.URLEncoder;
|
|
|
|
|
-import java.util.*;
|
|
|
|
|
|
|
+import java.net.*;
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 对接公共物料服务的接口
|
|
* 对接公共物料服务的接口
|
|
@@ -367,11 +371,14 @@ public class ProductUtils {
|
|
|
data.put("enUU", enUU);
|
|
data.put("enUU", enUU);
|
|
|
data.put("userUU", userUU);
|
|
data.put("userUU", userUU);
|
|
|
params.put("data", data);
|
|
params.put("data", data);
|
|
|
- Response res = HttpUtil.sendPostRequest(PRODUCT_PUBLIC_SERVICE_URL + "/productuser/coverToUserByIds", params);
|
|
|
|
|
- if (HttpStatus.OK.value() == res.getStatusCode()) {
|
|
|
|
|
|
|
+ Response res = null;
|
|
|
|
|
+ try {
|
|
|
|
|
+ res = HttpUtil.sendPostRequest(PRODUCT_PUBLIC_SERVICE_URL + "/productuser/coverToUserByIds", params);
|
|
|
return Integer.valueOf(res.getResponseText());
|
|
return Integer.valueOf(res.getResponseText());
|
|
|
- } else {
|
|
|
|
|
- throw new RuntimeException("批量转入个人物料库失败");
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
|
|
+ logger.error("coverToUserProd http response status error: " + resultCode);
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|