|
@@ -37,7 +37,7 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
<!--获取缺陷检验项信息-->
|
|
|
- <select id="getBadCheckInfo" resultType="java.lang.String">
|
|
|
+ <select id="getBadExamineInfo" resultType="java.lang.String">
|
|
|
select
|
|
|
distinct
|
|
|
b.repNo
|
|
@@ -140,25 +140,28 @@
|
|
|
t1.hospital_id as hospitalId,
|
|
|
t1.behospital_code as behospitalCode
|
|
|
FROM
|
|
|
- med_lis_info t1,
|
|
|
- med_lis_result t2,
|
|
|
+ med_lis_info t1
|
|
|
+ right join
|
|
|
med_behospital_info t3
|
|
|
- WHERE
|
|
|
- t1.is_deleted = "N"
|
|
|
- AND t2.is_deleted = "N"
|
|
|
+ on t1.hospital_id = t3.hospital_id
|
|
|
+ and t1.is_deleted = "N"
|
|
|
AND t3.is_deleted = "N"
|
|
|
AND t1.check_date IS NOT NULL
|
|
|
- AND t2.item_name IS NOT NULL
|
|
|
- AND t1.hospital_id = t2.hospital_id
|
|
|
- and t1.hospital_id = t3.hospital_id
|
|
|
- AND t1.behospital_code = t2.behospital_code
|
|
|
<if test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 1l">
|
|
|
and t1.behospital_code = t3.behospital_code
|
|
|
</if>
|
|
|
<if test="examineInfoVO.hospitalId != null and examineInfoVO.hospitalId == 2l">
|
|
|
and t1.behospital_code = t3.file_code
|
|
|
</if>
|
|
|
+ left join
|
|
|
+ med_lis_result t2
|
|
|
+ on t1.hospital_id = t2.hospital_id
|
|
|
+ AND t2.is_deleted = "N"
|
|
|
+ AND t2.item_name IS NOT NULL
|
|
|
+ AND t1.behospital_code = t2.behospital_code
|
|
|
AND t1.rep_no = t2.rep_no
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
<if test="examineInfoVO.hospitalId != null">
|
|
|
and t1.hospital_id = #{examineInfoVO.hospitalId}
|
|
|
</if>
|
|
@@ -239,7 +242,7 @@
|
|
|
select t.* from(
|
|
|
SELECT
|
|
|
t2.item_name AS examineItemName,
|
|
|
- CONCAT( t2.result, t2.unit ) AS examineItemResult,
|
|
|
+ CONCAT( t2.result, ifnull(t2.unit,'') ) AS examineItemResult,
|
|
|
DATE_FORMAT( t1.rep_date, '%Y-%m-%d %H:%i:%s' ) as reptTime,
|
|
|
DATE_FORMAT( t1.check_date, '%Y-%m-%d %H:%i:%s' ) as checkTime,
|
|
|
CONCAT( t2.item_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d %H:%i:%s'),')')as info,
|