|
@ -5,6 +5,7 @@ import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.http.MediaType;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@ -45,4 +46,22 @@ public class OutpatientController extends BaseController {
|
|
return invalidUserException(e, -1, "获取门/急诊数据失败!");
|
|
return invalidUserException(e, -1, "获取门/急诊数据失败!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("XML转JSOn")
|
|
|
|
@RequestMapping(value = "/xmlToJson", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
|
|
|
|
@ResponseBody
|
|
|
|
public String xmlToJson(@ApiParam(name="strSSID",value="xml",defaultValue = "B09036263193")
|
|
|
|
@RequestParam(value="xml",required = true) String xml) {
|
|
|
|
try {
|
|
|
|
JSONObject result = outpatientService.xmlToJson(xml);
|
|
|
|
return write(200, "获取JSOn数据成功!", "data", result);
|
|
|
|
} catch (Exception e) {
|
|
|
|
error(e);
|
|
|
|
return invalidUserException(e, -1, "获取JSOn数据成功!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|