Quellcode durchsuchen

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/DAL-DAZHOU-RMS-API

zx vor 2 Jahren
Ursprung
Commit
6c7d203fd6

+ 5 - 1
src/main/java/com/steerinfo/dil/controller/RmsLineController.java

@@ -73,13 +73,17 @@ public class RmsLineController extends BaseRESTfulController {
                                         Integer pageNum,
                                         Integer pageSize,
                                         Integer apiId,
-                                        String con){
+                                        String con,
+                                        Integer lineType){
 
         if(con != null){
             if(!"".equals(con) && !"null".equals(con)){
                 mapValue.put("index", con);
             }
         }
+        if(lineType != null&&lineType == 1){
+            mapValue.put("lineTypes",1);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsLineMapper.getAllLineDesk(mapValue);

+ 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);
 }

+ 3 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsLineMapper.xml

@@ -583,6 +583,9 @@
         <if test="index != null">
           and instr(RL.LINE_NAME, #{index}) > 0
         </if>
+        <if test="lineTypes != null and lineTypes == 1">
+          and RL.LINE_TYPE = 1
+        </if>
         )
     <where>
       <if test="lineNo != null">

+ 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>