科室问卷数量

This commit is contained in:
zhangheng 2024-06-07 09:28:46 +08:00
parent 8d143cdfe6
commit d7e7f32d8c
13 changed files with 205 additions and 70 deletions

View File

@ -26,7 +26,9 @@ public interface OperationInfoMapper {
* @param operationInfo 手术信息 * @param operationInfo 手术信息
* @return 手术信息集合 * @return 手术信息集合
*/ */
public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo); List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo);
List<OperationInfo> selectOperationList(OperationInfo operationInfo);
/** /**
* 新增手术信息 * 新增手术信息

View File

@ -29,6 +29,7 @@ public interface QuestionInfoMapper {
*/ */
List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo); List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo);
List<QuestionInfo> selectQuestionList(QuestionInfo questionInfo);
/** /**
* 新增问卷基本信息 * 新增问卷基本信息
* *

View File

@ -26,7 +26,7 @@ public interface ScriptInfoMapper {
* @param scriptInfo 话术信息 * @param scriptInfo 话术信息
* @return 话术信息集合 * @return 话术信息集合
*/ */
public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo); List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo);
/** /**
* 新增话术信息 * 新增话术信息

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.department.impl; package com.xinelu.manage.service.department.impl;
import com.xinelu.common.annotation.DataScope;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.entity.SysUser; import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
@ -15,16 +16,17 @@ import com.xinelu.manage.service.department.IDepartmentService;
import com.xinelu.manage.vo.department.DepartmentListVO; import com.xinelu.manage.vo.department.DepartmentListVO;
import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.department.DepartmentVO;
import com.xinelu.system.mapper.SysUserMapper; import com.xinelu.system.mapper.SysUserMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/** /**
@ -162,6 +164,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @param departmentDto 科室信息 * @param departmentDto 科室信息
* @return 结果 * @return 结果
*/ */
@DataScope(agencyAlias = "d", deptAlias = "si")
@Override @Override
public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) { public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) {
return departmentMapper.selectDepartmentListScriptNum(departmentDto); return departmentMapper.selectDepartmentListScriptNum(departmentDto);
@ -173,6 +176,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @param departmentDto 科室信息 * @param departmentDto 科室信息
* @return 结果 * @return 结果
*/ */
@DataScope(agencyAlias = "d", deptAlias = "oi")
@Override @Override
public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) { public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) {
return departmentMapper.selectDepartmentListOperationNum(departmentDto); return departmentMapper.selectDepartmentListOperationNum(departmentDto);
@ -184,6 +188,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @param departmentDto 科室信息 * @param departmentDto 科室信息
* @return 结果 * @return 结果
*/ */
@DataScope(agencyAlias = "d", deptAlias = "wt")
@Override @Override
public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) { public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) {
return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto); return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto);
@ -195,6 +200,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @param departmentDto 科室信息 * @param departmentDto 科室信息
* @return 结果 * @return 结果
*/ */
@DataScope(agencyAlias = "d", deptAlias = "tm")
@Override @Override
public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) { public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) {
return departmentMapper.selectDepartmentListMessageNum(departmentDto); return departmentMapper.selectDepartmentListMessageNum(departmentDto);
@ -253,6 +259,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* @param departmentDto 科室 * @param departmentDto 科室
* @return 结果 * @return 结果
*/ */
@DataScope(agencyAlias = "d", deptAlias = "sp")
@Override @Override
public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) { public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) {
return departmentMapper.selectListServicePackageNum(departmentDto); return departmentMapper.selectListServicePackageNum(departmentDto);

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.operationInfo.impl; package com.xinelu.manage.service.operationInfo.impl;
import com.xinelu.common.annotation.DataScope;
import com.xinelu.common.constant.Constants; import com.xinelu.common.constant.Constants;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
@ -45,9 +46,10 @@ public class OperationInfoServiceImpl implements IOperationInfoService {
* @param operationInfo 手术信息 * @param operationInfo 手术信息
* @return 手术信息 * @return 手术信息
*/ */
@DataScope(agencyAlias = "d", deptAlias = "oi")
@Override @Override
public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo) { public List<OperationInfo> selectOperationInfoList(OperationInfo operationInfo) {
return operationInfoMapper.selectOperationInfoList(operationInfo); return operationInfoMapper.selectOperationList(operationInfo);
} }
/** /**

View File

@ -82,9 +82,10 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService {
* @param questionInfo 问卷基本信息 * @param questionInfo 问卷基本信息
* @return 问卷基本信息 * @return 问卷基本信息
*/ */
@DataScope(agencyAlias = "dt", deptAlias = "qi")
@Override @Override
public List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo) { public List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo) {
return questionInfoMapper.selectQuestionInfoList(questionInfo); return questionInfoMapper.selectQuestionList(questionInfo);
} }
/** /**

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.scriptInfo.impl; package com.xinelu.manage.service.scriptInfo.impl;
import com.xinelu.common.annotation.DataScope;
import com.xinelu.common.config.SystemBusinessConfig; import com.xinelu.common.config.SystemBusinessConfig;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
@ -51,6 +52,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService {
* @param scriptInfo 话术信息 * @param scriptInfo 话术信息
* @return 话术信息 * @return 话术信息
*/ */
@DataScope(agencyAlias = "d", deptAlias = "si")
@Override @Override
public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo) { public List<ScriptInfo> selectScriptInfoList(ScriptInfo scriptInfo) {
return scriptInfoMapper.selectScriptInfoList(scriptInfo); return scriptInfoMapper.selectScriptInfoList(scriptInfo);

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.wechattemplate.impl; package com.xinelu.manage.service.wechattemplate.impl;
import com.xinelu.common.annotation.DataScope;
import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
@ -54,6 +55,7 @@ public class WechatTemplateServiceImpl implements IWechatTemplateService {
* @param wechatTemplateDto 微信模板信息 * @param wechatTemplateDto 微信模板信息
* @return 微信模板信息 * @return 微信模板信息
*/ */
@DataScope(agencyAlias = "d", deptAlias = "wt")
@Override @Override
public List<WechatTemplateTaskVO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto) { public List<WechatTemplateTaskVO> selectWechatTemplateList(WechatTemplateDTO wechatTemplateDto) {
// 查询微信模板信息列表 // 查询微信模板信息列表

View File

@ -180,6 +180,8 @@
<if test="scriptStatus != null and scriptStatus != ''"> <if test="scriptStatus != null and scriptStatus != ''">
and si.script_status = #{scriptStatus} and si.script_status = #{scriptStatus}
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
GROUP BY d.id, GROUP BY d.id,
d.department_name, d.department_name,
@ -203,6 +205,8 @@
'%' '%'
) )
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
GROUP BY d.id, GROUP BY d.id,
d.department_name, d.department_name,
@ -225,6 +229,8 @@
<if test="templateSource != null and templateSource != ''"> <if test="templateSource != null and templateSource != ''">
and wt.template_source =#{templateSource} and wt.template_source =#{templateSource}
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
GROUP BY d.id, GROUP BY d.id,
d.department_name, d.department_name,
@ -246,6 +252,8 @@
<if test="textMessageStatus != null and textMessageStatus != ''"> <if test="textMessageStatus != null and textMessageStatus != ''">
and tm.text_message_status = #{textMessageStatus} and tm.text_message_status = #{textMessageStatus}
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
GROUP BY d.id, GROUP BY d.id,
d.department_name, d.department_name,
@ -299,6 +307,8 @@
<if test="departmentName != null and departmentName != ''"> <if test="departmentName != null and departmentName != ''">
and d.department_name like concat('%',#{departmentName},'%') and d.department_name like concat('%',#{departmentName},'%')
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
GROUP BY d.id, GROUP BY d.id,
d.department_name, d.department_name,

View File

@ -55,25 +55,65 @@
) )
</if> </if>
<if test="operationCode != null and operationCode != ''"> <if test="operationCode != null and operationCode != ''">
and operation_code = and operation_code = #{operationCode}
#{operationCode}
</if> </if>
<if test="operationInfo != null and operationInfo != ''"> <if test="operationInfo != null and operationInfo != ''">
and operation_info = and operation_info = #{operationInfo}
#{operationInfo}
</if> </if>
<if test="operationRemark != null and operationRemark != ''"> <if test="operationRemark != null and operationRemark != ''">
and operation_remark = and operation_remark = #{operationRemark}
#{operationRemark}
</if> </if>
<if test="sort != null "> <if test="sort != null ">
and sort = and sort = #{sort}
#{sort}
</if> </if>
</where> </where>
order by create_time DESC order by create_time DESC
</select> </select>
<select id="selectOperationList" parameterType="OperationInfo" resultMap="OperationInfoResult">
select oi.id,
oi.department_id,
oi.department_name,
oi.operation_name,
oi.operation_code,
oi.operation_info,
oi.operation_remark,
oi.sort,
oi.create_by,
oi.create_time,
oi.update_by,
oi.update_time
from operation_info oi
left join department d on d.id = oi.department_id
<where>
<if test="departmentId != null ">
and oi.department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and oi.department_name like concat('%',#{departmentName},'%')
</if>
<if test="operationName != null and operationName != ''">
and oi.operation_name like concat('%',#{operationName},'%')
</if>
<if test="operationCode != null and operationCode != ''">
and oi.operation_code = #{operationCode}
</if>
<if test="operationInfo != null and operationInfo != ''">
and oi.operation_info = #{operationInfo}
</if>
<if test="operationRemark != null and operationRemark != ''">
and oi.operation_remark = #{operationRemark}
</if>
<if test="sort != null ">
and oi.sort = #{sort}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by create_time DESC
</select>
<select id="selectOperationInfoById" parameterType="Long" <select id="selectOperationInfoById" parameterType="Long"
resultMap="OperationInfoResult"> resultMap="OperationInfoResult">
<include refid="selectOperationInfoVo"/> <include refid="selectOperationInfoVo"/>

View File

@ -97,6 +97,70 @@
</where> </where>
</select> </select>
<select id="selectQuestionList" parameterType="QuestionInfo" resultMap="QuestionInfoResult">
select qi.id,
qi.department_id,
qi.department_name,
qi.disease_type_id,
qi.disease_type_name,
qi.questionnaire_name,
qi.questionnaire_description,
qi.answering_method,
qi.questionnaire_id,
qi.question_count,
qi.questionnaire_total_score,
qi.questionnaire_status,
qi.questionnaire_sort,
qi.questionnaire_remark,
qi.question_type,
qi.create_by,
qi.create_time,
qi.update_by,
qi.update_time
from question_info qi
left join department dt ON qi.department_id = dt.id
<where>
<if test="departmentId != null ">
and qi.department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and qi.department_name like concat('%', #{departmentName}, '%')
</if>
<if test="diseaseTypeId != null ">
and qi.disease_type_id = #{diseaseTypeId}
</if>
<if test="diseaseTypeName != null and diseaseTypeName != ''">
and qi.disease_type_name like concat('%', #{diseaseTypeName}, '%')
</if>
<if test="questionnaireName != null and questionnaireName != ''">
and qi.questionnaire_name like concat('%', #{questionnaireName}, '%')
</if>
<if test="questionnaireDescription != null and questionnaireDescription != ''">
and qi.questionnaire_description = #{questionnaireDescription}
</if>
<if test="answeringMethod != null and answeringMethod != ''">
and qi.answering_method = #{answeringMethod}
</if>
<if test="questionnaireId != null and questionnaireId != ''">
and qi.questionnaire_id = #{questionnaireId}
</if>
<if test="questionCount != null ">
and qi.question_count = #{questionCount}
</if>
<if test="questionnaireTotalScore != null ">
and qi.questionnaire_total_score = #{questionnaireTotalScore}
</if>
<if test="questionnaireStatus != null and questionnaireStatus != ''">
and qi.questionnaire_status = #{questionnaireStatus}
</if>
<if test="questionType != null and questionType != ''">
and qi.question_type = #{questionType}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
</select>
<select id="selectQuestionInfoById" parameterType="Long" <select id="selectQuestionInfoById" parameterType="Long"
resultMap="QuestionInfoResult"> resultMap="QuestionInfoResult">
<include refid="selectQuestionInfoVo"/> <include refid="selectQuestionInfoVo"/>
@ -263,7 +327,8 @@
dt.department_name, dt.department_name,
dt.department_code, dt.department_code,
count(qi.id) AS countNum, count(qi.id) AS countNum,
(select count(1) from question_info) totalNumber (select count(1) from question_info qi left join department dt on dt.id = qi.department_id <where>
${params.dataScope}</where>) totalNumber
from department dt left join question_info qi on dt.id = qi.department_id from department dt left join question_info qi on dt.id = qi.department_id
<where> <where>
<if test="departmentName != null and departmentName != ''"> <if test="departmentName != null and departmentName != ''">

View File

@ -48,70 +48,70 @@
</sql> </sql>
<select id="selectScriptInfoList" parameterType="ScriptInfo" resultMap="ScriptInfoResult"> <select id="selectScriptInfoList" parameterType="ScriptInfo" resultMap="ScriptInfoResult">
<include refid="selectScriptInfoVo"/> select si.id,
si.department_id,
si.department_name,
si.disease_type_id,
si.disease_type_name,
si.common_script_name,
si.script_name,
si.script_id,
si.platform_id,
si.script_status,
si.script_introduction,
si.script_sort,
si.script_remark,
si.script_file_path,
si.create_by,
si.create_time,
si.update_by,
si.update_time
from script_info si
left join department d on d.id = si.department_id
<where> <where>
<if test="departmentId != null "> <if test="departmentId != null ">
and department_id = and si.department_id =#{departmentId}
#{departmentId}
</if> </if>
<if test="departmentName != null and departmentName != ''"> <if test="departmentName != null and departmentName != ''">
and department_name like concat('%', and si.department_name like concat('%',#{departmentName}, '%' )
#{departmentName},
'%'
)
</if> </if>
<if test="diseaseTypeId != null "> <if test="diseaseTypeId != null ">
and disease_type_id = and si.disease_type_id =#{diseaseTypeId}
#{diseaseTypeId}
</if> </if>
<if test="diseaseTypeName != null and diseaseTypeName != ''"> <if test="diseaseTypeName != null and diseaseTypeName != ''">
and disease_type_name like concat('%', and si.disease_type_name like concat('%', #{diseaseTypeName},'%')
#{diseaseTypeName},
'%'
)
</if> </if>
<if test="commonScriptName != null and commonScriptName != ''"> <if test="commonScriptName != null and commonScriptName != ''">
and common_script_name like concat('%', and si.common_script_name like concat('%',#{commonScriptName},'%' )
#{commonScriptName},
'%'
)
</if> </if>
<if test="scriptName != null and scriptName != ''"> <if test="scriptName != null and scriptName != ''">
and script_name like concat('%', and si.script_name like concat('%', #{scriptName},'%' )
#{scriptName},
'%'
)
</if> </if>
<if test="scriptId != null and scriptId != ''"> <if test="scriptId != null and scriptId != ''">
and script_id = and si.script_id =#{scriptId}
#{scriptId}
</if> </if>
<if test="platformId != null and platformId != ''"> <if test="platformId != null and platformId != ''">
and platform_id = and si.platform_id =#{platformId}
#{platformId}
</if> </if>
<if test="scriptStatus != null and scriptStatus != ''"> <if test="scriptStatus != null and scriptStatus != ''">
and script_status = and si.script_status =#{scriptStatus}
#{scriptStatus}
</if> </if>
<if test="scriptIntroduction != null and scriptIntroduction != ''"> <if test="scriptIntroduction != null and scriptIntroduction != ''">
and script_introduction = and si.script_introduction =#{scriptIntroduction}
#{scriptIntroduction}
</if> </if>
<if test="scriptSort != null "> <if test="scriptSort != null ">
and script_sort = and si.script_sort =#{scriptSort}
#{scriptSort}
</if> </if>
<if test="scriptRemark != null and scriptRemark != ''"> <if test="scriptRemark != null and scriptRemark != ''">
and script_remark = and si.script_remark =#{scriptRemark}
#{scriptRemark}
</if> </if>
<if test="scriptFilePath != null and scriptFilePath != ''"> <if test="scriptFilePath != null and scriptFilePath != ''">
and script_file_path = and si.script_file_path =#{scriptFilePath}
#{scriptFilePath}
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
order by create_time DESC order by si.create_time DESC
</select> </select>
<select id="selectScriptInfoById" parameterType="Long" <select id="selectScriptInfoById" parameterType="Long"
@ -219,51 +219,51 @@
update script_info update script_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="departmentId != null">department_id = <if test="departmentId != null">department_id =
#{departmentId}, #{departmentId},
</if> </if>
<if test="departmentName != null">department_name = <if test="departmentName != null">department_name =
#{departmentName}, #{departmentName},
</if> </if>
disease_type_id = #{diseaseTypeId}, disease_type_id = #{diseaseTypeId},
disease_type_name = #{diseaseTypeName}, disease_type_name = #{diseaseTypeName},
<if test="commonScriptName != null">common_script_name = <if test="commonScriptName != null">common_script_name =
#{commonScriptName}, #{commonScriptName},
</if> </if>
<if test="scriptName != null">script_name = <if test="scriptName != null">script_name =
#{scriptName}, #{scriptName},
</if> </if>
<if test="scriptId != null">script_id = <if test="scriptId != null">script_id =
#{scriptId}, #{scriptId},
</if> </if>
<if test="platformId != null">platform_id = <if test="platformId != null">platform_id =
#{platformId}, #{platformId},
</if> </if>
<if test="scriptStatus != null">script_status = <if test="scriptStatus != null">script_status =
#{scriptStatus}, #{scriptStatus},
</if> </if>
<if test="scriptIntroduction != null">script_introduction = <if test="scriptIntroduction != null">script_introduction =
#{scriptIntroduction}, #{scriptIntroduction},
</if> </if>
<if test="scriptSort != null">script_sort = <if test="scriptSort != null">script_sort =
#{scriptSort}, #{scriptSort},
</if> </if>
<if test="scriptRemark != null">script_remark = <if test="scriptRemark != null">script_remark =
#{scriptRemark}, #{scriptRemark},
</if> </if>
<if test="scriptFilePath != null"> script_file_path= <if test="scriptFilePath != null">script_file_path=
#{scriptFilePath}, #{scriptFilePath},
</if> </if>
<if test="createBy != null">create_by = <if test="createBy != null">create_by =
#{createBy}, #{createBy},
</if> </if>
<if test="createTime != null">create_time = <if test="createTime != null">create_time =
#{createTime}, #{createTime},
</if> </if>
<if test="updateBy != null">update_by = <if test="updateBy != null">update_by =
#{updateBy}, #{updateBy},
</if> </if>
<if test="updateTime != null">update_time = <if test="updateTime != null">update_time =
#{updateTime}, #{updateTime},
</if> </if>
</trim> </trim>
where id = #{id} where id = #{id}

View File

@ -130,6 +130,7 @@
wtst.suit_task_type_name wtst.suit_task_type_name
from wechat_template wt from wechat_template wt
left join wechat_template_suit_task wtst on wt.id = wtst.wechat_template_id left join wechat_template_suit_task wtst on wt.id = wtst.wechat_template_id
left join department d on d.id = wt.department_id
<where> <where>
<if test="departmentId != null "> <if test="departmentId != null ">
and wt.department_id = and wt.department_id =
@ -151,6 +152,8 @@
and wt.template_source = and wt.template_source =
#{templateSource} #{templateSource}
</if> </if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where> </where>
order by wt.create_time DESC,wtst.create_time DESC order by wt.create_time DESC,wtst.create_time DESC
</select> </select>