Commit fc4f35e3 authored by 王琮's avatar 王琮

修改接口

parent a45dd97c
...@@ -48,7 +48,16 @@ public class QuestionnaireCtrl { ...@@ -48,7 +48,16 @@ public class QuestionnaireCtrl {
this.questionnaireService.delAnswer(recordId); this.questionnaireService.delAnswer(recordId);
//4.新增新的上报数据 //4.新增新的上报数据
List<Answer> answerList=questionnaire.getAnswersList(); List<Answer> answerList=questionnaire.getAnswersList();
result=this.questionnaireService.insertAnswer(answerList,recordId); if(answerList.size()>0) {
result = this.questionnaireService.insertAnswer(answerList, recordId);
} else if(answerList.size()==0&&questionnaire.getType()==2) {
result=1;
} else {
Map<String, Object> t = new HashMap();
t.put("result", false);
t.put("msg", "上传数据不能为空");
return t;
}
//5.根据类型判断是否修改上报状态 //5.根据类型判断是否修改上报状态
if(questionnaire.getType()==1) {//上报 if(questionnaire.getType()==1) {//上报
//修改数据上报状态 //修改数据上报状态
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment