瀏覽代碼

修改SQL

liyg 2 年之前
父節點
當前提交
ed4c5cd092
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/main/resources/com/steerinfo/dil/mapper/WmshGridMaterialMapper.xml

+ 3 - 2
src/main/resources/com/steerinfo/dil/mapper/WmshGridMaterialMapper.xml

@@ -492,9 +492,10 @@
                            on RM.MATERIAL_ID = DB.MATERIAL_ID
                  left join RMS_PORT RP
                            on RP.PORT_ID = WOR.HARBOR_ID
+        where RP.PORT_NAME='万州港'
         <if test="con!=null">
-        where  instr(RM.MATERIAL_NAME , #{con}) > 0 or instr( TLT.RESULT_WAGON_NO, #{con}) > 0 or
-                instr(DB.RESULT_FOREIGN_SHIP_NAME,#{con}) > 0 or instr( RP.PORT_NAME,#{con}) > 0
+           and (instr(RM.MATERIAL_NAME , #{con}) > 0 or instr( TLT.RESULT_WAGON_NO, #{con}) > 0 or
+                instr(DB.RESULT_FOREIGN_SHIP_NAME,#{con}) > 0 or instr( RP.PORT_NAME,#{con}) > 0)
         </if>
         Order By  WOR.RESULT_NUMBER desc
     </select>