问卷修改
This commit is contained in:
parent
1701804e7c
commit
eb277f29d6
@ -0,0 +1,38 @@
|
|||||||
|
package com.xinelu.common.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description 问卷中是否包含不满意项 整个问卷中是否包含异常项
|
||||||
|
* @Author zh
|
||||||
|
* @Date 2024-03-19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum ContentedAndRemarkableFlagEnum {
|
||||||
|
/**
|
||||||
|
* 不满意
|
||||||
|
*/
|
||||||
|
DISCONTENTED("DISCONTENTED"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满意
|
||||||
|
*/
|
||||||
|
CONTENTED("CONTENTED"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常的
|
||||||
|
*/
|
||||||
|
REMARKABLE("REMARKABLE"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正常的
|
||||||
|
*/
|
||||||
|
ROUTINE("ROUTINE"),
|
||||||
|
;
|
||||||
|
|
||||||
|
final private String info;
|
||||||
|
|
||||||
|
ContentedAndRemarkableFlagEnum(String info) {
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -102,6 +102,23 @@ public class PatientQuestionOptionResult extends BaseEntity {
|
|||||||
@Excel(name = "选项备注")
|
@Excel(name = "选项备注")
|
||||||
private String optionRemark;
|
private String optionRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String contentedFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String remarkableFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项表的ID
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String questionSubjectOptionId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@ -139,6 +139,11 @@ public class PatientQuestionSubjectResult extends BaseEntity {
|
|||||||
@Excel(name = "题目备注")
|
@Excel(name = "题目备注")
|
||||||
private String questionRemark;
|
private String questionRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问卷题目选项表的ID
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String questionSubjectOptionId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@ -168,6 +168,18 @@ public class PatientQuestionSubmitResult extends BaseEntity {
|
|||||||
|
|
||||||
private Long residentId;
|
private Long residentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String contentedFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String remarkableFlag;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|||||||
@ -91,6 +91,18 @@ public class QuestionSubjectOption extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String intent;
|
private String intent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含不满意项;DISCONTENTED:不满意;CONTENTED:满意;默认CONTENTED;
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String contentedFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冗余:整个问卷中是否包含异常项;REMARKABLE:异常的;ROUTINE:正常的;默认ROUTINE
|
||||||
|
* 2024/12/2
|
||||||
|
*/
|
||||||
|
private String remarkableFlag;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|||||||
@ -406,7 +406,9 @@ public class PatientInfoServiceImpl implements IPatientInfoService {
|
|||||||
//组装返回数据
|
//组装返回数据
|
||||||
List<PatientInfoImport> patientInfoImports = new ArrayList<>(patientInfoImportList);
|
List<PatientInfoImport> patientInfoImports = new ArrayList<>(patientInfoImportList);
|
||||||
patientInfoImportVO.setSn(sn);
|
patientInfoImportVO.setSn(sn);
|
||||||
|
if (CollectionUtils.isNotEmpty(departmentList) && departmentList.size() > 0) {
|
||||||
patientInfoImportVO.setDepartments(departmentList);
|
patientInfoImportVO.setDepartments(departmentList);
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(deptAliasVOS)) {
|
if (CollectionUtils.isNotEmpty(deptAliasVOS)) {
|
||||||
deptAliasVOS = deptAliasVOS.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getDeptAlias())).distinct().collect(Collectors.toList());
|
deptAliasVOS = deptAliasVOS.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getDeptAlias())).distinct().collect(Collectors.toList());
|
||||||
patientInfoImportVO.setDeptAliasVOS(deptAliasVOS);
|
patientInfoImportVO.setDeptAliasVOS(deptAliasVOS);
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.xinelu.manage.service.questioninfo.impl;
|
|||||||
|
|
||||||
import com.xinelu.common.annotation.DataScope;
|
import com.xinelu.common.annotation.DataScope;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
|
import com.xinelu.common.enums.ContentedAndRemarkableFlagEnum;
|
||||||
import com.xinelu.common.enums.QuestionnaireStatusEnum;
|
import com.xinelu.common.enums.QuestionnaireStatusEnum;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
@ -150,6 +151,12 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
|
|||||||
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
|
QuestionSubjectOption saveQuestionSubjectOption = new QuestionSubjectOption();
|
||||||
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
|
BeanUtils.copyBeanProp(saveQuestionSubjectOption, questionSubjectOption);
|
||||||
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
|
QuestionSubject questionSubject = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionNumber()) && questionSubjectOption.getQuestionNumber().compareTo(item.getQuestionNumber()) == 0).findFirst().orElse(new QuestionSubject());
|
||||||
|
if (StringUtils.isBlank(questionSubjectOption.getContentedFlag())){
|
||||||
|
saveQuestionSubjectOption.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(questionSubjectOption.getRemarkableFlag())){
|
||||||
|
saveQuestionSubjectOption.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
|
||||||
|
}
|
||||||
saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
|
saveQuestionSubjectOption.setQuestionnaireSubjectId(questionSubject.getId());
|
||||||
saveQuestionSubjectOption.setCreateTime(LocalDateTime.now());
|
saveQuestionSubjectOption.setCreateTime(LocalDateTime.now());
|
||||||
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
|
saveQuestionSubjectOption.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
|||||||
@ -16,19 +16,7 @@ import com.xinelu.common.constant.TaskNodeTypeConstants;
|
|||||||
import com.xinelu.common.constant.TaskStatisticsTypeConstants;
|
import com.xinelu.common.constant.TaskStatisticsTypeConstants;
|
||||||
import com.xinelu.common.constant.TemplateTypeConstants;
|
import com.xinelu.common.constant.TemplateTypeConstants;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.ErrorStatusEnum;
|
import com.xinelu.common.enums.*;
|
||||||
import com.xinelu.common.enums.NodeExecuteResultStatusEnum;
|
|
||||||
import com.xinelu.common.enums.NodeExecuteStatusEnum;
|
|
||||||
import com.xinelu.common.enums.PhoneConnectStatusEnum;
|
|
||||||
import com.xinelu.common.enums.PhoneDialMethodEnum;
|
|
||||||
import com.xinelu.common.enums.PhoneMessageRemindEnum;
|
|
||||||
import com.xinelu.common.enums.PhoneRedialTimesEnum;
|
|
||||||
import com.xinelu.common.enums.RouteNodeNameEnum;
|
|
||||||
import com.xinelu.common.enums.ShortMessageTypeEnum;
|
|
||||||
import com.xinelu.common.enums.SmsErrorCodeEnum;
|
|
||||||
import com.xinelu.common.enums.TaskContentEnum;
|
|
||||||
import com.xinelu.common.enums.TaskCreateTypeEnum;
|
|
||||||
import com.xinelu.common.enums.TaskNodeTypeEnum;
|
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.AgeUtil;
|
import com.xinelu.common.utils.AgeUtil;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
@ -449,6 +437,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
patientQuestionSubmitResult.setCreateBy(routeHandlePerson);
|
patientQuestionSubmitResult.setCreateBy(routeHandlePerson);
|
||||||
patientQuestionSubmitResult.setCreateTime(time);
|
patientQuestionSubmitResult.setCreateTime(time);
|
||||||
patientQuestionSubmitResult.setTaskExecuteRecordId(taskExecuteRecordId);
|
patientQuestionSubmitResult.setTaskExecuteRecordId(taskExecuteRecordId);
|
||||||
|
if (StringUtils.isBlank(dto.getContentedFlag())){
|
||||||
|
patientQuestionSubmitResult.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(dto.getRemarkableFlag())){
|
||||||
|
patientQuestionSubmitResult.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
|
||||||
|
}
|
||||||
// 新增患者问卷提交结果
|
// 新增患者问卷提交结果
|
||||||
if (patientQuestionSubmitResultMapper.insertPatientQuestionSubmitResult(patientQuestionSubmitResult) <= 0) {
|
if (patientQuestionSubmitResultMapper.insertPatientQuestionSubmitResult(patientQuestionSubmitResult) <= 0) {
|
||||||
throw new ServiceException("新增患者问卷提交结果失败");
|
throw new ServiceException("新增患者问卷提交结果失败");
|
||||||
@ -482,6 +476,12 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout
|
|||||||
saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
|
saveQuestionOption.setQuestionSubjectResultId(patientQuestionSubjectResult.getId());
|
||||||
saveQuestionOption.setCreateTime(time);
|
saveQuestionOption.setCreateTime(time);
|
||||||
saveQuestionOption.setCreateBy(routeHandlePerson);
|
saveQuestionOption.setCreateBy(routeHandlePerson);
|
||||||
|
if (StringUtils.isBlank(patientQuestionOptionResult.getContentedFlag())){
|
||||||
|
saveQuestionOption.setContentedFlag(ContentedAndRemarkableFlagEnum.CONTENTED.getInfo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(patientQuestionOptionResult.getRemarkableFlag())){
|
||||||
|
saveQuestionOption.setRemarkableFlag(ContentedAndRemarkableFlagEnum.ROUTINE.getInfo());
|
||||||
|
}
|
||||||
saveQuestionSubjectOptions.add(saveQuestionOption);
|
saveQuestionSubjectOptions.add(saveQuestionOption);
|
||||||
}
|
}
|
||||||
// 新增患者问卷题目选项提交结果
|
// 新增患者问卷题目选项提交结果
|
||||||
|
|||||||
@ -633,6 +633,7 @@
|
|||||||
FROM agency a
|
FROM agency a
|
||||||
LEFT JOIN department d ON a.id = d.hospital_agency_id
|
LEFT JOIN department d ON a.id = d.hospital_agency_id
|
||||||
where a.id = #{hospitalAgencyId}
|
where a.id = #{hospitalAgencyId}
|
||||||
|
and d.id is not null
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateDepartmentListByIds">
|
<update id="updateDepartmentListByIds">
|
||||||
|
|||||||
@ -19,6 +19,8 @@
|
|||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="speechContextText" column="speech_context_text"/>
|
<result property="speechContextText" column="speech_context_text"/>
|
||||||
<result property="intent" column="intent"/>
|
<result property="intent" column="intent"/>
|
||||||
|
<result property="contentedFlag" column="contented_flag"/>
|
||||||
|
<result property="remarkableFlag" column="remarkable_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectQuestionSubjectOptionVo">
|
<sql id="selectQuestionSubjectOptionVo">
|
||||||
@ -35,7 +37,9 @@
|
|||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
speech_context_text,
|
speech_context_text,
|
||||||
intent
|
intent,
|
||||||
|
contented_flag,
|
||||||
|
remarkable_flag
|
||||||
from question_subject_option
|
from question_subject_option
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -64,6 +68,12 @@
|
|||||||
<if test="optionRemark != null and optionRemark != ''">
|
<if test="optionRemark != null and optionRemark != ''">
|
||||||
and option_remark = #{optionRemark}
|
and option_remark = #{optionRemark}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contentedFlag != null and contentedFlag != ''">
|
||||||
|
and contented_flag = #{contentedFlag}
|
||||||
|
</if>
|
||||||
|
<if test="remarkableFlag != null and remarkableFlag != ''">
|
||||||
|
and remarkable_flag = #{remarkableFlag}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -103,6 +113,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="intent != null">intent,
|
<if test="intent != null">intent,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contentedFlag != null">contented_flag,
|
||||||
|
</if>
|
||||||
|
<if test="remarkableFlag != null">remarkable_flag,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="questionnaireSubjectId != null">#{questionnaireSubjectId},
|
<if test="questionnaireSubjectId != null">#{questionnaireSubjectId},
|
||||||
@ -131,6 +145,10 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="intent != null">#{intent},
|
<if test="intent != null">#{intent},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contentedFlag != null">#{contentedFlag},
|
||||||
|
</if>
|
||||||
|
<if test="remarkableFlag != null">#{remarkableFlag},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -176,6 +194,12 @@
|
|||||||
<if test="intent != null">intent =
|
<if test="intent != null">intent =
|
||||||
#{intent},
|
#{intent},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="contentedFlag != null">contented_flag =
|
||||||
|
#{contentedFlag},
|
||||||
|
</if>
|
||||||
|
<if test="remarkableFlag != null">remarkable_flag =
|
||||||
|
#{remarkableFlag},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -205,7 +229,9 @@
|
|||||||
create_by,
|
create_by,
|
||||||
create_time,
|
create_time,
|
||||||
speech_context_text,
|
speech_context_text,
|
||||||
intent
|
intent,
|
||||||
|
contented_flag,
|
||||||
|
remarkable_flag
|
||||||
) values
|
) values
|
||||||
<foreach item="QuestionSubjectOption" index="index" collection="list" separator=",">
|
<foreach item="QuestionSubjectOption" index="index" collection="list" separator=",">
|
||||||
(
|
(
|
||||||
@ -219,7 +245,9 @@
|
|||||||
#{QuestionSubjectOption.createBy},
|
#{QuestionSubjectOption.createBy},
|
||||||
#{QuestionSubjectOption.createTime},
|
#{QuestionSubjectOption.createTime},
|
||||||
#{QuestionSubjectOption.speechContextText},
|
#{QuestionSubjectOption.speechContextText},
|
||||||
#{QuestionSubjectOption.intent}
|
#{QuestionSubjectOption.intent},
|
||||||
|
#{QuestionSubjectOption.contentedFlag},
|
||||||
|
#{QuestionSubjectOption.remarkableFlag}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
@ -239,7 +267,9 @@
|
|||||||
update_by,
|
update_by,
|
||||||
update_time,
|
update_time,
|
||||||
speech_context_text,
|
speech_context_text,
|
||||||
intent
|
intent,
|
||||||
|
contented_flag,
|
||||||
|
remarkable_flag
|
||||||
from question_subject_option
|
from question_subject_option
|
||||||
<where>
|
<where>
|
||||||
<if test="questionSubjectIds != null and questionSubjectIds.size() > 0">
|
<if test="questionSubjectIds != null and questionSubjectIds.size() > 0">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user