From a18b8e051947411bab76769efc20b4814d7e0674 Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期二, 20 五月 2025 16:26:56 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.50.149:8085/r/aps-backend into dev
---
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
index 6da9ad7..5bb509d 100644
--- a/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
+++ b/aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlate/ApsPlateProcessShopStatServiceImpl.java
@@ -266,8 +266,7 @@
.toList();
// 鑾峰彇璁″垝鍒楄〃鍜岀姸鎬佸垪琛�
- List<ApsPlatePlan> planList = Optional.ofNullable(apsPlatePlanMapper.selectApsPlatePlanList(platePlan))
- .orElse(Collections.emptyList());
+ List<ApsPlateProcessShopPlanStat> planList = apsPlateProcessShopStatMapper.selectPlatePlanBaseTable();
List<ApsPlateProcessShopStat> shopStates = Optional.ofNullable(apsPlateProcessShopStatMapper.selectApsPlateProcessShopStatList(new ApsPlateProcessShopStat()))
.orElse(Collections.emptyList());
@@ -281,26 +280,22 @@
List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status");
// 鏋勫缓缁撴灉鍒楄〃
- List<ApsPlateProcessShopPlanStat> shopPlanStats = planList.stream()
- .map(plan -> {
- ApsPlateProcessShopPlanStat shopPlanStat = new ApsPlateProcessShopPlanStat();
- BeanUtils.copyProperties(plan, shopPlanStat); // 纭繚鐩爣瀵硅薄鏄悎娉曠殑鍗曚釜瀵硅薄瀹炰緥
-
+ planList.forEach(
+ plan -> {
// 鏍规嵁 docNo 鑾峰彇瀵瑰簲鐨� shopStatList
List<ApsPlateProcessShopStat> shopStatList = shopStatesByDocNo.getOrDefault(plan.getDocumentNumber(), Collections.emptyList());
- shopPlanStat.setDeptPlans(shopStatList);
+ plan.setDeptPlans(shopStatList);
if (businessTypeDic != null) {
businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType())).findFirst()
- .ifPresent(sysDictData -> shopPlanStat.setBusinessType(sysDictData.getDictLabel()));
+ .ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel()));
}
if (documentStatusDic != null) {
documentStatusDic.stream().filter(x->x.getDictValue().equals(plan.getDocumentStatus()))
- .findFirst().ifPresent(sysDictData -> shopPlanStat.setDocumentStatus(sysDictData.getDictLabel()));
+ .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel()));
}
- return shopPlanStat;
- }).toList();
+ });
// 鏋勫缓杩斿洖缁撴灉
- AjaxResult success = AjaxResult.success(shopPlanStats);
+ AjaxResult success = AjaxResult.success(planList);
success.put("shopNames", shopList);
return success;
}
--
Gitblit v1.9.3