浏览代码

条目缺陷改善统计查询条件调整

chengyao 3 年之前
父节点
当前提交
f9dd511880
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      src/main/resources/mapper/MedClickInfoMapper.xml

+ 9 - 9
src/main/resources/mapper/MedClickInfoMapper.xml

@@ -114,8 +114,8 @@
         s.deptName,
         s.casesId,
         s.casesName,
-        s.casesEntryName,
-        s.beforeCasesEntryId,
+        s.entryName,
+        s.entryId,
         sum(s.totalNum) AS totalNum,
         sum(s.improveleNum) AS improveleNum,
         sum(s.totalNum) - sum(s.improveleNum) AS handleNum,
@@ -129,8 +129,8 @@
         f.behospitalCode,
         f.casesId,
         f.casesName,
-        f.casesEntryName,
-        f.beforeCasesEntryId,
+        f.casesEntryName as entryName,
+        f.beforeCasesEntryId as entryId,
         count(f.beforeCasesEntryId) AS totalNum,
         CASE
         WHEN count(f.lastCasesEntryId) > 0 AND count(f.beforeCasesEntryId) - count(f.lastCasesEntryId) <= 0 THEN
@@ -203,10 +203,10 @@
             AND q.hospital_id = #{hospitalId}
         </if>
         <if test="deptId != null and deptId != ''">
-            and q.dept_id = #{deptId}
+            and q.beh_dept_id = #{deptId}
         </if>
         <if test="deptName != null and deptName != ''">
-            and q.dept_name like CONCAT('%',#{deptName},'%')
+            and q.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         q.beh_dept_id,
@@ -239,10 +239,10 @@
             AND q.hospital_id = #{hospitalId}
         </if>
         <if test="deptId != null and deptId != ''">
-            and q.dept_id = #{deptId}
+            and q.beh_dept_id = #{deptId}
         </if>
         <if test="deptName != null and deptName != ''">
-            and q.dept_name like CONCAT('%',#{deptName},'%')
+            and q.beh_dept_name like CONCAT('%',#{deptName},'%')
         </if>
         GROUP BY
         q.beh_dept_id,
@@ -284,6 +284,6 @@
         s.deptId,
         s.deptName,
         s.casesId,
-        s.beforeCasesEntryId
+        s.entryId
     </select>
 </mapper>