Kaynağa Gözat

业绩对标管理问题修复

hlf 1 yıl önce
ebeveyn
işleme
a01116f851

+ 15 - 4
ims-service/ims-eval/src/main/resources/mappers/PerformanceBenchmarkInfoMapper.xml

@@ -67,16 +67,27 @@
                 AND quarterly_month = #{quarterlyMonth}
             </if>
             <if test="isBg == 1">
-                AND is_bg = 1 order by bg_val desc
+                AND is_bg = 1
             </if>
             <if test="isDb == 2">
-                AND is_db = 1 AND is_cb = 1 order by cb_val, db_val desc
+                AND is_db = 1 AND is_cb = 1
             </if>
             <if test="isCb == 3">
-                AND is_cb = 1 order by cb_val desc
+                AND is_cb = 1
             </if>
         </where>
-        order by company_id asc, index_name asc
+        <if test="isBg == 1">
+            ORDER BY bg_val DESC
+        </if>
+        <if test="isDb == 2">
+            ORDER BY cb_val, db_val DESC
+        </if>
+        <if test="isCb == 3">
+            ORDER BY cb_val DESC
+        </if>
+        <if test="isBg != 1 and isDb != 2 and isCb != 3">
+            ORDER BY company_id ASC, index_name ASC
+        </if>
     </select>
 
     <select id="selectList" resultType="com.ims.eval.entity.PerformanceBenchmarkInfo">