Browse Source

Merge branch 'dev' of wangjun/wlyy2.0 into dev

wangzhinan 4 years ago
parent
commit
d69368bacc

+ 7 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/survey/service/SurveyService.java

@ -760,7 +760,7 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
     * @param size
     * @return
     */
    public MixEnvelop findQuestionInfoList(String comment, String content, String tempQuestionCode,String tempOptionCode,Integer page,Integer size){
    public MixEnvelop findQuestionInfoList(String comment, String tempId,String content, String tempQuestionCode,String tempOptionCode,Integer page,Integer size){
        String totalSql ="SELECT " +
                " COUNT(1) AS total" +
@ -779,6 +779,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(StringUtils.isNotBlank(tempOptionCode)){
            totalSql += " AND t.temp_option_code ='"+tempOptionCode+"'";
        }
        if(StringUtils.isNotBlank(tempId)){
            totalSql += " AND t.survey_temp_code ='"+tempId+"'";
        }
        List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
        Long count = 0L;
@ -814,6 +817,9 @@ public class SurveyService extends BaseJpaService<WlyySurveyQuestionDO, SurveyQu
        if(StringUtils.isNotBlank(tempOptionCode)){
            sql += " AND t.temp_option_code ='"+tempOptionCode+"'";
        }
        if(StringUtils.isNotBlank(tempId)){
            sql += " AND t.survey_temp_code ='"+tempId+"'";
        }
        sql += " ORDER BY t.create_time DESC LIMIT " + (page - 1) * size + "," + size + " ";
        List<WlyySurveyUserAnswerDO> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(WlyySurveyUserAnswerDO.class));

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/survey/SurveyEndpoint.java

@ -208,6 +208,8 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "统计-查询问题情况")
    public MixEnvelop findQuestionInfoList(@ApiParam(name = "comment", value = "选项备注")
                                           @RequestParam(value = "comment",required = false) String comment,
                                           @ApiParam(name = "temId", value = "选项内容,问答题内容")
                                           @RequestParam(value = "temId",required = false)String temId,
                                           @ApiParam(name = "content", value = "选项内容,问答题内容")
                                           @RequestParam(value = "content",required = false)String content,
                                           @ApiParam(name = "tempQuestionCode", value = "问题code")
@ -218,7 +220,7 @@ public class SurveyEndpoint extends EnvelopRestEndpoint {
                                           @RequestParam(value = "page",required = true)Integer page,
                                           @ApiParam(name = "size", value = "每页大小")
                                           @RequestParam(value = "size",required = true)Integer size)throws Exception {
        return surveyService.findQuestionInfoList(comment,content,tempQuestionCode,tempOptionCode,page, size);
        return surveyService.findQuestionInfoList(comment,temId,content,tempQuestionCode,tempOptionCode,page, size);
    }
    @GetMapping(value = BaseHospitalRequestMapping.WlyySurvey.findAnswerList)
    @ApiOperation(value = "统计-综合查询问题答案")