From e86f1aa88d45b3e0689fd0f3b8732cf5e0eee4f4 Mon Sep 17 00:00:00 2001 From: mashuai Date: Thu, 15 Jan 2026 10:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lease/controller/LeaseTaskController.java | 11 ++++++++++ .../lease/mapper/LeaseTaskMapper.java | 6 ++++++ .../lease/service/ILeaseTaskService.java | 6 ++++++ .../service/impl/LeaseTaskServiceImpl.java | 21 +++++++++++++++++++ .../ma/controller/TypeController.java | 3 +-- .../bonus/material/ma/mapper/TypeMapper.java | 2 +- .../material/ma/service/ITypeService.java | 3 +-- .../ma/service/impl/TypeServiceImpl.java | 4 ++-- .../material/lease/LeaseApplyInfoMapper.xml | 4 ++-- .../mapper/material/lease/LeaseTaskMapper.xml | 14 ++++++++++++- .../mapper/material/ma/TypeMapper.xml | 3 --- 11 files changed, 64 insertions(+), 13 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java index 815b295b..2d26ab91 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java @@ -423,6 +423,17 @@ public class LeaseTaskController extends BaseController { return success(listByMaType); } + /** + * 领用申请领用物资类型连动式下拉框(专用) + * @return + */ + @ApiOperation(value = "获取领用物资类型连动式下拉框") + @GetMapping("/equipmentThreeTypeLease") + public AjaxResult equipmentThreeTypeLease() { + List listByMaType = service.getEquipmentThreeTypeLease(); + return success(listByMaType); + } + /** * 领用申请撤回功能 * 将任务状态撤回到--待提交 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java index c4be35ed..abc1546d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java @@ -363,4 +363,10 @@ public interface LeaseTaskMapper { * @return */ Type isRs(Long newTypeId); + + /** + * 查询领用申请三级分类 + * @return + */ + List selectLeaseThreeTypeLease(); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java index 99dd1f7f..fe094cd3 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/ILeaseTaskService.java @@ -178,5 +178,11 @@ public interface ILeaseTaskService { * @return */ AjaxResult getBusinessFormByCode(LeaseApplyInfo leaseApplyInfo); + + /** + * 查询领用申请3级--前端联动式下拉框 + * @return + */ + List getEquipmentThreeTypeLease(); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java index fc9cb8fc..1e1ca145 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java @@ -1516,6 +1516,27 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService { } } + /** + * 查询领用申请3级 + * @return + */ + @Override + public List getEquipmentThreeTypeLease() { + List maTypes = mapper.selectLeaseThreeTypeLease(); + List list = new ArrayList<>(); + for (Type maType : maTypes) { + if (maType.getParentId() == 0) { + list.add(maType); + } + } + //根据父节点获取对应的儿子节点 + for (Type maType : list) { + List child = getChild(maTypes, maType.getTypeId()); + maType.setChildren(child); + } + return list; + } + /** * 生成发布批次任务 * @param thisMonthMaxOrder diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java index 03219985..a9930809 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeController.java @@ -207,8 +207,7 @@ public class TypeController extends BaseController { @ApiOperation(value = "获取领用物资类型连动式下拉框") @GetMapping("/equipmentTypeLease") public AjaxResult equipmentTypeLease(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) { - Long deptId = typeService.getUserDeptId(); - List listByMaType = typeService.equipmentTypeLease(typeId, typeName, deptId); + List listByMaType = typeService.equipmentTypeLease(typeId, typeName); return success(listByMaType); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java index 3cca8af8..78648bb8 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeMapper.java @@ -286,5 +286,5 @@ public interface TypeMapper { * @param typeName * @return */ - List equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName, @Param("companyId") Long companyId); + List equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java index 0a1ba604..f5f26a8a 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeService.java @@ -170,10 +170,9 @@ public interface ITypeService { * 获取领用物资类型连动式下拉框 * @param typeId * @param typeName - * @param deptId * @return */ - List equipmentTypeLease(Long typeId, String typeName, Long deptId); + List equipmentTypeLease(Long typeId, String typeName); Long getUserDeptId(); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java index 491e8bbb..5f7ef3cd 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeServiceImpl.java @@ -356,8 +356,8 @@ public class TypeServiceImpl implements ITypeService { * @return */ @Override - public List equipmentTypeLease(Long typeId, String typeName, Long deptId) { - List maTypes = typeMapper.equipmentTypeLease(typeId, typeName, deptId); + public List equipmentTypeLease(Long typeId, String typeName) { + List maTypes = typeMapper.equipmentTypeLease(typeId, typeName); List roots = maTypes.stream() .filter(t -> t.getParentId() == 0) .collect(Collectors.toList()); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index 3eb55b22..1bc2b87f 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and lai.direct_audit_by = #{directAuditBy} and lai.direct_audit_time = #{directAuditTime} and lai.direct_audit_remark = #{directAuditRemark} - and lai.company_id = #{companyId} + and mt.company_id = #{companyId}