From 0edc9cd23d8787f93fe52afac0577e327f67cbbe Mon Sep 17 00:00:00 2001 From: wenwj <‘1106994300@qq.com> Date: 星期五, 11 四月 2025 08:59:06 +0800 Subject: [PATCH] 工艺路线后端,和其他部分代码优化 --- aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java index 54805ba..27b6162 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/controller/ApsPlatePlanController.java @@ -39,8 +39,22 @@ @RequiresPermissions("ApsPlatePlan:ApsPlatePlan:list") @GetMapping("/list") public TableDataInfo list(ApsPlatePlan apsPlatePlan) { - startPage(); + //startPage(); List<ApsPlatePlan> list = apsPlatePlanService.selectApsPlatePlanList(apsPlatePlan); + List<SysDictData> suspendedDic = DictUtils.getDictCache("aps_is_suspended"); + List<SysDictData> businessTypeDic = DictUtils.getDictCache("aps_business_type"); + List<SysDictData> documentStatusDic = DictUtils.getDictCache("aps_document_status"); + List<SysDictData> accountDic = DictUtils.getDictCache("aps_account"); + list.parallelStream().forEach(plan->{ + documentStatusDic.stream().filter(x -> x.getDictValue().equals( plan.getDocumentStatus().trim())) + .findFirst().ifPresent(sysDictData -> plan.setDocumentStatus(sysDictData.getDictLabel())); + accountDic.stream().filter(x -> x.getDictValue().equals( plan.getAccount().trim())) + .findFirst().ifPresent(sysDictData -> plan.setAccount(sysDictData.getDictLabel())); + businessTypeDic.stream().filter(x -> x.getDictValue().equals(plan.getBusinessType().trim())) + .findFirst().ifPresent(sysDictData -> plan.setBusinessType(sysDictData.getDictLabel())); + suspendedDic.stream().filter(x -> x.getDictValue().equals( plan.getIsSuspended())) + .findFirst().ifPresent(sysDictData -> plan.setIsSuspended(sysDictData.getDictLabel())); + }); return getDataTable(list); } -- Gitblit v1.9.3