专病路径搜索条件

This commit is contained in:
zhangheng 2024-04-16 15:14:25 +08:00
parent 09c3317f19
commit e2522d8245
6 changed files with 74 additions and 42 deletions

View File

@ -6,6 +6,7 @@ import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO;
import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import org.springframework.security.access.prepost.PreAuthorize;
@ -31,7 +32,7 @@ public class SpecialDiseaseRouteController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:list')")
@GetMapping("/list")
public TableDataInfo list(SpecialDiseaseRoute specialDiseaseRoute) {
public TableDataInfo list(SpecialDiseaseRouteDTO specialDiseaseRoute) {
startPage();
List<SpecialDiseaseRouteVO> list = specialDiseaseRouteService.selectSpecialDiseaseRouteList(specialDiseaseRoute);
return getDataTable(list);
@ -80,8 +81,8 @@ public class SpecialDiseaseRouteController extends BaseController {
* 科室路径数量
*/
@GetMapping("/departmentRouteCount")
public AjaxResult departmentRouteCount(String departmentName) {
return specialDiseaseRouteService.departmentRouteCount(departmentName);
public AjaxResult departmentRouteCount(String departmentName, String releaseStatus, Long servicePackageId) {
return specialDiseaseRouteService.departmentRouteCount(departmentName, releaseStatus, servicePackageId);
}
/**

View File

@ -0,0 +1,17 @@
package com.xinelu.manage.dto.specialdiseaseroute;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 专病路径信息对象 special_disease_route
*
* @author xinelu
* @date 2024-03-13
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SpecialDiseaseRouteDTO extends SpecialDiseaseRoute {
private Long servicePackageId;
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.specialdiseaseroute;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO;
import com.xinelu.manage.vo.department.DepartmentVO;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import org.apache.ibatis.annotations.Param;
@ -36,7 +37,7 @@ public interface SpecialDiseaseRouteMapper {
* @param specialDiseaseRoute 专病路径信息
* @return 专病路径信息集合
*/
List<SpecialDiseaseRouteVO> selectDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
List<SpecialDiseaseRouteVO> selectDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute);
/**
* 新增专病路径信息
@ -76,7 +77,7 @@ public interface SpecialDiseaseRouteMapper {
* @param departmentName 科室名称
* @return DepartmentVO
*/
List<DepartmentVO> departmentRouteByDepartmentName(String departmentName);
List<DepartmentVO> departmentRouteByDepartmentName(@Param("departmentName") String departmentName, @Param("releaseStatus") String releaseStatus, @Param("servicePackageId") Long servicePackageId);
/**
* 查询专病路径信息

View File

@ -2,6 +2,7 @@ package com.xinelu.manage.service.specialdiseaseroute;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO;
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
import java.util.List;
@ -27,7 +28,7 @@ public interface ISpecialDiseaseRouteService {
* @param specialDiseaseRoute 专病路径信息
* @return 专病路径信息集合
*/
List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute);
/**
* 新增专病路径信息
@ -67,7 +68,7 @@ public interface ISpecialDiseaseRouteService {
* @param departmentName 科室名称
* @return AjaxResult
*/
AjaxResult departmentRouteCount(String departmentName);
AjaxResult departmentRouteCount(String departmentName,String releaseStatus,Long servicePackageId);
/**
* 专病路径发布

View File

@ -10,6 +10,7 @@ import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.domain.specialdiseaseroutepackage.SpecialDiseaseRoutePackage;
import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO;
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
import com.xinelu.manage.mapper.specialdiseaseroutepackage.SpecialDiseaseRoutePackageMapper;
@ -67,7 +68,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
* @return 专病路径信息
*/
@Override
public List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute) {
public List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute) {
return specialDiseaseRouteMapper.selectDiseaseRouteList(specialDiseaseRoute);
}
@ -190,12 +191,12 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
* @return AjaxResult
*/
@Override
public AjaxResult departmentRouteCount(String departmentName) {
public AjaxResult departmentRouteCount(String departmentName,String releaseStatus,Long servicePackageId) {
DepartmentVO departmentVO = new DepartmentVO();
List<DepartmentVO> department = new ArrayList<>();
departmentVO.setDepartmentName("全部");
departmentVO.setCountNum(0);
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName);
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName,releaseStatus,servicePackageId);
if (CollectionUtils.isNotEmpty(departmentVOS)) {
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
departmentVO.setCountNum(result);

View File

@ -132,67 +132,71 @@
<select id="selectDiseaseRouteList"
resultType="com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO">
select a.id,
department_id,
department_name,
disease_type_id,
disease_type_name,
route_name,
route_code,
version,
route_classify,
release_status,
suit_range,
route_sort,
route_remark,
create_by,
create_time,
update_by,
update_time,
select sdr.id,
sdr.department_id,
sdr.department_name,
sdr.disease_type_id,
sdr.disease_type_name,
sdr.route_name,
sdr.route_code,
sdr.version,
sdr.route_classify,
sdr.release_status,
sdr.suit_range,
sdr.route_sort,
sdr.route_remark,
sdr.create_by,
sdr.create_time,
sdr.update_by,
sdr.update_time,
(select COUNT(1)
from special_disease_node
where route_id = a.id) totalNumber,
where route_id = sdr.id) totalNumber,
(select COUNT(1)
from special_disease_node
where route_id = a.id
where route_id = sdr.id
and route_check_status = 'AGREE') agreeNumber
from special_disease_route a
from special_disease_route sdr
left join special_disease_route_package sdrp ON sdrp.route_id = sdr.id
<where>
<if test="departmentId != null ">
and department_id = #{departmentId}
and sdr.department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name like concat('%', #{departmentName}, '%')
and sdr.department_name like concat('%', #{departmentName}, '%')
</if>
<if test="diseaseTypeId != null ">
and disease_type_id = #{diseaseTypeId}
and sdr.disease_type_id = #{diseaseTypeId}
</if>
<if test="diseaseTypeName != null and diseaseTypeName != ''">
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
and sdr.disease_type_name like concat('%', #{diseaseTypeName}, '%')
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
and sdr.route_name like concat('%', #{routeName}, '%')
</if>
<if test="routeCode != null and routeCode != ''">
and route_code = #{routeCode}
and sdr.route_code = #{routeCode}
</if>
<if test="version != null and version != ''">
and version = #{version}
and sdr.version = #{version}
</if>
<if test="routeClassify != null and routeClassify != ''">
and route_classify = #{routeClassify}
and sdr.route_classify = #{routeClassify}
</if>
<if test="releaseStatus != null and releaseStatus != ''">
and release_status = #{releaseStatus}
and sdr.release_status = #{releaseStatus}
</if>
<if test="suitRange != null and suitRange != ''">
and suit_range = #{suitRange}
and sdr.suit_range = #{suitRange}
</if>
<if test="routeSort != null ">
and route_sort = #{routeSort}
and sdr.route_sort = #{routeSort}
</if>
<if test="routeRemark != null and routeRemark != ''">
and route_remark = #{routeRemark}
and sdr.route_remark = #{routeRemark}
</if>
<if test="servicePackageId != null">
and sdrp.service_package_id = #{servicePackageId}
</if>
</where>
</select>
@ -350,10 +354,17 @@
dt.department_code,
count(sdr.id) AS countNum
from department dt left join special_disease_route sdr on dt.id = sdr.department_id
left join special_disease_route_package sdrp ON sdr.id = sdrp.route_id
<where>
<if test="departmentName != null and departmentName != ''">
dt.department_name like concat('%',#{departmentName},'%')
</if>
<if test="releaseStatus != null and releaseStatus != ''">
AND sdr.release_status= #{releaseStatus}
</if>
<if test="servicePackageId != null and servicePackageId != ''">
AND sdrp.service_package_id= #{servicePackageId}
</if>
</where>
GROUP BY dt.id
</select>