Browse Source

pda移库查询的库区列表sql

LZH 1 year ago
parent
commit
03f4fc6636

+ 16 - 8
warewms-base/src/main/java/com/ruoyi/base/mapper/BaseLocationZoneMapper.java

@@ -5,15 +5,15 @@ import com.ruoyi.base.domain.BaseLocationZone;
 
 /**
  * 库区Mapper接口
- * 
+ *
  * @author andy
  * @date 2022-02-15
  */
-public interface BaseLocationZoneMapper 
+public interface BaseLocationZoneMapper
 {
     /**
      * 查询库区
-     * 
+     *
      * @param zoneId 库区主键
      * @return 库区
      */
@@ -21,15 +21,23 @@ public interface BaseLocationZoneMapper
 
     /**
      * 查询库区列表
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 库区集合
      */
      List<BaseLocationZone> selectBaseLocationZoneList(BaseLocationZone baseLocationZone);
 
+    /**
+     * pda查询库区列表
+     *
+     * @param baseLocationZone 库区
+     * @return 库区集合
+     */
+    List<BaseLocationZone> selectBaseLocationZoneList1(BaseLocationZone baseLocationZone);
+
     /**
      * 新增库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -37,7 +45,7 @@ public interface BaseLocationZoneMapper
 
     /**
      * 修改库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -45,7 +53,7 @@ public interface BaseLocationZoneMapper
 
     /**
      * 删除库区
-     * 
+     *
      * @param zoneId 库区主键
      * @return 结果
      */
@@ -53,7 +61,7 @@ public interface BaseLocationZoneMapper
 
     /**
      * 批量删除库区
-     * 
+     *
      * @param zoneIds 需要删除的数据主键集合
      * @return 结果
      */

+ 16 - 8
warewms-base/src/main/java/com/ruoyi/base/service/IBaseLocationZoneService.java

@@ -7,15 +7,15 @@ import com.ruoyi.base.domain.vo.TreeSelectVO;
 
 /**
  * 库区Service接口
- * 
+ *
  * @author andy
  * @date 2022-02-15
  */
-public interface IBaseLocationZoneService 
+public interface IBaseLocationZoneService
 {
     /**
      * 查询库区
-     * 
+     *
      * @param zoneId 库区主键
      * @return 库区
      */
@@ -23,15 +23,23 @@ public interface IBaseLocationZoneService
 
     /**
      * 查询库区列表
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 库区集合
      */
      List<BaseLocationZone> selectBaseLocationZoneList(BaseLocationZone baseLocationZone);
 
+    /**
+     * pda查询库区列表
+     *
+     * @param baseLocationZone 库区
+     * @return 库区集合
+     */
+    List<BaseLocationZone> selectBaseLocationZoneList1(BaseLocationZone baseLocationZone);
+
     /**
      * 新增库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -39,7 +47,7 @@ public interface IBaseLocationZoneService
 
     /**
      * 修改库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -47,7 +55,7 @@ public interface IBaseLocationZoneService
 
     /**
      * 批量删除库区
-     * 
+     *
      * @param zoneIds 需要删除的库区主键集合
      * @return 结果
      */
@@ -55,7 +63,7 @@ public interface IBaseLocationZoneService
 
     /**
      * 删除库区信息
-     * 
+     *
      * @param zoneId 库区主键
      * @return 结果
      */

+ 19 - 7
warewms-base/src/main/java/com/ruoyi/base/service/impl/BaseLocationZoneServiceImpl.java

@@ -16,7 +16,7 @@ import com.ruoyi.base.service.IBaseLocationZoneService;
 
 /**
  * 库区Service业务层处理
- * 
+ *
  * @author andy
  * @date 2022-02-15
  */
@@ -28,7 +28,7 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
 
     /**
      * 查询库区
-     * 
+     *
      * @param zoneId 库区主键
      * @return 库区
      */
@@ -40,7 +40,7 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
 
     /**
      * 查询库区列表
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 库区
      */
@@ -50,9 +50,21 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
         return baseLocationZoneMapper.selectBaseLocationZoneList(baseLocationZone);
     }
 
+    /**
+     * pda查询库区列表
+     *
+     * @param baseLocationZone 库区
+     * @return 库区
+     */
+    @Override
+    public List<BaseLocationZone> selectBaseLocationZoneList1(BaseLocationZone baseLocationZone)
+    {
+        return baseLocationZoneMapper.selectBaseLocationZoneList1(baseLocationZone);
+    }
+
     /**
      * 新增库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -65,7 +77,7 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
 
     /**
      * 修改库区
-     * 
+     *
      * @param baseLocationZone 库区
      * @return 结果
      */
@@ -78,7 +90,7 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
 
     /**
      * 批量删除库区
-     * 
+     *
      * @param zoneIds 需要删除的库区主键
      * @return 结果
      */
@@ -90,7 +102,7 @@ public class BaseLocationZoneServiceImpl implements IBaseLocationZoneService
 
     /**
      * 删除库区信息
-     * 
+     *
      * @param zoneId 库区主键
      * @return 结果
      */

+ 14 - 0
warewms-base/src/main/resources/mapper/base/BaseLocationZoneMapper.xml

@@ -39,6 +39,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by z.userdefine2
     </select>
 
+    <select id="selectBaseLocationZoneList1" parameterType="BaseLocationZone" resultMap="BaseLocationZoneResult">
+        select z.zone_id, z.zone_name,w.warehouse_name, z.warehouse_id, z.status, z.userdefine1, z.userdefine2, z.userdefine3, z.userdefine4, z.userdefine5, z.create_by, z.create_time, z.update_by, z.update_time, z.remark
+        from base_location_zone z
+        left join base_warehouse w on z.warehouse_id = w.warehouse_id
+        <where>
+            <if test="zoneId != null  and zoneId != ''"> and z.zone_id = #{zoneId}</if>
+            <if test="zoneName != null  and zoneName != ''"> and z.zone_name like concat('%', #{zoneName}, '%')</if>
+            <if test="warehouseId != null "> and z.warehouse_id = #{warehouseId}</if>
+            <if test="status != null  and status != ''"> and z.status = #{status}</if>
+        </where>
+        where z.zone_id in (4,5)
+        order by z.userdefine2
+    </select>
+
     <select id="selectBaseLocationZoneByZoneId" parameterType="Long" resultMap="BaseLocationZoneResult">
         <include refid="selectBaseLocationZoneVo"/>
         where zone_id = #{zoneId}