From ff6e83188f8142e9df2a055df2a8c5fd780b9ae7 Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 14 Jan 2026 11:11:46 +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 --- .../ClzSltAgreementInfoController.java | 8 ++++---- .../material/ma/controller/TypeController.java | 3 ++- .../bonus/material/ma/mapper/TypeMapper.java | 2 +- .../bonus/material/ma/service/ITypeService.java | 3 ++- .../ma/service/impl/TypeServiceImpl.java | 4 ++-- .../material/basic/ComplexQueryMapper.xml | 17 ++++++++++++++++- .../resources/mapper/material/ma/TypeMapper.xml | 5 +++++ 7 files changed, 32 insertions(+), 10 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java index 8c18eb42..83902989 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/clz/controller/ClzSltAgreementInfoController.java @@ -956,8 +956,8 @@ public class ClzSltAgreementInfoController extends BaseController { list.add("计量单位"); list.add("租赁单价"); list.add("租赁数量"); - list.add("领料日期"); - list.add("归还日期"); + list.add("租赁开始日期"); + list.add("租赁结束日期"); list.add("租赁天数"); list.add("出场日期"); list.add("超期日期"); @@ -970,8 +970,8 @@ public class ClzSltAgreementInfoController extends BaseController { list.add("计量单位"); list.add("租赁单价"); list.add("租赁数量"); - list.add("领料日期"); - list.add("归还日期"); + list.add("租赁开始日期"); + list.add("租赁结束日期"); list.add("租赁天数"); list.add("出场日期"); list.add("超期日期"); 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 a9930809..03219985 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,7 +207,8 @@ public class TypeController extends BaseController { @ApiOperation(value = "获取领用物资类型连动式下拉框") @GetMapping("/equipmentTypeLease") public AjaxResult equipmentTypeLease(@RequestParam(required = false) Long typeId, @RequestParam(required = false) String typeName) { - List listByMaType = typeService.equipmentTypeLease(typeId, typeName); + Long deptId = typeService.getUserDeptId(); + List listByMaType = typeService.equipmentTypeLease(typeId, typeName, deptId); 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 78648bb8..3cca8af8 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); + List equipmentTypeLease(@Param("typeId") Long typeId, @Param("typeName") String typeName, @Param("companyId") Long companyId); } 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 f5f26a8a..0a1ba604 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,9 +170,10 @@ public interface ITypeService { * 获取领用物资类型连动式下拉框 * @param typeId * @param typeName + * @param deptId * @return */ - List equipmentTypeLease(Long typeId, String typeName); + List equipmentTypeLease(Long typeId, String typeName, Long deptId); 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 5f7ef3cd..491e8bbb 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) { - List maTypes = typeMapper.equipmentTypeLease(typeId, typeName); + public List equipmentTypeLease(Long typeId, String typeName, Long deptId) { + List maTypes = typeMapper.equipmentTypeLease(typeId, typeName, deptId); List roots = maTypes.stream() .filter(t -> t.getParentId() == 0) .collect(Collectors.toList()); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml index 5b55a8c0..6cb3d327 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml @@ -63,7 +63,12 @@ WHEN bp.actual_end_date is not null THEN '1' ELSE '0' END as isFinish, - bp.actual_end_date as actualEndDate + bp.actual_end_date as actualEndDate, + mt.jiju_type as jijuType, + CASE + WHEN bu.type_id = 1731 THEN '0' + ELSE '1' + END as isTeam FROM bm_agreement_info bai LEFT JOIN slt_agreement_info sai ON sai.agreement_id = bai.agreement_id @@ -118,6 +123,16 @@ and sai.is_slt = #{isSlt} + + and mt.jiju_type = #{jijuType} + + + and bu.type_id + + = 1731 + != 1731 + + GROUP BY bai.agreement_id, mt.type_id diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml index 9cc86ca4..2260295f 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeMapper.xml @@ -261,6 +261,7 @@ sampling_ratio, is_enter, jiJu_type, + company_id, #{typeName}, @@ -298,6 +299,7 @@ #{samplingRatio}, #{isEnter}, #{jiJuType}, + #{companyId}, @@ -1522,6 +1524,9 @@ AND m.type_id = #{typeId} + + AND m.company_id=#{companyId} +