From 24da7a0d3f96e03fa825ff66f3910a957cc881ff Mon Sep 17 00:00:00 2001 From: Vinjor Date: Wed, 27 Nov 2024 15:12:15 +0800 Subject: [PATCH] no message --- .../iocoder/yudao/module/project/vo/RepairWaresRespVO.java | 2 ++ .../stockOperate/service/impl/DlRepairSoServiceImpl.java | 6 ++++-- .../module/tickets/service/impl/DlTwItemServiceImpl.java | 6 ++++-- .../cn/iocoder/yudao/module/tickets/vo/AppWaresGroupVO.java | 2 ++ .../src/main/resources/mapper/project/RepairWaresMapper.xml | 6 +++++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/vo/RepairWaresRespVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/vo/RepairWaresRespVO.java index 7179757c..fbc89815 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/vo/RepairWaresRespVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/vo/RepairWaresRespVO.java @@ -18,6 +18,8 @@ public class RepairWaresRespVO extends RepairWares { private String typeName; /**类型名称*/ private String warehouseName; + /**计量单位名称*/ + private String unitText; /**关联子公司*/ List corpIds = new ArrayList<>(); diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java index c4bdcc86..9bfe8db2 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java @@ -557,7 +557,8 @@ public class DlRepairSoServiceImpl extends ServiceImpl } }).collect(Collectors.toList())); waresGroupVO.setGroupName("未知分组"); - waresGroupVO.setNums(nullList.size()); + waresGroupVO.setTypeNums(nullList.size()); + waresGroupVO.setNums(nullList.stream().mapToInt(DlTwItem::getWaresCount).sum()); waresGroupVO.setAllowNum(numArray[0]); waresGroupVO.setNoNum(numArray[1]); waresGroupVO.setWaitingNum(numArray[2]); @@ -229,7 +230,8 @@ public class DlTwItemServiceImpl extends ServiceImpl }).collect(Collectors.toList())); waresGroupVO.setGroupName(groupListMap.get(key).get(0).getTypeName()); waresGroupVO.setGroupId(key); - waresGroupVO.setNums(groupListMap.get(key).size()); + waresGroupVO.setTypeNums(groupListMap.get(key).size()); + waresGroupVO.setNums(groupListMap.get(key).stream().mapToInt(DlTwItem::getWaresCount).sum()); waresGroupVO.setAllowNum(numArray[0]); waresGroupVO.setNoNum(numArray[1]); waresGroupVO.setWaitingNum(numArray[2]); diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/AppWaresGroupVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/AppWaresGroupVO.java index 9f3b04ce..82f185ac 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/AppWaresGroupVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/AppWaresGroupVO.java @@ -17,6 +17,8 @@ public class AppWaresGroupVO { private String groupId; /** 分组名称(分类名称) */ private String groupName; + /** 配件总类型数量 */ + private Integer typeNums; /** 配件总数量 */ private Integer nums; /** 总价 */ diff --git a/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml b/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml index 89679d42..a298ea5e 100644 --- a/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml @@ -13,12 +13,14 @@ drw.*, dbt.`name` AS typeName, dbw.`name` AS warehouseName, + sdd.label AS unit_text, GROUP_CONCAT( bc.corp_name ) AS corpNames FROM dl_repair_wares drw LEFT JOIN base_company bc ON FIND_IN_SET( bc.id, drw.corp_id ) > 0 LEFT JOIN dl_base_type dbt ON drw.type = dbt.id AND dbt.deleted = 0 LEFT JOIN dl_base_warehouse dbw ON drw.warehouse = dbw.id AND dbw.deleted = 0 + LEFT JOIN system_dict_data sdd ON drw.unit = sdd.value AND sdd.dict_type='repair_unit' drw.deleted = 0 @@ -49,10 +51,12 @@ \ No newline at end of file