package com.ltkj.hosp.mapper;
|
|
import java.util.List;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.hosp.domain.TjPackage;
|
import com.ltkj.hosp.domain.TjProject;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Select;
|
|
/**
|
* 体检套餐Mapper接口
|
*
|
* @author ltkj
|
* @date 2022-11-17
|
*/
|
@Mapper
|
public interface TjPackageMapper extends BaseMapper<TjPackage> {
|
|
// /**
|
// * 查询套餐内项目和所有项目
|
// * */
|
// @Select("SELECT (case when b.pac_id is null then 0 else 1 end) ischeck,a.pro_id,a.pro_name FROM tj_project a left join tj_package_project b on b.pro_id = a.pro_id and b.pac_id=#{pacid}")
|
// public List<TjProject> showList(Long picid);
|
|
|
/**
|
* 查询体检套餐
|
*
|
* @param pacId 体检套餐主键
|
* @return 体检套餐
|
*/
|
public TjPackage selectTjPackageByPacId(String pacId);
|
|
/**
|
* 查询体检套餐列表
|
*
|
* @param tjPackage 体检套餐
|
* @return 体检套餐集合
|
*/
|
public List<TjPackage> selectTjPackageList(TjPackage tjPackage);
|
|
/**
|
* 新增体检套餐
|
*
|
* @param tjPackage 体检套餐
|
* @return 结果
|
*/
|
public int insertTjPackage(TjPackage tjPackage);
|
|
/**
|
* 修改体检套餐
|
*
|
* @param tjPackage 体检套餐
|
* @return 结果
|
*/
|
public int updateTjPackage(TjPackage tjPackage);
|
|
/**
|
* 删除体检套餐
|
*
|
* @param pacId 体检套餐主键
|
* @return 结果
|
*/
|
public int deleteTjPackageByPacId(Long pacId);
|
|
/**
|
* 批量删除体检套餐
|
*
|
* @param pacIds 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteTjPackageByPacIds(Long[] pacIds);
|
|
@Select("SELECT * FROM tj_package WHERE pac_id=#{pacId} AND deleted='0' ")
|
public TjPackage getTjPackageByPacId(String pacId);
|
|
|
@Select("SELECT * FROM tj_package WHERE !locate(\"女\",pac_name) and !locate(\"孕\",pac_name) and !locate(\"妇\",pac_name) and !locate(\"产\",pac_name) and pac_status=0 AND deleted =0 ORDER BY sort DESC")
|
List<TjPackage> getTjPackageListByMan();
|
|
@Select("SELECT * FROM tj_package WHERE !locate(\"男\",pac_name) and pac_status=0 AND deleted =0 ORDER BY sort DESC")
|
List<TjPackage> getTjPackageListByWoMan();
|
|
|
@Select("SELECT GROUP_CONCAT(b.pro_name ) AS names FROM tj_package_project a LEFT JOIN tj_project b ON a.pro_id=b.pro_id WHERE a.pac_id=#{pacId}")
|
String getTjPacProNames(String pacId);
|
}
|