You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MzzyCollectService/src/main/resources/sqlserver/VJsjWzh7addnjreportMapper.xml

27 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.docus.server.collection.infrastructure.dao.sqlserver.VJsjWzh7addnjreportMapper">
<select id="getList" resultType="java.lang.String">
SELECT 姓名
FROM dbo.v_jsj_wzh7addnjreport;
</select>
<select id="getReport" resultType="com.docus.server.collection.entity.VJsjWzh7addnjreport">
SELECT 姓名 name, 住院号 inpatientNo, 类型 type, 申请科室 dept, 项目 item, RegistDateTime registDateTime, ReportDateTime reportDateTime
FROM dbo.v_jsj_wzh7addnjreport
where
1=1
<if test="dto.startReportDateTime!=null and dto.startReportDateTime!='' and dto.endReportDateTime!=null and dto.endReportDateTime!=''">
and convert(varchar(10),ReportDateTime,120)between
#{dto.startReportDateTime} and #{dto.endReportDateTime}
</if>
<if test="dto.name!=null and dto.name!=''">
and 姓名 like CONCAT('%',#{dto.name},'%')
</if>
<if test="dto.inpatientNo!=null and dto.inpatientNo!=''">
and 住院号 like CONCAT('%',#{dto.inpatientNo},'%')
</if>
</select>
</mapper>