ccj 2 gadi atpakaļ
vecāks
revīzija
eb20e1ffc9

+ 40 - 41
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -1649,54 +1649,53 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
                 warehouseBaseInfo.setOutCount(dataCount2);
             }
-        } else {
-            String staffId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffId();
-            List<CommonStaffRole> staffRoles = commonStaffRoleService.selectList(new EntityWrapper<CommonStaffRole>().eq("staff_id", staffId));
-            List<CommonRole> list = new ArrayList<>();
-            for (CommonStaffRole commonStaffRole : staffRoles) {
-                list.add(commonRoleService.selectById(commonStaffRole.getRoleId()));
-            }
-            for (CommonRole commonRole : list) {
-                if (commonRole.getRoleName().contains("内勤") || commonRole.getRoleName().contains("决策人") || commonRole.getRoleName().contains("财务") || commonRole.getRoleName().contains("出纳") || commonRole.getRoleName().equals("系统管理员") || commonRole.getRoleName().contains("总")) {
-                    List<WarehouseBaseInfo> warehouseBaseInfoList1 = this.selectList(new EntityWrapper<WarehouseBaseInfo>()
-                            .eq("comp_id", compId)
-                            .orderBy("warehouse_type", true)
-                            .eq("delete_flag", "0"));
-                    for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList1) {
-                        warehouseBaseInfo.setFlag("全部");
-                        //查潮粮单价已审核的数据
+        }
+        String staffId = AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffId();
+        List<CommonStaffRole> staffRoles = commonStaffRoleService.selectList(new EntityWrapper<CommonStaffRole>().eq("staff_id", staffId));
+        List<CommonRole> list = new ArrayList<>();
+        for (CommonStaffRole commonStaffRole : staffRoles) {
+            list.add(commonRoleService.selectById(commonStaffRole.getRoleId()));
+        }
+        for (CommonRole commonRole : list) {
+            if (commonRole.getRoleName().contains("内勤") || commonRole.getRoleName().contains("决策人") || commonRole.getRoleName().contains("财务") || commonRole.getRoleName().contains("出纳") || commonRole.getRoleName().equals("系统管理员") || commonRole.getRoleName().contains("总")) {
+                List<WarehouseBaseInfo> warehouseBaseInfoList1 = this.selectList(new EntityWrapper<WarehouseBaseInfo>()
+                        .eq("comp_id", compId)
+                        .orderBy("warehouse_type", true)
+                        .eq("delete_flag", "0"));
+                for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList1) {
+                    warehouseBaseInfo.setFlag("全部");
+                    //查潮粮单价已审核的数据
 //                        List<PurchasePrice> purchasePriceList=purchasePriceService.selectList(new EntityWrapper<PurchasePrice>()
 //                                .eq("warehouse_id",warehouseBaseInfo.getId())
 //                                .eq("status_flag","3"));
 //                        if (!CollectionUtils.isEmpty(purchasePriceList)){
 //                            warehouseBaseInfo.setPurchasePriceList(purchasePriceList);
 //                        }
-                        Map<String, Object> pageView = new HashMap<>();
-                        pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
-                        pageView.put("compId", warehouseBaseInfo.getCompId());
-                        pageView.put("serviceManagementType", "3");
-                        // 查询收购质检信息包括已删除的
-                        Integer dataCount = baseMapper.getCountByCondition(pageView);
-                        Map<String, Object> pageView1 = new HashMap<>();
-                        pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
-                        pageView1.put("compId", warehouseBaseInfo.getCompId());
-                        pageView1.put("serviceManagementType", "1");
-                        // 查询贸易质检信息包括已删除的
-                        Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
-                        warehouseBaseInfo.setCount(dataCount);
-                        warehouseBaseInfo.setTradeCount(dataCount1);
-                        Map<String, Object> pageView2 = new HashMap<>();
-                        pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
-                        pageView2.put("compId", warehouseBaseInfo.getCompId());
-                        pageView2.put("serviceManagementType", "2");
-                        // 查询出库信息包括已删除的
-                        Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
-                        warehouseBaseInfo.setOutCount(dataCount2);
-                        warehouseBaseInfoList.add(warehouseBaseInfo);
-                    }
-                    break;
-//                    return warehouseBaseInfoList;
+                    Map<String, Object> pageView = new HashMap<>();
+                    pageView.put("warehouseName", warehouseBaseInfo.getWarehouseName());
+                    pageView.put("compId", warehouseBaseInfo.getCompId());
+                    pageView.put("serviceManagementType", "3");
+                    // 查询收购质检信息包括已删除的
+                    Integer dataCount = baseMapper.getCountByCondition(pageView);
+                    Map<String, Object> pageView1 = new HashMap<>();
+                    pageView1.put("warehouseName", warehouseBaseInfo.getWarehouseName());
+                    pageView1.put("compId", warehouseBaseInfo.getCompId());
+                    pageView1.put("serviceManagementType", "1");
+                    // 查询贸易质检信息包括已删除的
+                    Integer dataCount1 = baseMapper.getCountByCondition(pageView1);
+                    warehouseBaseInfo.setCount(dataCount);
+                    warehouseBaseInfo.setTradeCount(dataCount1);
+                    Map<String, Object> pageView2 = new HashMap<>();
+                    pageView2.put("warehouseName", warehouseBaseInfo.getWarehouseName());
+                    pageView2.put("compId", warehouseBaseInfo.getCompId());
+                    pageView2.put("serviceManagementType", "2");
+                    // 查询出库信息包括已删除的
+                    Integer dataCount2 = baseMapper.getCountByCondition(pageView2);
+                    warehouseBaseInfo.setOutCount(dataCount2);
+                    warehouseBaseInfoList.add(warehouseBaseInfo);
                 }
+                break;
+//                    return warehouseBaseInfoList;
             }
         }
         if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {