Pārlūkot izejas kodu

Merge branch 'dev' of demon/patient-co-management into dev

zlf 8 gadi atpakaļ
vecāks
revīzija
f0be3679ae

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.app.record;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.SystemConf;
@ -8,10 +9,13 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
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.
@ -19,10 +23,13 @@ import java.util.List;
@Service
public class HealthDataService extends BaseService {
    @Autowired
    private ObjectMapper objectMapper;
    /**
     * 获取健康档案信息
     */
    public JSONObject getHealthData(String strSSID, String strEvent, String strCatalog, String strSerial) throws Exception {
    public Map getHealthData(String strSSID, String strEvent, String strCatalog, String strSerial) throws Exception {
        String url = SystemConf.getInstance().getSystemProperties().getProperty("sign_check_upload");
        url = url + "/third/smjk/HealthData";
@ -33,8 +40,7 @@ public class HealthDataService extends BaseService {
        params.add(new BasicNameValuePair("strSerial", strSerial));
        String response = HttpClientUtil.post(url, params, "UTF-8");
        JSONObject result = new JSONObject();
        Map result = new HashMap<>();
        if (!StringUtils.isEmpty(response)){
            JSONObject jsonObject = new JSONObject(response);
            int status = jsonObject.getInt("status");
@ -42,7 +48,7 @@ public class HealthDataService extends BaseService {
                String xmlData = jsonObject.getString("data");
                if (!StringUtils.isEmpty(xmlData)){
                    String xmlJson = XMLUtil.xml2json(xmlData);
                    result = new JSONObject(xmlJson);
                    result = objectMapper.readValue(xmlJson, Map.class);
                }
            }
        }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/record/OutpatientService.java


+ 3 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/record/HealthDataController.java

@ -5,7 +5,6 @@ import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
@ -14,6 +13,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Map;
/**
 * Created by zhenglingfeng on 2016/10/17.
 */
@ -42,7 +43,7 @@ public class HealthDataController extends BaseController {
                                @ApiParam(name="strSerial",value="该类别顺序号,默认填1",defaultValue = "1")
                                @RequestParam(value="strSerial",required = true) String strSerial) {
        try {
            JSONObject data = healthDataService.getHealthData(strSSID, strEvent, strCatalog, strSerial);
            Map data = healthDataService.getHealthData(strSSID, strEvent, strCatalog, strSerial);
            return write(200, "获取健康档案信息成功!", "data", data);
        } catch (Exception e) {