Forráskód Böngészése

库位视图显示-优化

(cherry picked from commit 72ca190675ab30422ba657a607b177afb5ec92ed)
k 2 éve
szülő
commit
27abfbd6c8

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
ruoyi-ui/src/assets/icons/svg/pallet.svg


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
ruoyi-ui/src/assets/icons/svg/pallet01.svg


+ 24 - 5
warewms-ams/src/main/java/com/ruoyi/ams/locationView/service/LocationViewService.java

@@ -17,10 +17,7 @@ import com.ruoyi.common.utils.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
 /**
  * Created by IntelliJ IDEA.
  * Created by IntelliJ IDEA.
@@ -132,7 +129,7 @@ public class LocationViewService {
                 int index = 0;
                 int index = 0;
                 for (BaseLocationGuiDTO b : locList) {
                 for (BaseLocationGuiDTO b : locList) {
                     // 层号
                     // 层号
-                    String shiftNo = b.getShiftNo();
+                    String shiftNo = b.getRowNoShiftNo();
                     // 列号
                     // 列号
                     String locNo = b.getColNo();
                     String locNo = b.getColNo();
                     index++;
                     index++;
@@ -185,6 +182,28 @@ public class LocationViewService {
             }
             }
             guiDTOS.add(basLocationGuiExtDTO);
             guiDTOS.add(basLocationGuiExtDTO);
         }
         }
+        // 填充
+        for (BasLocationGuiExtDTO guiDTO : guiDTOS) {
+            List<BasLocationGuiColDTO> basLocationGuiColDTOList = guiDTO.getBasLocationGuiColDTOS();
+            int maxSize = basLocationGuiColDTOList
+                    .stream()
+                    .mapToInt(t -> t.getBaseLocationGuiDTOList().size())
+                    .max()
+                    .getAsInt();
+            basLocationGuiColDTOList.stream().forEach(v -> {
+                int size = v.getBaseLocationGuiDTOList().size();
+                List<BaseLocationGuiDTO> locationGuiDTOList = v.getBaseLocationGuiDTOList();
+                int num = 0;
+                if (size < maxSize) {
+                    num = maxSize - size;
+                    for (int i = 0; i < num; i++) {
+                        BaseLocationGuiDTO dto = new BaseLocationGuiDTO();
+                        locationGuiDTOList.add(dto);
+                    }
+                }
+            });
+
+        }
         return guiDTOS;
         return guiDTOS;
     }
     }
 }
 }

+ 2 - 1
warewms-base/src/main/java/com/ruoyi/base/domain/dto/BasLocationGuiColDTO.java

@@ -3,6 +3,7 @@ package com.ruoyi.base.domain.dto;
 import lombok.Data;
 import lombok.Data;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -19,7 +20,7 @@ public class BasLocationGuiColDTO {
     /**
     /**
      * 列号对应的库存信息
      * 列号对应的库存信息
      */
      */
-    private List<BaseLocationGuiDTO> baseLocationGuiDTOList = new ArrayList<>();
+    private List<BaseLocationGuiDTO> baseLocationGuiDTOList = new LinkedList<>();
 
 
     public void addBaslocation(BaseLocationGuiDTO baseLocationGuiDTO) {
     public void addBaslocation(BaseLocationGuiDTO baseLocationGuiDTO) {
         baseLocationGuiDTOList.add(baseLocationGuiDTO);
         baseLocationGuiDTOList.add(baseLocationGuiDTO);

+ 9 - 0
warewms-base/src/main/java/com/ruoyi/base/domain/dto/BaseLocationGuiDTO.java

@@ -30,6 +30,7 @@ public class BaseLocationGuiDTO extends BaseLocationInfo {
     private String sku;
     private String sku;
     private String skuName;
     private String skuName;
     private String isEmptyPlate;
     private String isEmptyPlate;
+    private String rowNoShiftNo;
 
 
     public String getLotatt01() {
     public String getLotatt01() {
         return lotatt01;
         return lotatt01;
@@ -198,4 +199,12 @@ public class BaseLocationGuiDTO extends BaseLocationInfo {
     public void setIsEmptyPlate(String isEmptyPlate) {
     public void setIsEmptyPlate(String isEmptyPlate) {
         this.isEmptyPlate = isEmptyPlate;
         this.isEmptyPlate = isEmptyPlate;
     }
     }
+
+    public String getRowNoShiftNo() {
+        return rowNoShiftNo;
+    }
+
+    public void setRowNoShiftNo(String rowNoShiftNo) {
+        this.rowNoShiftNo = rowNoShiftNo;
+    }
 }
 }

+ 2 - 2
warewms-base/src/main/resources/mapper/base/BaseLocationInfoMapper.xml

@@ -582,7 +582,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <!-- 库位视图-->
     <!-- 库位视图-->
     <select id="queryByListAllInvLotAttView" resultType="com.ruoyi.base.domain.dto.BaseLocationGuiDTO" parameterType="Object">
     <select id="queryByListAllInvLotAttView" resultType="com.ruoyi.base.domain.dto.BaseLocationGuiDTO" parameterType="Object">
         select t1.zone_id zoneId,t1.id,t1.location_no locationNo
         select t1.zone_id zoneId,t1.id,t1.location_no locationNo
-             ,t1.shift_no shiftNo,t1.shift_index shiftIndex,t1.col_no colNo,t1.col_index colIndex
+             ,CONCAT(t1.row_no,t1.shift_no) rowNoShiftNo,t1.shift_no shiftNo,t1.shift_index shiftIndex,t1.col_no colNo,t1.col_index colIndex
              ,t1.stock_status stockStatus,t1.is_empty isEmpty
              ,t1.stock_status stockStatus,t1.is_empty isEmpty
              ,t4.lotatt01,t4.lotatt02,t4.lotatt03,t4.lotatt04,t4.lotatt05,t4.lotatt06
              ,t4.lotatt01,t4.lotatt02,t4.lotatt03,t4.lotatt04,t4.lotatt05,t4.lotatt06
              ,t4.lotatt07,t4.lotatt08,t4.lotatt09,t4.lotatt10,t4.lotatt11,t4.lotatt12
              ,t4.lotatt07,t4.lotatt08,t4.lotatt09,t4.lotatt10,t4.lotatt11,t4.lotatt12
@@ -597,7 +597,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where t1.zone_id = #{zoneId} and t1.id not in (99997, 99998, 99999)
         where t1.zone_id = #{zoneId} and t1.id not in (99997, 99998, 99999)
         <choose>
         <choose>
             <when test=" sort == '1'.toString() ">
             <when test=" sort == '1'.toString() ">
-                ORDER BY t1.shift_no + 0,t1.location_no
+                ORDER BY CONCAT(t1.row_no,t1.shift_no),t1.location_no
             </when >
             </when >
             <when test=" sort == '2'.toString() ">
             <when test=" sort == '2'.toString() ">
                 ORDER BY t1.col_no + 0,t1.location_no
                 ORDER BY t1.col_no + 0,t1.location_no