Browse Source

新生儿人数统计

zhaops 5 years ago
parent
commit
77cb1e3f87
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/main/resources/mapper/BehospitalInfoMapper.xml

+ 4 - 1
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -424,7 +424,10 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_placefile = '1'
         -- AND ( b.age IS NULL OR b.age = '-' OR b.age = '' )
-        <![CDATA[AND ( b.newborn_month IS NOT NULL OR b.newborn_month <> '' OR b.newborn_month <> '0' OR b.newborn_day IS NOT NULL OR b.newborn_day <> '' OR b.newborn_day <> '0' )]]>
+        AND (
+        ( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' )
+        OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' )
+        )
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}