TargetManagementDao.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package thyyxxk.webserver.dao.his.targetmanagement;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import org.apache.ibatis.annotations.Mapper;
  4. import org.apache.ibatis.annotations.Param;
  5. import org.apache.ibatis.annotations.Select;
  6. import org.apache.ibatis.annotations.Update;
  7. import thyyxxk.webserver.entity.highreport.ReportBaseInfo;
  8. import java.util.List;
  9. import java.util.Map;
  10. /**
  11. * @description: 指标管理
  12. * @author: hsh
  13. * @date: 2023/5/30 16:58
  14. **/
  15. @Mapper
  16. public interface TargetManagementDao extends BaseMapper<ReportBaseInfo> {
  17. @Select("<script> ${sql} </script>")
  18. String targetSqlExecute(@Param("sql") String sql);
  19. @Update(" delete from report_base_info where report_id = #{reportId} ")
  20. void deleteReportBaseInfoById(@Param("reportId") String reportId);
  21. @Select("<script> " +
  22. " select * from report_base_info where flag = 'Y' and report_type = 'zb' " +
  23. " <if test=\"id != null and id != '' \"> " +
  24. " and report_id = #{id} " +
  25. " </if> " +
  26. " <if test=\"pid != null and pid != '' \"> " +
  27. " and level = #{pid} " +
  28. " </if> " +
  29. "</script> ")
  30. ReportBaseInfo selectReportBaseInfoById(@Param("id") String id, @Param("pid") String pid);
  31. /**
  32. * @description: 根据指标字典配置的指标报表id查询指标报表详情
  33. * @author: hsh
  34. * @date: 2023/7/5 10:38
  35. * @param: [calcId]
  36. * @return: ReportBaseInfo
  37. **/
  38. @Select("<script> " +
  39. " select * from report_base_info where flag = 'Y' and report_type = 'zb' and report_id = #{calcId} " +
  40. "</script> ")
  41. ReportBaseInfo selectReportBaseInfoByCalcId(@Param("calcId") String calcId);
  42. /**
  43. * @Description 查询指标报表的所有id以及名称(包括增加的手工数据指标)
  44. * @Author hsh
  45. * @param reportType 报表类型
  46. * @return list
  47. * @Date 2024/4/1 16:49
  48. */
  49. @Select(" select report_name as name, report_id as 'code' from report_base_info where flag = 'Y' and (report_type = 'sg' or report_type = #{reportType}) ")
  50. List<Map<String, Object>> selectTargetZbReportId(@Param("reportType") String reportType);
  51. }