|
@@ -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) {
|