话术修改
This commit is contained in:
parent
a9238baa3f
commit
8db78cbba8
@ -64,4 +64,12 @@ public interface TermBankMapper {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int deleteTermBankByIds(Long[] ids);
|
int deleteTermBankByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询父级信息
|
||||||
|
*
|
||||||
|
* @param parentTermCode 父级编号
|
||||||
|
* @return TermBank
|
||||||
|
*/
|
||||||
|
TermBank selectTermBankByParentTermCode(String parentTermCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,16 +12,23 @@ import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
|
|||||||
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientAllInfoView;
|
import com.xinelu.manage.domain.patientinfo.PatientAllInfoView;
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientAllInfoViewUppercase;
|
import com.xinelu.manage.domain.patientinfo.PatientAllInfoViewUppercase;
|
||||||
|
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
|
||||||
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentAddDTO;
|
||||||
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentDTO;
|
import com.xinelu.manage.dto.labelfieldcontent.LabelFieldContentDTO;
|
||||||
|
import com.xinelu.manage.dto.signpatientmanageroutenode.PatientTaskDto;
|
||||||
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||||
import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper;
|
import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper;
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientAllInfoViewMapper;
|
||||||
|
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||||
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
import com.xinelu.manage.service.labelfieldcontent.ILabelFieldContentService;
|
||||||
import com.xinelu.manage.vo.labelfieldcontent.*;
|
import com.xinelu.manage.vo.labelfieldcontent.*;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.jsoup.Jsoup;
|
||||||
|
import org.jsoup.nodes.Document;
|
||||||
|
import org.jsoup.nodes.Element;
|
||||||
|
import org.jsoup.select.Elements;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -50,6 +57,8 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
|
|||||||
private LabelFieldInfoMapper labelFieldInfoMapper;
|
private LabelFieldInfoMapper labelFieldInfoMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PatientAllInfoViewMapper patientAllInfoViewMapper;
|
private PatientAllInfoViewMapper patientAllInfoViewMapper;
|
||||||
|
@Resource
|
||||||
|
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询标签字段内容信息
|
* 查询标签字段内容信息
|
||||||
@ -193,6 +202,19 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
|
|||||||
if (ObjectUtils.isEmpty(patientId)) {
|
if (ObjectUtils.isEmpty(patientId)) {
|
||||||
throw new ServiceException("请选择患者!");
|
throw new ServiceException("请选择患者!");
|
||||||
}
|
}
|
||||||
|
PatientTaskDto patientTaskDto = new PatientTaskDto();
|
||||||
|
patientTaskDto.setPatientId(patientId);
|
||||||
|
List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
|
||||||
|
List<String> nodeContentList = nodeList.stream().filter(Objects::nonNull).map(SignPatientManageRouteNode::getNodeContent).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
String nodeContentListJoin = String.join(",", nodeContentList);
|
||||||
|
Document document = Jsoup.parse(nodeContentListJoin);
|
||||||
|
// 需要提取的span
|
||||||
|
List<String> string = new ArrayList<>();
|
||||||
|
Elements spanList = document.select("span[data-w-e-type]");
|
||||||
|
for (Element span : spanList) {
|
||||||
|
String paramKey = span.attr("data-fieldMark");
|
||||||
|
string.add(paramKey);
|
||||||
|
}
|
||||||
//根据patientId查询是否有已经维护的参数
|
//根据patientId查询是否有已经维护的参数
|
||||||
List<LabelFieldAndPartitionDict> labelFieldContents = labelFieldContentMapper.labelFieldAndPartitionDict(taskPartitionDictId, patientId, null);
|
List<LabelFieldAndPartitionDict> labelFieldContents = labelFieldContentMapper.labelFieldAndPartitionDict(taskPartitionDictId, patientId, null);
|
||||||
if (CollectionUtils.isNotEmpty(labelFieldContents)) {
|
if (CollectionUtils.isNotEmpty(labelFieldContents)) {
|
||||||
|
|||||||
@ -92,13 +92,17 @@ public class TermBankServiceImpl implements ITermBankService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult updateTermBank(TermBank termBank) {
|
public AjaxResult updateTermBank(TermBank termBank) {
|
||||||
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() < Constants.TERM_MAX_LEVEL) {
|
termBank.setTermLevel(1L);
|
||||||
termBank.setTermLevel(termBank.getTermLevel() + 1);
|
if (StringUtils.isNotBlank(termBank.getParentTermCode())) {
|
||||||
|
TermBank parentTermCode = termBankMapper.selectTermBankByParentTermCode(termBank.getParentTermCode());
|
||||||
|
if (Objects.nonNull(parentTermCode) && Objects.nonNull(parentTermCode.getTermLevel())) {
|
||||||
|
termBank.setTermLevel(parentTermCode.getTermLevel() + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(termBank) && Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() > (Constants.TERM_MAX_LEVEL)) {
|
if (Objects.nonNull(termBank.getTermLevel()) && termBank.getTermLevel() > (Constants.TERM_MAX_LEVEL)) {
|
||||||
return AjaxResult.error("常用话术层数最大值为" + Constants.TERM_MAX_LEVEL + "层");
|
return AjaxResult.error("常用话术层数最大值为" + Constants.TERM_MAX_LEVEL + "层");
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(termBank) && StringUtils.isBlank(termBank.getParentTermCode())) {
|
if (StringUtils.isBlank(termBank.getParentTermCode())) {
|
||||||
termBank.setTermLevel(Constants.TERM_MIN_LEVEL);
|
termBank.setTermLevel(Constants.TERM_MIN_LEVEL);
|
||||||
}
|
}
|
||||||
termBank.setUpdateTime(LocalDateTime.now());
|
termBank.setUpdateTime(LocalDateTime.now());
|
||||||
|
|||||||
@ -331,12 +331,12 @@
|
|||||||
spmrn.route_node_name AS 'routeNodeName',
|
spmrn.route_node_name AS 'routeNodeName',
|
||||||
spmrn.task_type,
|
spmrn.task_type,
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN COALESCE(spmrn.phone_template_name, spmrn.follow_template_name)
|
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_template_name
|
||||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.questionnaire_name
|
||||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_name
|
||||||
END AS 'templateName',
|
END AS 'templateName',
|
||||||
CASE
|
CASE
|
||||||
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN COALESCE(spmrn.phone_id, spmrn.follow_template_id)
|
WHEN spmrn.task_type = 'PHONE_OUTBOUND' THEN spmrn.phone_id
|
||||||
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
WHEN spmrn.task_type = 'QUESTIONNAIRE_SCALE' THEN spmrn.question_info_id
|
||||||
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
WHEN spmrn.task_type = 'ARTIFICIAL_FOLLOW_UP' THEN spmrn.follow_template_id
|
||||||
END AS 'templateId',
|
END AS 'templateId',
|
||||||
|
|||||||
@ -185,4 +185,13 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectTermBankByParentTermCode" resultType="com.xinelu.manage.domain.termbank.TermBank">
|
||||||
|
<include refid="selectTermBankVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="parentTermCode != null and parentTermCode != ''">
|
||||||
|
and term_code = #{parentTermCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user