فهرست منبع

Merge remote-tracking branch 'origin/jnmc-jinco-featurt-lw' into jnmc-jinco

zhangxin 1 سال پیش
والد
کامیت
90f22527a5

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warewms/ams/InvLotLocIdController.java

@@ -4,6 +4,7 @@ import com.ruoyi.ams.inv.domain.InvLotLocId;
 import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdAdjForm;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdMoveForm;
+import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattLargeScreenVO;
 import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
 import com.ruoyi.ams.inv.service.IInvLotLocIdService;
 import com.ruoyi.base.constant.Constant;
@@ -44,6 +45,16 @@ public class InvLotLocIdController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 查询库位库存信息大屏列表
+     */
+    @PreAuthorize("@ss.hasPermi('ams:invLotLocId:list')")
+    @GetMapping("/largeScreenList")
+    public TableDataInfo largeScreen(InvLocIdSearchFrom invLocIdSearchFrom) {
+        List<InvLotLocIdLotattLargeScreenVO> invLocIdLotattList = invLotLocIdService.selectInvLocIdLotattLargeScreenList(invLocIdSearchFrom);
+        return getDataTable(invLocIdLotattList);
+    }
+
     /**
      * 库存调整
      */

+ 24 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/domain/vo/InvLotLocIdLotattLargeScreenVO.java

@@ -0,0 +1,24 @@
+package com.ruoyi.ams.inv.domain.vo;
+
+import lombok.Data;
+
+
+@Data
+public class InvLotLocIdLotattLargeScreenVO {
+    /**
+     * 库区名
+     */
+    private String zoneName;
+
+    /**
+     * 重量(吨)
+     */
+    private Double weight;
+
+    /**
+     * 托盘数
+     */
+    private Integer palletNum;
+
+
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 52 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/domain/vo/InvLotLocIdLotattVO.java


+ 9 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/IInvLotLocIdService.java

@@ -12,6 +12,7 @@ import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdAdjForm;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdForm;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdMoveForm;
+import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattLargeScreenVO;
 import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
 import com.ruoyi.base.domain.BaseLocationInfo;
 import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
@@ -68,6 +69,14 @@ public interface IInvLotLocIdService {
      */
     List<InvLotLocIdLotattVO> selectInvLocIdLotattList(InvLocIdSearchFrom invLocIdSearchFrom);
 
+    /**
+     * 查询物料批次信息大屏列表
+     *
+     * @param invLocIdSearchFrom
+     * @return
+     */
+    List<InvLotLocIdLotattLargeScreenVO> selectInvLocIdLotattLargeScreenList(InvLocIdSearchFrom invLocIdSearchFrom);
+
     /**
      * 查询库位库存信息
      *

+ 31 - 0
warewms-ams/src/main/java/com/ruoyi/ams/inv/service/impl/InvLotLocIdServiceImpl.java

@@ -1,5 +1,7 @@
 package com.ruoyi.ams.inv.service.impl;
 
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.ruoyi.ams.box.domain.WmsBoxInfo;
 import com.ruoyi.ams.box.service.IWmsBoxInfoService;
@@ -12,6 +14,7 @@ import com.ruoyi.ams.inv.domain.InvLotLocId;
 import com.ruoyi.ams.inv.domain.form.InvLocIdSearchFrom;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdAdjForm;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdMoveForm;
+import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattLargeScreenVO;
 import com.ruoyi.ams.inv.domain.vo.InvLotLocIdLotattVO;
 import com.ruoyi.ams.inv.mapper.InvLotAttMapper;
 import com.ruoyi.ams.inv.mapper.InvLotLocIdMapper;
@@ -39,6 +42,7 @@ import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 库位库存信息Service业务层处理
@@ -124,6 +128,33 @@ public class InvLotLocIdServiceImpl implements IInvLotLocIdService {
         return invLotLocIdMapper.selectInvLocIdLotattList(invLocIdSearchFrom);
     }
 
+    @Override
+    public List<InvLotLocIdLotattLargeScreenVO> selectInvLocIdLotattLargeScreenList(InvLocIdSearchFrom invLocIdSearchFrom) {
+
+        List<InvLotLocIdLotattVO> invLotLocIdLotattVOS = invLotLocIdMapper.selectInvLocIdLotattList(invLocIdSearchFrom);
+        if(CollectionUtil.isEmpty(invLotLocIdLotattVOS)){
+            return new ArrayList<>();
+        }
+        List<InvLotLocIdLotattLargeScreenVO> invLotLocIdLotattLargeScreenVOS = invLotLocIdLotattVOS
+                .stream()
+                .filter(item -> StringUtils.isNotBlank(item.getZoneName()) && ObjectUtil.isNotNull(item.getQty()))
+                .collect(Collectors.groupingBy(InvLotLocIdLotattVO::getZoneName))
+                .entrySet()
+                .stream()
+                .map(entry -> {
+                    InvLotLocIdLotattLargeScreenVO largeScreenVO = new InvLotLocIdLotattLargeScreenVO();
+                    largeScreenVO.setZoneName(entry.getKey());
+                    largeScreenVO.setWeight(entry.getValue().stream().mapToDouble(InvLotLocIdLotattVO::getQty).sum());
+                    largeScreenVO.setPalletNum(entry.getValue().size());
+                    return largeScreenVO;
+                })
+                .collect(Collectors.toList());
+        return invLotLocIdLotattLargeScreenVOS;
+
+
+    }
+
+
     /**
      * 查询库位库存信息
      *