专病路径搜索条件
This commit is contained in:
parent
09c3317f19
commit
e2522d8245
@ -6,6 +6,7 @@ import com.xinelu.common.core.domain.AjaxResult;
|
|||||||
import com.xinelu.common.core.page.TableDataInfo;
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.enums.BusinessType;
|
import com.xinelu.common.enums.BusinessType;
|
||||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
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.service.specialdiseaseroute.ISpecialDiseaseRouteService;
|
||||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -31,7 +32,7 @@ public class SpecialDiseaseRouteController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:list')")
|
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SpecialDiseaseRoute specialDiseaseRoute) {
|
public TableDataInfo list(SpecialDiseaseRouteDTO specialDiseaseRoute) {
|
||||||
startPage();
|
startPage();
|
||||||
List<SpecialDiseaseRouteVO> list = specialDiseaseRouteService.selectSpecialDiseaseRouteList(specialDiseaseRoute);
|
List<SpecialDiseaseRouteVO> list = specialDiseaseRouteService.selectSpecialDiseaseRouteList(specialDiseaseRoute);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -80,8 +81,8 @@ public class SpecialDiseaseRouteController extends BaseController {
|
|||||||
* 科室路径数量
|
* 科室路径数量
|
||||||
*/
|
*/
|
||||||
@GetMapping("/departmentRouteCount")
|
@GetMapping("/departmentRouteCount")
|
||||||
public AjaxResult departmentRouteCount(String departmentName) {
|
public AjaxResult departmentRouteCount(String departmentName, String releaseStatus, Long servicePackageId) {
|
||||||
return specialDiseaseRouteService.departmentRouteCount(departmentName);
|
return specialDiseaseRouteService.departmentRouteCount(departmentName, releaseStatus, servicePackageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.xinelu.manage.mapper.specialdiseaseroute;
|
package com.xinelu.manage.mapper.specialdiseaseroute;
|
||||||
|
|
||||||
import com.xinelu.manage.domain.specialdiseaseroute.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.department.DepartmentVO;
|
||||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -36,7 +37,7 @@ public interface SpecialDiseaseRouteMapper {
|
|||||||
* @param specialDiseaseRoute 专病路径信息
|
* @param specialDiseaseRoute 专病路径信息
|
||||||
* @return 专病路径信息集合
|
* @return 专病路径信息集合
|
||||||
*/
|
*/
|
||||||
List<SpecialDiseaseRouteVO> selectDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
|
List<SpecialDiseaseRouteVO> selectDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增专病路径信息
|
* 新增专病路径信息
|
||||||
@ -76,7 +77,7 @@ public interface SpecialDiseaseRouteMapper {
|
|||||||
* @param departmentName 科室名称
|
* @param departmentName 科室名称
|
||||||
* @return DepartmentVO
|
* @return DepartmentVO
|
||||||
*/
|
*/
|
||||||
List<DepartmentVO> departmentRouteByDepartmentName(String departmentName);
|
List<DepartmentVO> departmentRouteByDepartmentName(@Param("departmentName") String departmentName, @Param("releaseStatus") String releaseStatus, @Param("servicePackageId") Long servicePackageId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询专病路径信息
|
* 查询专病路径信息
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.xinelu.manage.service.specialdiseaseroute;
|
|||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||||
|
import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO;
|
||||||
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -27,7 +28,7 @@ public interface ISpecialDiseaseRouteService {
|
|||||||
* @param specialDiseaseRoute 专病路径信息
|
* @param specialDiseaseRoute 专病路径信息
|
||||||
* @return 专病路径信息集合
|
* @return 专病路径信息集合
|
||||||
*/
|
*/
|
||||||
List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
|
List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增专病路径信息
|
* 新增专病路径信息
|
||||||
@ -67,7 +68,7 @@ public interface ISpecialDiseaseRouteService {
|
|||||||
* @param departmentName 科室名称
|
* @param departmentName 科室名称
|
||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
AjaxResult departmentRouteCount(String departmentName);
|
AjaxResult departmentRouteCount(String departmentName,String releaseStatus,Long servicePackageId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专病路径发布
|
* 专病路径发布
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.xinelu.common.utils.bean.BeanUtils;
|
|||||||
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
||||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||||
import com.xinelu.manage.domain.specialdiseaseroutepackage.SpecialDiseaseRoutePackage;
|
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.specialdiseasenode.SpecialDiseaseNodeMapper;
|
||||||
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
||||||
import com.xinelu.manage.mapper.specialdiseaseroutepackage.SpecialDiseaseRoutePackageMapper;
|
import com.xinelu.manage.mapper.specialdiseaseroutepackage.SpecialDiseaseRoutePackageMapper;
|
||||||
@ -67,7 +68,7 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
|||||||
* @return 专病路径信息
|
* @return 专病路径信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute) {
|
public List<SpecialDiseaseRouteVO> selectSpecialDiseaseRouteList(SpecialDiseaseRouteDTO specialDiseaseRoute) {
|
||||||
return specialDiseaseRouteMapper.selectDiseaseRouteList(specialDiseaseRoute);
|
return specialDiseaseRouteMapper.selectDiseaseRouteList(specialDiseaseRoute);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,12 +191,12 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
|||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult departmentRouteCount(String departmentName) {
|
public AjaxResult departmentRouteCount(String departmentName,String releaseStatus,Long servicePackageId) {
|
||||||
DepartmentVO departmentVO = new DepartmentVO();
|
DepartmentVO departmentVO = new DepartmentVO();
|
||||||
List<DepartmentVO> department = new ArrayList<>();
|
List<DepartmentVO> department = new ArrayList<>();
|
||||||
departmentVO.setDepartmentName("全部");
|
departmentVO.setDepartmentName("全部");
|
||||||
departmentVO.setCountNum(0);
|
departmentVO.setCountNum(0);
|
||||||
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName);
|
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName,releaseStatus,servicePackageId);
|
||||||
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
if (CollectionUtils.isNotEmpty(departmentVOS)) {
|
||||||
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum();
|
||||||
departmentVO.setCountNum(result);
|
departmentVO.setCountNum(result);
|
||||||
|
|||||||
@ -132,67 +132,71 @@
|
|||||||
|
|
||||||
<select id="selectDiseaseRouteList"
|
<select id="selectDiseaseRouteList"
|
||||||
resultType="com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO">
|
resultType="com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO">
|
||||||
select a.id,
|
select sdr.id,
|
||||||
department_id,
|
sdr.department_id,
|
||||||
department_name,
|
sdr.department_name,
|
||||||
disease_type_id,
|
sdr.disease_type_id,
|
||||||
disease_type_name,
|
sdr.disease_type_name,
|
||||||
route_name,
|
sdr.route_name,
|
||||||
route_code,
|
sdr.route_code,
|
||||||
version,
|
sdr.version,
|
||||||
route_classify,
|
sdr.route_classify,
|
||||||
release_status,
|
sdr.release_status,
|
||||||
suit_range,
|
sdr.suit_range,
|
||||||
route_sort,
|
sdr.route_sort,
|
||||||
route_remark,
|
sdr.route_remark,
|
||||||
create_by,
|
sdr.create_by,
|
||||||
create_time,
|
sdr.create_time,
|
||||||
update_by,
|
sdr.update_by,
|
||||||
update_time,
|
sdr.update_time,
|
||||||
(select COUNT(1)
|
(select COUNT(1)
|
||||||
from special_disease_node
|
from special_disease_node
|
||||||
where route_id = a.id) totalNumber,
|
where route_id = sdr.id) totalNumber,
|
||||||
(select COUNT(1)
|
(select COUNT(1)
|
||||||
from special_disease_node
|
from special_disease_node
|
||||||
where route_id = a.id
|
where route_id = sdr.id
|
||||||
and route_check_status = 'AGREE') agreeNumber
|
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>
|
<where>
|
||||||
<if test="departmentId != null ">
|
<if test="departmentId != null ">
|
||||||
and department_id = #{departmentId}
|
and sdr.department_id = #{departmentId}
|
||||||
</if>
|
</if>
|
||||||
<if test="departmentName != null and departmentName != ''">
|
<if test="departmentName != null and departmentName != ''">
|
||||||
and department_name like concat('%', #{departmentName}, '%')
|
and sdr.department_name like concat('%', #{departmentName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeId != null ">
|
<if test="diseaseTypeId != null ">
|
||||||
and disease_type_id = #{diseaseTypeId}
|
and sdr.disease_type_id = #{diseaseTypeId}
|
||||||
</if>
|
</if>
|
||||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||||
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
and sdr.disease_type_name like concat('%', #{diseaseTypeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="routeName != null and routeName != ''">
|
<if test="routeName != null and routeName != ''">
|
||||||
and route_name like concat('%', #{routeName}, '%')
|
and sdr.route_name like concat('%', #{routeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="routeCode != null and routeCode != ''">
|
<if test="routeCode != null and routeCode != ''">
|
||||||
and route_code = #{routeCode}
|
and sdr.route_code = #{routeCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="version != null and version != ''">
|
<if test="version != null and version != ''">
|
||||||
and version = #{version}
|
and sdr.version = #{version}
|
||||||
</if>
|
</if>
|
||||||
<if test="routeClassify != null and routeClassify != ''">
|
<if test="routeClassify != null and routeClassify != ''">
|
||||||
and route_classify = #{routeClassify}
|
and sdr.route_classify = #{routeClassify}
|
||||||
</if>
|
</if>
|
||||||
<if test="releaseStatus != null and releaseStatus != ''">
|
<if test="releaseStatus != null and releaseStatus != ''">
|
||||||
and release_status = #{releaseStatus}
|
and sdr.release_status = #{releaseStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="suitRange != null and suitRange != ''">
|
<if test="suitRange != null and suitRange != ''">
|
||||||
and suit_range = #{suitRange}
|
and sdr.suit_range = #{suitRange}
|
||||||
</if>
|
</if>
|
||||||
<if test="routeSort != null ">
|
<if test="routeSort != null ">
|
||||||
and route_sort = #{routeSort}
|
and sdr.route_sort = #{routeSort}
|
||||||
</if>
|
</if>
|
||||||
<if test="routeRemark != null and routeRemark != ''">
|
<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>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
@ -350,10 +354,17 @@
|
|||||||
dt.department_code,
|
dt.department_code,
|
||||||
count(sdr.id) AS countNum
|
count(sdr.id) AS countNum
|
||||||
from department dt left join special_disease_route sdr on dt.id = sdr.department_id
|
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>
|
<where>
|
||||||
<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>
|
||||||
|
<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>
|
</where>
|
||||||
GROUP BY dt.id
|
GROUP BY dt.id
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user