MsReportMapper.java 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package com.bofeng.dao;
  2. import com.baomidou.mybatisplus.mapper.BaseMapper;
  3. import com.bofeng.entity.MsReport;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.apache.ibatis.annotations.Select;
  7. import org.springframework.stereotype.Repository;
  8. import java.math.BigDecimal;
  9. import java.util.List;
  10. /**
  11. * @Author: xielianghe
  12. * @Date: 2020/2/4 15:45
  13. */
  14. @Mapper
  15. @Repository
  16. public interface MsReportMapper extends BaseMapper<MsReport> {
  17. List<MsReport> selectByReportDate(@Param("reportDate") String reportDate, @Param("userCreate") Long userCreate);
  18. @Select("select property_id from sys_user_role where user_id=#{userId} and role_id=1")
  19. long selectHouseIdByUserId(@Param("userId") Long userId);
  20. //确诊
  21. @Select("select count(*) from ms_suspected where report_id=#{reportId} and medical=#{medical}")
  22. Integer selectSuspectedNum(@Param("reportId") Long reportId, @Param("medical") Integer medical);
  23. //隔离
  24. @Select("select count(*) from ms_suspected where report_id=#{reportId} and single_room=#{singleRoom}")
  25. Integer selectSingleRoomNum(@Param("reportId") Long reportId, @Param("singleRoom") Integer singleRoom);
  26. //正常
  27. @Select("select count(*) from ms_suspected where report_id=#{reportId} and 36 &lt;= #{temperature} and #{temperature} &lt;= 37.3")
  28. Integer selectisSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
  29. //疑似
  30. @Select("select count(*) from ms_suspected where report_id=#{reportId} and (#{temperature} &lt; 36 or 37.3 &lt; #{temperature})")
  31. Integer selectisNoSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
  32. }