no message

This commit is contained in:
Vinjor 2024-11-27 15:12:15 +08:00
parent 9f28180481
commit 24da7a0d3f
5 changed files with 17 additions and 5 deletions

View File

@ -18,6 +18,8 @@ public class RepairWaresRespVO extends RepairWares {
private String typeName; private String typeName;
/**类型名称*/ /**类型名称*/
private String warehouseName; private String warehouseName;
/**计量单位名称*/
private String unitText;
/**关联子公司*/ /**关联子公司*/
List<String> corpIds = new ArrayList<>(); List<String> corpIds = new ArrayList<>();

View File

@ -557,7 +557,8 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
AppWaresGroupVO waresGroupVO = new AppWaresGroupVO(); AppWaresGroupVO waresGroupVO = new AppWaresGroupVO();
waresGroupVO.setSoiRespVOList(nullList); waresGroupVO.setSoiRespVOList(nullList);
waresGroupVO.setGroupName("未知分组"); waresGroupVO.setGroupName("未知分组");
waresGroupVO.setNums(nullList.size()); waresGroupVO.setTypeNums(nullList.size());
waresGroupVO.setNums(nullList.stream().mapToInt(DlRepairSoi::getGoodsCount).sum());
waresGroupList.add(waresGroupVO); waresGroupList.add(waresGroupVO);
} }
//过滤出有分类的进行分组 //过滤出有分类的进行分组
@ -567,7 +568,8 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
waresGroupVO.setSoiRespVOList(groupListMap.get(key)); waresGroupVO.setSoiRespVOList(groupListMap.get(key));
waresGroupVO.setGroupName(groupListMap.get(key).get(0).getTypeName()); waresGroupVO.setGroupName(groupListMap.get(key).get(0).getTypeName());
waresGroupVO.setGroupId(key); waresGroupVO.setGroupId(key);
waresGroupVO.setNums(groupListMap.get(key).size()); waresGroupVO.setTypeNums(groupListMap.get(key).size());
waresGroupVO.setNums(groupListMap.get(key).stream().mapToInt(DlRepairSoi::getGoodsCount).sum());
waresGroupList.add(waresGroupVO); waresGroupList.add(waresGroupVO);
} }
} }

View File

@ -199,7 +199,8 @@ public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
} }
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
waresGroupVO.setGroupName("未知分组"); waresGroupVO.setGroupName("未知分组");
waresGroupVO.setNums(nullList.size()); waresGroupVO.setTypeNums(nullList.size());
waresGroupVO.setNums(nullList.stream().mapToInt(DlTwItem::getWaresCount).sum());
waresGroupVO.setAllowNum(numArray[0]); waresGroupVO.setAllowNum(numArray[0]);
waresGroupVO.setNoNum(numArray[1]); waresGroupVO.setNoNum(numArray[1]);
waresGroupVO.setWaitingNum(numArray[2]); waresGroupVO.setWaitingNum(numArray[2]);
@ -229,7 +230,8 @@ public class DlTwItemServiceImpl extends ServiceImpl<DlTwItemMapper, DlTwItem>
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
waresGroupVO.setGroupName(groupListMap.get(key).get(0).getTypeName()); waresGroupVO.setGroupName(groupListMap.get(key).get(0).getTypeName());
waresGroupVO.setGroupId(key); 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.setAllowNum(numArray[0]);
waresGroupVO.setNoNum(numArray[1]); waresGroupVO.setNoNum(numArray[1]);
waresGroupVO.setWaitingNum(numArray[2]); waresGroupVO.setWaitingNum(numArray[2]);

View File

@ -17,6 +17,8 @@ public class AppWaresGroupVO {
private String groupId; private String groupId;
/** 分组名称(分类名称) */ /** 分组名称(分类名称) */
private String groupName; private String groupName;
/** 配件总类型数量 */
private Integer typeNums;
/** 配件总数量 */ /** 配件总数量 */
private Integer nums; private Integer nums;
/** 总价 */ /** 总价 */

View File

@ -13,12 +13,14 @@
drw.*, drw.*,
dbt.`name` AS typeName, dbt.`name` AS typeName,
dbw.`name` AS warehouseName, dbw.`name` AS warehouseName,
sdd.label AS unit_text,
GROUP_CONCAT( bc.corp_name ) AS corpNames GROUP_CONCAT( bc.corp_name ) AS corpNames
FROM FROM
dl_repair_wares drw dl_repair_wares drw
LEFT JOIN base_company bc ON FIND_IN_SET( bc.id, drw.corp_id ) > 0 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_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 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'
<where> <where>
drw.deleted = 0 drw.deleted = 0
<if test="entity.name != null and entity.name != ''"> <if test="entity.name != null and entity.name != ''">
@ -49,10 +51,12 @@
</select> </select>
<select id="selectAllType" resultType="java.util.Map"> <select id="selectAllType" resultType="java.util.Map">
SELECT SELECT
tmp.type as id, tmp.type AS id,
dbt.`name` dbt.`name`
FROM FROM
( SELECT DISTINCT type FROM dl_repair_wares ) tmp ( SELECT DISTINCT type FROM dl_repair_wares ) tmp
LEFT JOIN dl_base_type dbt ON tmp.type = dbt.id LEFT JOIN dl_base_type dbt ON tmp.type = dbt.id
WHERE tmp.type is not null AND tmp.type !=''
ORDER BY dbt.create_time DESC
</select> </select>
</mapper> </mapper>