|
@ -5,12 +5,9 @@ import com.yihu.wlyy.web.BaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@ -33,7 +30,8 @@ public class PatientQuestionnaireController extends BaseController {
|
|
|
@ApiParam(value = "问卷编码")
|
|
|
@RequestParam String id) {
|
|
|
try {
|
|
|
String patient = getUID();
|
|
|
String patient = getRepUID();
|
|
|
// String patient = getUID();
|
|
|
JSONObject jsonObject = patientQuestionnaireService.getSurveySummary(patient, id);
|
|
|
return write(200, "查询成功!", "data", jsonObject);
|
|
|
} catch (Exception e) {
|
|
@ -65,7 +63,8 @@ public class PatientQuestionnaireController extends BaseController {
|
|
|
public String saveAnswer(
|
|
|
@RequestParam String jsonData) {
|
|
|
try {
|
|
|
String patient = getUID();
|
|
|
String patient = getRepUID();
|
|
|
// String patient = getUID();
|
|
|
JSONObject json = new JSONObject(jsonData);
|
|
|
patientQuestionnaireService.saveAnswer(patient, json);
|
|
|
return write(200, "保存成功!");
|