专病路径管理
This commit is contained in:
parent
dcb5144533
commit
220ede4495
@ -64,7 +64,7 @@ public class SpecialDiseaseRouteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:add')")
|
||||
@Log(title = "专病路径信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) {
|
||||
return toAjax(specialDiseaseRouteService.insertSpecialDiseaseRoute(specialDiseaseRoute));
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class SpecialDiseaseRouteController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:specialDiseaseRoute:edit')")
|
||||
@Log(title = "专病路径信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody SpecialDiseaseRoute specialDiseaseRoute) {
|
||||
return toAjax(specialDiseaseRouteService.updateSpecialDiseaseRoute(specialDiseaseRoute));
|
||||
}
|
||||
@ -88,4 +88,12 @@ public class SpecialDiseaseRouteController extends BaseController {
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(specialDiseaseRouteService.deleteSpecialDiseaseRouteByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 科室路径数量
|
||||
*/
|
||||
@GetMapping("/departmentRouteCount")
|
||||
public AjaxResult departmentRouteCount(String departmentName) {
|
||||
return specialDiseaseRouteService.departmentRouteCount(departmentName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,15 @@ public class TaskPartitionDictController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询任务细分字典列表 - 不分页
|
||||
*/
|
||||
@GetMapping("/taskPartitionList")
|
||||
public AjaxResult taskPartitionList(TaskPartitionDict taskPartitionDict) {
|
||||
return AjaxResult.success(taskPartitionDictService.selectTaskPartitionDictList(taskPartitionDict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务细分字典列表
|
||||
*/
|
||||
|
||||
@ -64,7 +64,7 @@ public class TaskStatusDictController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:taskStatus:add')")
|
||||
@Log(title = "任务状态字典", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody TaskStatusDict taskStatusDict) {
|
||||
return toAjax(taskStatusDictService.insertTaskStatusDict(taskStatusDict));
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class TaskStatusDictController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:taskStatus:edit')")
|
||||
@Log(title = "任务状态字典", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody TaskStatusDict taskStatusDict) {
|
||||
return toAjax(taskStatusDictService.updateTaskStatusDict(taskStatusDict));
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.mapper.specialdiseaseroute;
|
||||
|
||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -18,7 +19,7 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param id 专病路径信息主键
|
||||
* @return 专病路径信息
|
||||
*/
|
||||
public SpecialDiseaseRoute selectSpecialDiseaseRouteById(Long id);
|
||||
SpecialDiseaseRoute selectSpecialDiseaseRouteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询专病路径信息列表
|
||||
@ -26,7 +27,7 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param specialDiseaseRoute 专病路径信息
|
||||
* @return 专病路径信息集合
|
||||
*/
|
||||
public List<SpecialDiseaseRoute> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
List<SpecialDiseaseRoute> selectSpecialDiseaseRouteList(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
|
||||
/**
|
||||
* 新增专病路径信息
|
||||
@ -34,7 +35,7 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param specialDiseaseRoute 专病路径信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
int insertSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
|
||||
/**
|
||||
* 修改专病路径信息
|
||||
@ -42,7 +43,7 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param specialDiseaseRoute 专病路径信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
int updateSpecialDiseaseRoute(SpecialDiseaseRoute specialDiseaseRoute);
|
||||
|
||||
/**
|
||||
* 删除专病路径信息
|
||||
@ -50,7 +51,7 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param id 专病路径信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSpecialDiseaseRouteById(Long id);
|
||||
int deleteSpecialDiseaseRouteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除专病路径信息
|
||||
@ -58,5 +59,13 @@ public interface SpecialDiseaseRouteMapper {
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSpecialDiseaseRouteByIds(Long[] ids);
|
||||
int deleteSpecialDiseaseRouteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 科室路径数量
|
||||
*
|
||||
* @param departmentName 科室名称
|
||||
* @return DepartmentVO
|
||||
*/
|
||||
List<DepartmentVO> departmentRouteByDepartmentName(String departmentName);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.xinelu.manage.service.specialdiseaseroute;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||
|
||||
import java.util.List;
|
||||
@ -59,4 +60,12 @@ public interface ISpecialDiseaseRouteService {
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSpecialDiseaseRouteById(Long id);
|
||||
|
||||
/**
|
||||
* 科室路径数量
|
||||
*
|
||||
* @param departmentName 科室名称
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult departmentRouteCount(String departmentName);
|
||||
}
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
package com.xinelu.manage.service.specialdiseaseroute.impl;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
|
||||
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
|
||||
import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService;
|
||||
import com.xinelu.manage.vo.department.DepartmentVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -88,4 +92,26 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi
|
||||
public int deleteSpecialDiseaseRouteById(Long id) {
|
||||
return specialDiseaseRouteMapper.deleteSpecialDiseaseRouteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 科室路径数量
|
||||
*
|
||||
* @param departmentName 科室名称
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult departmentRouteCount(String departmentName) {
|
||||
DepartmentVO departmentVO = new DepartmentVO();
|
||||
List<DepartmentVO> department = new ArrayList<>();
|
||||
departmentVO.setDepartmentName("全部");
|
||||
departmentVO.setCountNum(0);
|
||||
List<DepartmentVO> departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(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,10 +25,28 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSpecialDiseaseRouteVo">
|
||||
select 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 from special_disease_route
|
||||
select 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
|
||||
from special_disease_route
|
||||
</sql>
|
||||
|
||||
<select id="selectSpecialDiseaseRouteList" parameterType="SpecialDiseaseRoute" resultMap="SpecialDiseaseRouteResult">
|
||||
<select id="selectSpecialDiseaseRouteList" parameterType="SpecialDiseaseRoute"
|
||||
resultMap="SpecialDiseaseRouteResult">
|
||||
<include refid="selectSpecialDiseaseRouteVo"/>
|
||||
<where>
|
||||
<if test="departmentId != null ">
|
||||
@ -205,7 +223,9 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteSpecialDiseaseRouteById" parameterType="Long">
|
||||
delete from special_disease_route where id = #{id}
|
||||
delete
|
||||
from special_disease_route
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSpecialDiseaseRouteByIds" parameterType="String">
|
||||
@ -214,4 +234,18 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="departmentRouteByDepartmentName" resultType="com.xinelu.manage.vo.department.DepartmentVO">
|
||||
select dt.id,
|
||||
dt.department_name,
|
||||
dt.department_code,
|
||||
count(sdr.id) AS countNum
|
||||
from department dt left join special_disease_route sdr on dt.id = sdr.department_id
|
||||
<where>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
dt.department_name like concat('%',#{departmentName},'%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY dt.id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user