Ver código fonte

修改模糊查询port和pier

liyg 2 anos atrás
pai
commit
c6198351da

+ 3 - 2
src/main/java/com/steerinfo/dil/mapper/RmsPortMapper.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.mapper;
 import com.steerinfo.dil.model.RmsPort;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
@@ -21,8 +22,8 @@ public interface RmsPortMapper extends IBaseMapper<RmsPort, BigDecimal> {
     List<Map<String, Object>> getPortType();
 
      //边输边查港口名称
-    List<Map<String, Object>> getPortName(String index);
+    List<Map<String, Object>> getPortName(@Param("index")String index);
 
     //边输边查码头名称
-    List<Map<String, Object>> getPierName(String index);
+    List<Map<String, Object>> getPierName(@Param("index")String index);
 }

+ 1 - 1
src/main/resources/application-prod.yml

@@ -12,7 +12,7 @@ openFeign:
     ESFeign:
       url: ${ESFEIGN_URL:172.16.33.166:8089}
     ColumnDataFeign:
-      url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+      url: ${COLUMNDATAFEIGN_URL:172.16.33.161:8083}
     AmsFeign:
       url: ${AMSFEIGN_URL:172.16.33.166:8079}
 

+ 10 - 5
src/main/resources/com/steerinfo/dil/mapper/RmsPortMapper.xml

@@ -440,8 +440,11 @@
         RP.PORT_NAME "value",
         RP.PORT_NAME "portName"
       from   RMS_PORT   RP
-      where instr(RP.PORT_NAME, #{index}) > 0
-        and RP.DELETED=0
+      where
+        RP.DELETED=0
+        <if test="index!=null and index!=''.toString()">
+          and   instr(RP.PORT_NAME, #{index}) > 0
+        </if>
       order by "value"
     </select>
 
@@ -450,10 +453,12 @@
     select
       RP.PIER_ID "pierId",
       RP.PIER_NAME "value",
-      RP.PIER_NAME "portName"
+      RP.PIER_NAME "pierName"
           from   RMS_PIER   RP
-    where instr(RP.PIER_NAME, #{index}) > 0
-    and RP.DELETED=0
+    where RP.DELETED=0
+    <if test="index!=null and index!=''.toString()">
+      and   instr(RP.PIER_NAME, #{index}) > 0
+    </if>
     order by "value"
   </select>