eight
2024-10-08 ddf772bc079de92ff4bcba8c0f1624b6398e0dad
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/jobrecord/JobRecordMapper.java
@@ -38,8 +38,15 @@
                .orderByDesc(JobRecordDO::getId));
    }
    @Select("SELECT * FROM lihu.job_record where rent_id=#{rentId} and doc_id=#{docId} limit 1")
    JobRecordDO selectByRentIdDocId(@Param("rentId") Long rentId, @Param("docId") Long docId );
    @Select("<script> " +
            "SELECT * FROM lihu.job_record " +
            " where rent_id=#{rentId} and doc_id=#{docId} and job_type in (" +
                    " <foreach collection='jobTypeList' separator=',' item='jobType'>" +
                    "  #{jobType} " +
                    " </foreach> )" +
            " limit 1;" +
            " </script>")
    JobRecordDO selectByRentIdDocId(@Param("rentId") Long rentId, @Param("docId") Long docId, @Param("jobTypeList") List<Integer> jobTypeList );
    @Select("SELECT count(1) FROM lihu.job_record where pat_id=#{patId} and TO_DAYS(job_time)=TO_DAYS(#{jobTime}) and job_type=#{jobType} ")
    Integer getPatientJobNum(@Param("patId") String patId, @Param("jobTime") LocalDateTime jobTime, @Param("jobType") Integer jobType );