Browse Source

xml头去除

demon 8 years ago
parent
commit
4f4a7b99e8

+ 1 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/HealthDataService.java

@ -4,7 +4,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.util.XMLUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
@ -13,9 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * Created by zhenglingfeng on 2016/10/17.
@ -46,7 +43,7 @@ public class HealthDataService extends BaseService {
            int status = jsonObject.getInt("status");
            if (status == 200){
                result = jsonObject.getString("data");
                result = result.replace("<\\?xml version=\"1.0\" encoding=\"utf-8\"\\?>","");
                result = result.replaceAll("<\\?xml version=\"1.0\" encoding=\"utf-8\"\\?>","");
                if (result.startsWith("error")) {
                    return result;
                }