修改科室病种查询。
This commit is contained in:
parent
c33bf19c68
commit
71d6ddbb38
@ -7,6 +7,8 @@ import com.xinelu.common.core.page.TableDataInfo;
|
|||||||
import com.xinelu.common.enums.BusinessType;
|
import com.xinelu.common.enums.BusinessType;
|
||||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||||
|
import com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto;
|
||||||
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -32,7 +34,7 @@ public class DepartmentDiseaseTypeController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:departmentDisease:list')")
|
@PreAuthorize("@ss.hasPermi('system:departmentDisease:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(DepartmentDiseaseType departmentDiseaseType) {
|
public TableDataInfo list(DepartmentDiseaseTypeDto departmentDiseaseType) {
|
||||||
startPage();
|
startPage();
|
||||||
List<DepartmentDiseaseType> list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -42,7 +44,7 @@ public class DepartmentDiseaseTypeController extends BaseController {
|
|||||||
* 查询科室病种信息列表 不分页 问卷使用
|
* 查询科室病种信息列表 不分页 问卷使用
|
||||||
*/
|
*/
|
||||||
@GetMapping("/diseaseList")
|
@GetMapping("/diseaseList")
|
||||||
public AjaxResult diseaseList(DepartmentDiseaseType departmentDiseaseType) {
|
public AjaxResult diseaseList(DepartmentDiseaseTypeDto departmentDiseaseType) {
|
||||||
return AjaxResult.success(departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType));
|
return AjaxResult.success(departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ public class DepartmentDiseaseTypeController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('system:departmentDisease:export')")
|
@PreAuthorize("@ss.hasPermi('system:departmentDisease:export')")
|
||||||
@Log(title = "科室病种信息", businessType = BusinessType.EXPORT)
|
@Log(title = "科室病种信息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, DepartmentDiseaseType departmentDiseaseType) {
|
public void export(HttpServletResponse response, DepartmentDiseaseTypeDto departmentDiseaseType) {
|
||||||
List<DepartmentDiseaseType> list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
ExcelUtil<DepartmentDiseaseType> util = new ExcelUtil<DepartmentDiseaseType>(DepartmentDiseaseType.class);
|
ExcelUtil<DepartmentDiseaseType> util = new ExcelUtil<DepartmentDiseaseType>(DepartmentDiseaseType.class);
|
||||||
util.exportExcel(response, list, "科室病种信息数据");
|
util.exportExcel(response, list, "科室病种信息数据");
|
||||||
@ -101,7 +103,7 @@ public class DepartmentDiseaseTypeController extends BaseController {
|
|||||||
* 科室病种数量
|
* 科室病种数量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectDiseaseCount")
|
@GetMapping("/selectDiseaseCount")
|
||||||
public AjaxResult selectDiseaseTypeCount(String departmentName) {
|
public AjaxResult selectDiseaseTypeCount(DepartmentDTO departmentDto) {
|
||||||
return departmentDiseaseTypeService.selectDiseaseTypeCount(departmentName);
|
return departmentDiseaseTypeService.selectDiseaseTypeCount(departmentDto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.xinelu.manage.dto.departmentdiseasetype;
|
||||||
|
|
||||||
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 科室病种查询传输对象
|
||||||
|
* @author: haown
|
||||||
|
* @create: 2024-07-12 13:34
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DepartmentDiseaseTypeDto extends DepartmentDiseaseType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属机构id
|
||||||
|
*/
|
||||||
|
private Long hospitalAgencyId;
|
||||||
|
}
|
||||||
@ -1,8 +1,9 @@
|
|||||||
package com.xinelu.manage.mapper.departmentdiseasetype;
|
package com.xinelu.manage.mapper.departmentdiseasetype;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||||
|
import com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto;
|
||||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ public interface DepartmentDiseaseTypeMapper {
|
|||||||
* @param departmentDiseaseType 科室病种信息
|
* @param departmentDiseaseType 科室病种信息
|
||||||
* @return 科室病种信息集合
|
* @return 科室病种信息集合
|
||||||
*/
|
*/
|
||||||
List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType);
|
List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseTypeDto departmentDiseaseType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增科室病种信息
|
* 新增科室病种信息
|
||||||
@ -64,8 +65,8 @@ public interface DepartmentDiseaseTypeMapper {
|
|||||||
/**
|
/**
|
||||||
* 科室病种数量
|
* 科室病种数量
|
||||||
*
|
*
|
||||||
* @param departmentName 科室名称
|
* @param departmentDto 查询条件
|
||||||
* @return DepartmentVO
|
* @return DepartmentVO
|
||||||
*/
|
*/
|
||||||
List<DepartmentVO> selectDiseaseTypeCount(String departmentName);
|
List<DepartmentVO> selectDiseaseTypeCount(DepartmentDTO departmentDto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,8 @@ package com.xinelu.manage.service.departmentdiseasetype;
|
|||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||||
|
import com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +28,7 @@ public interface IDepartmentDiseaseTypeService {
|
|||||||
* @param departmentDiseaseType 科室病种信息
|
* @param departmentDiseaseType 科室病种信息
|
||||||
* @return 科室病种信息集合
|
* @return 科室病种信息集合
|
||||||
*/
|
*/
|
||||||
List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType);
|
List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseTypeDto departmentDiseaseType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增科室病种信息
|
* 新增科室病种信息
|
||||||
@ -64,8 +65,8 @@ public interface IDepartmentDiseaseTypeService {
|
|||||||
/**
|
/**
|
||||||
* 科室病种信息信息
|
* 科室病种信息信息
|
||||||
*
|
*
|
||||||
* @param departmentName 科室信息
|
* @param departmentDto 科室信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
AjaxResult selectDiseaseTypeCount(String departmentName);
|
AjaxResult selectDiseaseTypeCount(DepartmentDTO departmentDto);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,17 +3,20 @@ package com.xinelu.manage.service.departmentdiseasetype.impl;
|
|||||||
import com.xinelu.common.constant.Constants;
|
import com.xinelu.common.constant.Constants;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
|
import com.xinelu.manage.domain.agency.Agency;
|
||||||
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
|
||||||
|
import com.xinelu.manage.dto.department.DepartmentDTO;
|
||||||
|
import com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto;
|
||||||
|
import com.xinelu.manage.mapper.agency.AgencyMapper;
|
||||||
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
|
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
|
||||||
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
|
||||||
|
import com.xinelu.manage.vo.department.DepartmentBaseVo;
|
||||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,6 +31,8 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
|
|||||||
private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper;
|
private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private GenerateSystemCodeUtil generateSystemCodeUtil;
|
private GenerateSystemCodeUtil generateSystemCodeUtil;
|
||||||
|
@Resource
|
||||||
|
private AgencyMapper agencyMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询科室病种信息
|
* 查询科室病种信息
|
||||||
@ -47,7 +52,7 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
|
|||||||
* @return 科室病种信息
|
* @return 科室病种信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType) {
|
public List<DepartmentDiseaseType> selectDepartmentDiseaseTypeList(DepartmentDiseaseTypeDto departmentDiseaseType) {
|
||||||
return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,22 +106,14 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
|
|||||||
/**
|
/**
|
||||||
* 科室病种数量
|
* 科室病种数量
|
||||||
*
|
*
|
||||||
* @param departmentName 科室名称
|
* @param departmentDto 科室名称
|
||||||
* @return DepartmentVO
|
* @return DepartmentVO
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectDiseaseTypeCount(String departmentName) {
|
public AjaxResult selectDiseaseTypeCount(DepartmentDTO departmentDto) {
|
||||||
DepartmentVO departmentVO = new DepartmentVO();
|
Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId());
|
||||||
List<DepartmentVO> department = new ArrayList<>();
|
List<DepartmentVO> departmentVOS = departmentDiseaseTypeMapper.selectDiseaseTypeCount(departmentDto);
|
||||||
departmentVO.setDepartmentName("全部");
|
return AjaxResult.success(DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName())
|
||||||
departmentVO.setCountNum(0);
|
.deptNumList(departmentVOS).build());
|
||||||
List<DepartmentVO> departmentVOS = departmentDiseaseTypeMapper.selectDiseaseTypeCount(departmentName);
|
|
||||||
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
|
||||||
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
|
||||||
departmentVO.setCountNum(result);
|
|
||||||
department.add(departmentVO);
|
|
||||||
department.addAll(departmentVOS);
|
|
||||||
}
|
|
||||||
return AjaxResult.success(department);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,7 @@ import com.xinelu.manage.domain.textmessage.TextMessage;
|
|||||||
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask;
|
||||||
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
import com.xinelu.manage.domain.wechattemplate.WechatTemplate;
|
||||||
import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask;
|
import com.xinelu.manage.domain.wechattemplatesuittask.WechatTemplateSuitTask;
|
||||||
|
import com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto;
|
||||||
import com.xinelu.manage.dto.knowledgebase.KnowledgeBaseSaveDto;
|
import com.xinelu.manage.dto.knowledgebase.KnowledgeBaseSaveDto;
|
||||||
import com.xinelu.manage.dto.operationinfo.BaseInfoQueryDto;
|
import com.xinelu.manage.dto.operationinfo.BaseInfoQueryDto;
|
||||||
import com.xinelu.manage.dto.operationinfo.OperationInfoDto;
|
import com.xinelu.manage.dto.operationinfo.OperationInfoDto;
|
||||||
@ -297,7 +298,7 @@ public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService {
|
|||||||
scriptInfo.setSourceTemplateId(sourceId);
|
scriptInfo.setSourceTemplateId(sourceId);
|
||||||
// 判断病种是否存在,不存在则要先增加病种
|
// 判断病种是否存在,不存在则要先增加病种
|
||||||
if (scriptInfo.getDiseaseTypeId() != null) {
|
if (scriptInfo.getDiseaseTypeId() != null) {
|
||||||
DepartmentDiseaseType departmentDiseaseType = new DepartmentDiseaseType();
|
DepartmentDiseaseTypeDto departmentDiseaseType = new DepartmentDiseaseTypeDto();
|
||||||
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
||||||
departmentDiseaseType.setDiseaseTypeName(scriptInfo.getDiseaseTypeName());
|
departmentDiseaseType.setDiseaseTypeName(scriptInfo.getDiseaseTypeName());
|
||||||
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
@ -328,7 +329,7 @@ public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService {
|
|||||||
wechatTemplateTaskDTO.setSourceTemplateId(sourceId);
|
wechatTemplateTaskDTO.setSourceTemplateId(sourceId);
|
||||||
// 判断病种是否存在,不存在则要先增加病种
|
// 判断病种是否存在,不存在则要先增加病种
|
||||||
if (wechatTemplate.getDiseaseTypeId() != null) {
|
if (wechatTemplate.getDiseaseTypeId() != null) {
|
||||||
DepartmentDiseaseType departmentDiseaseType = new DepartmentDiseaseType();
|
DepartmentDiseaseTypeDto departmentDiseaseType = new DepartmentDiseaseTypeDto();
|
||||||
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
||||||
departmentDiseaseType.setDiseaseTypeName(wechatTemplate.getDiseaseTypeName());
|
departmentDiseaseType.setDiseaseTypeName(wechatTemplate.getDiseaseTypeName());
|
||||||
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
@ -369,7 +370,7 @@ public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService {
|
|||||||
textMessageTaskDTO.setSourceTemplateId(sourceId);
|
textMessageTaskDTO.setSourceTemplateId(sourceId);
|
||||||
// 判断病种是否存在,不存在则要先增加病种
|
// 判断病种是否存在,不存在则要先增加病种
|
||||||
if (textMessage.getDiseaseTypeId() != null) {
|
if (textMessage.getDiseaseTypeId() != null) {
|
||||||
DepartmentDiseaseType departmentDiseaseType = new DepartmentDiseaseType();
|
DepartmentDiseaseTypeDto departmentDiseaseType = new DepartmentDiseaseTypeDto();
|
||||||
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
||||||
departmentDiseaseType.setDiseaseTypeName(textMessage.getDiseaseTypeName());
|
departmentDiseaseType.setDiseaseTypeName(textMessage.getDiseaseTypeName());
|
||||||
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
@ -453,7 +454,7 @@ public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService {
|
|||||||
servicePackageAddDTO.setDepartmentName(knowledgeBaseSaveDto.getDepartmentName());
|
servicePackageAddDTO.setDepartmentName(knowledgeBaseSaveDto.getDepartmentName());
|
||||||
|
|
||||||
if (servicePackage.getDiseaseTypeId() != null) {
|
if (servicePackage.getDiseaseTypeId() != null) {
|
||||||
DepartmentDiseaseType departmentDiseaseType = new DepartmentDiseaseType();
|
DepartmentDiseaseTypeDto departmentDiseaseType = new DepartmentDiseaseTypeDto();
|
||||||
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
||||||
departmentDiseaseType.setDiseaseTypeName(servicePackage.getDiseaseTypeName());
|
departmentDiseaseType.setDiseaseTypeName(servicePackage.getDiseaseTypeName());
|
||||||
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
@ -496,7 +497,7 @@ public class KnowledgeBaseServiceImpl implements IKnowledgeBaseService {
|
|||||||
saveObj.setDepartmentName(knowledgeBaseSaveDto.getDepartmentName());
|
saveObj.setDepartmentName(knowledgeBaseSaveDto.getDepartmentName());
|
||||||
saveObj.setSourceTemplateId(sourceId);
|
saveObj.setSourceTemplateId(sourceId);
|
||||||
if (questionVO.getDiseaseTypeId() != null) {
|
if (questionVO.getDiseaseTypeId() != null) {
|
||||||
DepartmentDiseaseType departmentDiseaseType = new DepartmentDiseaseType();
|
DepartmentDiseaseTypeDto departmentDiseaseType = new DepartmentDiseaseTypeDto();
|
||||||
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
departmentDiseaseType.setDepartmentId(knowledgeBaseSaveDto.getDepartmentId());
|
||||||
departmentDiseaseType.setDiseaseTypeName(questionVO.getDiseaseTypeName());
|
departmentDiseaseType.setDiseaseTypeName(questionVO.getDiseaseTypeName());
|
||||||
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
List<DepartmentDiseaseType> diseaseTypeList = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType);
|
||||||
|
|||||||
@ -33,27 +33,42 @@
|
|||||||
from department_disease_type
|
from department_disease_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDepartmentDiseaseTypeList" parameterType="DepartmentDiseaseType"
|
<select id="selectDepartmentDiseaseTypeList" parameterType="com.xinelu.manage.dto.departmentdiseasetype.DepartmentDiseaseTypeDto"
|
||||||
resultMap="DepartmentDiseaseTypeResult">
|
resultMap="DepartmentDiseaseTypeResult">
|
||||||
<include refid="selectDepartmentDiseaseTypeVo"/>
|
select dt.id,
|
||||||
|
dt.department_id,
|
||||||
|
dt.department_name,
|
||||||
|
dt.disease_type_name,
|
||||||
|
dt.disease_type_code,
|
||||||
|
dt.diagnosis_info,
|
||||||
|
dt.disease_type_remark,
|
||||||
|
dt.create_by,
|
||||||
|
dt.create_time,
|
||||||
|
dt.update_by,
|
||||||
|
dt.update_time
|
||||||
|
from department_disease_type dt
|
||||||
|
left join department d on d.id = dt.department_id
|
||||||
<where>
|
<where>
|
||||||
|
<if test="hospitalAgencyId != null ">
|
||||||
|
and d.hospital_agency_id = #{hospitalAgencyId}
|
||||||
|
</if>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and department_id = #{departmentId}
|
and dt.department_id = #{departmentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and department_name like concat('%', #{departmentName}, '%')
|
and dt.department_name like concat('%', #{departmentName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
and dt.disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeCode != null and diseaseTypeCode != ''">
|
<if test="diseaseTypeCode != null and diseaseTypeCode != ''">
|
||||||
and disease_type_code = #{diseaseTypeCode}
|
and dt.disease_type_code = #{diseaseTypeCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="diagnosisInfo != null and diagnosisInfo != ''">
|
<if test="diagnosisInfo != null and diagnosisInfo != ''">
|
||||||
and diagnosis_info = #{diagnosisInfo}
|
and dt.diagnosis_info = #{diagnosisInfo}
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeRemark != null and diseaseTypeRemark != ''">
|
<if test="diseaseTypeRemark != null and diseaseTypeRemark != ''">
|
||||||
and disease_type_remark = #{diseaseTypeRemark}
|
and dt.disease_type_remark = #{diseaseTypeRemark}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -170,6 +185,9 @@
|
|||||||
count(ddt.id) AS countNum
|
count(ddt.id) AS countNum
|
||||||
from department dt left join department_disease_type ddt on dt.id = ddt.department_id
|
from department dt left join department_disease_type ddt on dt.id = ddt.department_id
|
||||||
<where>
|
<where>
|
||||||
|
<if test="hospitalAgencyId != null and hospitalAgencyId != ''">
|
||||||
|
dt.hospital_agency_id = #{hospitalAgencyId}
|
||||||
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
dt.department_name like concat('%',#{departmentName},'%')
|
dt.department_name like concat('%',#{departmentName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user