Quellcode durchsuchen

国产矿匹配根据物资长度降序

liyg vor 2 Jahren
Ursprung
Commit
f34ee55214

+ 5 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstrainLoadingResultMapper.xml

@@ -1387,7 +1387,11 @@
     <if test="unloadPoint!=null and unloadPoint!=''.toString()">
       and  INSTR(db.RESULT_FOREIGN_SHIP_NAME, #{unloadPoint}) > 0
     </if>
-    ORDER BY apo.PURCHASE_ORDER_DATE DESC
+    ORDER BY
+    <if test="productName!=null and productName!=''.toString()">
+      nvl(length(trim(rm.MATERIAL_NAME)),0) DESC,--品名匹配物资名,按物资长度降序,匹配得多的在前
+    </if>
+    apo.PURCHASE_ORDER_DATE DESC
     )
   </select>