فهرست منبع

评价模版修改

brealinxx 1 سال پیش
والد
کامیت
553daaf590
1فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 8 1
      src/main/resources/mapper/evaluate/EvaluateTemplateMapper.xml

+ 8 - 1
src/main/resources/mapper/evaluate/EvaluateTemplateMapper.xml

@@ -11,7 +11,14 @@
         left join xjr_dictionary_detail t2 on t.evaluate_type = t2.code and t2.item_id = 1746831039385366530
         WHERE t.delete_mark = 0
         <if test="dto.deptIds != null and dto.deptIds != ''">
-            AND t.dept_ids like concat('%',#{dto.deptIds},'%')
+            <choose>
+                <when test="dto.deptIds == 0">
+                    AND JSON_CONTAINS(t.dept_ids, JSON_ARRAY(0))
+                </when>
+                <otherwise>
+                    AND t.dept_ids like concat('%',#{dto.deptIds},'%')
+                </otherwise>
+            </choose>
         </if>
         <if test="dto.evaluateType != null and dto.evaluateType != ''">
             AND t.evaluate_type = #{dto.evaluateType}