123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package com.bofeng.dao;
- import com.baomidou.mybatisplus.mapper.BaseMapper;
- import com.bofeng.entity.MsReport;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import org.springframework.stereotype.Repository;
- import java.math.BigDecimal;
- import java.util.List;
- /**
- * @Author: xielianghe
- * @Date: 2020/2/4 15:45
- */
- @Mapper
- @Repository
- public interface MsReportMapper extends BaseMapper<MsReport> {
- List<MsReport> selectByReportDate(@Param("reportDate") String reportDate, @Param("userCreate") Long userCreate);
- @Select("select property_id from sys_user_role where user_id=#{userId} and role_id=1")
- long selectHouseIdByUserId(@Param("userId") Long userId);
- //确诊
- @Select("select count(*) from ms_suspected where report_id=#{reportId} and medical=#{medical}")
- Integer selectSuspectedNum(@Param("reportId") Long reportId, @Param("medical") Integer medical);
- //隔离
- @Select("select count(*) from ms_suspected where report_id=#{reportId} and single_room=#{singleRoom}")
- Integer selectSingleRoomNum(@Param("reportId") Long reportId, @Param("singleRoom") Integer singleRoom);
- //正常
- @Select("select count(*) from ms_suspected where report_id=#{reportId} and 36 <= #{temperature} and #{temperature} <= 37.3")
- Integer selectisSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
- //疑似
- @Select("select count(*) from ms_suspected where report_id=#{reportId} and (#{temperature} < 36 or 37.3 < #{temperature})")
- Integer selectisNoSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
- }
|