liupeng 4 年之前
父节点
当前提交
8e627944d7

+ 5 - 2
code/sapparent/sapservice/src/main/java/org/fouram/core/base/service/BaseService.java

@@ -141,6 +141,10 @@ public abstract class BaseService {
 		throw new PromptException(msg);
 	}
 
+	private String getPicklistLabelUrl(String optionId) {
+		return "https://api15.sapsf.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId + ")?$format=json";
+	}
+
 	public String getLabelValue(String optionId) {
 		if (Tools.isEmpty(optionId)) {
 			return "";
@@ -150,8 +154,7 @@ public abstract class BaseService {
 		} else {
 			String value = "";
 			try {
-				String url = "https://api15.sapsf.cn/odata/v2/PicklistLabel(locale='zh_CN',optionId=" + optionId
-						+ ")?$format=json";
+				String url = getPicklistLabelUrl(optionId);
 				JsonNode node = requestService.getForObject(url, getHttpHeaders());
 				value = JsonNodeUtil.getValue(node, "d", "label");
 			} catch (Exception e) {