package com.ltkj.hosp.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.ltkj.common.core.domain.BaseEntity;
|
import com.ltkj.hosp.domain.TjXdPicture;
|
import org.apache.ibatis.annotations.Delete;
|
import org.apache.ibatis.annotations.Insert;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
|
/**
|
* 体检心电图管理Mapper接口
|
*
|
* @author ltkj_赵佳豪&李格
|
* @date 2023-04-11
|
*/
|
@Mapper
|
public interface TjXdPictureMapper extends BaseMapper<TjXdPicture> {
|
/**
|
* 查询体检心电图管理
|
*
|
* @param id 体检心电图管理主键
|
* @return 体检心电图管理
|
*/
|
public TjXdPicture selectTjXdPictureById(String id);
|
|
/**
|
* 查询体检心电图管理列表
|
*
|
* @param tjXdPicture 体检心电图管理
|
* @return 体检心电图管理集合
|
*/
|
public List<TjXdPicture> selectTjXdPictureList(TjXdPicture tjXdPicture);
|
|
/**
|
* 新增体检心电图管理
|
*
|
* @param tjXdPicture 体检心电图管理
|
* @return 结果
|
*/
|
public int insertTjXdPicture(TjXdPicture tjXdPicture);
|
|
/**
|
* 修改体检心电图管理
|
*
|
* @param tjXdPicture 体检心电图管理
|
* @return 结果
|
*/
|
public int updateTjXdPicture(TjXdPicture tjXdPicture);
|
|
/**
|
* 删除体检心电图管理
|
*
|
* @param id 体检心电图管理主键
|
* @return 结果
|
*/
|
public int deleteTjXdPictureById(String id);
|
|
/**
|
* 批量删除体检心电图管理
|
*
|
* @param ids 需要删除的数据主键集合
|
* @return 结果
|
*/
|
public int deleteTjXdPictureByIds(String[] ids);
|
|
@Select("SELECT\n" +
|
" b.tj_number tj_num,\n" +
|
" b.user_id cus_id,\n" +
|
" c.cus_name,\n" +
|
" a.pro_id ,\n" +
|
" d.pro_name,\n" +
|
" a.pro_result\n" +
|
"FROM\n" +
|
" tj_order_detail a\n" +
|
" JOIN tj_order b ON b.order_id = a.order_id\n" +
|
" JOIN tj_customer c ON c.cus_id = b.user_id\n" +
|
" JOIN tj_project d ON d.pro_id = a.pro_id\n" +
|
" JOIN sys_dept e ON e.dept_id = d.dept_id \n" +
|
"WHERE\n" +
|
" e.dept_id = '601' AND d.pro_parent_id !=0 AND b.tj_number=#{tjNum}")
|
List<TjXdPicture> saveTjXdPicture(String tjNum);
|
|
|
@Delete("delete from tj_xd_picture where tj_num= #{tjNum}")
|
void deleteTjXdPictureBytjNum(String tjNum);
|
}
|