From 5c2d2f6119815b8d578f6a5dd74db7c997a645f9 Mon Sep 17 00:00:00 2001 From: mashuai Date: Thu, 6 Mar 2025 18:20:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/common/biz/aspect/StoreLogAspect.java | 1 + .../common/biz/domain/lease/LeaseOutDetails.java | 3 +++ .../bonus/material/basic/domain/OutRecordInfo.java | 9 +++++++++ .../service/impl/LeaseOutDetailsServiceImpl.java | 2 ++ .../material/ma/controller/TypeController.java | 11 +++++++++++ .../com/bonus/material/ma/mapper/TypeMapper.java | 7 +++++++ .../bonus/material/ma/service/ITypeService.java | 7 +++++++ .../material/ma/service/impl/TypeServiceImpl.java | 11 +++++++++++ .../mapper/material/basic/ComplexQueryMapper.xml | 14 +++++++++++--- .../resources/mapper/material/ma/TypeMapper.xml | 9 +++++++++ 10 files changed, 71 insertions(+), 3 deletions(-) diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java index 9ea70a1b..2376ada6 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/aspect/StoreLogAspect.java @@ -144,6 +144,7 @@ public class StoreLogAspect { bmStorageLog.setManageType(String.valueOf(leaseOutDetails.getManageType())); bmStorageLog.setTypeModelName(leaseOutDetails.getTypeName()); bmStorageLog.setPreStoreNum(leaseOutDetails.getPreStoreNum()); + bmStorageLog.setAgreementId(leaseOutDetails.getAgreementId()); //数量类型设备 if (leaseOutDetails.getManageType().equals(MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId())) { bmStorageLog.setOutNum(leaseOutDetails.getInputNum()); diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java index 04a3a14b..d9af335b 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseOutDetails.java @@ -102,4 +102,7 @@ public class LeaseOutDetails extends BaseEntity { @ApiModelProperty(value = "发布批次") private String publishTask; + + @ApiModelProperty(value = "协议id") + private Long agreementId; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java index c5e34c6d..1d53dc27 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java @@ -98,4 +98,13 @@ public class OutRecordInfo { @ApiModelProperty(value = "装备管理方式") private String manageType; + + @ApiModelProperty(value = "三级ID") + private Integer thirdTypeId; + + @ApiModelProperty(value = "二级ID") + private Integer secondTypeId; + + @ApiModelProperty(value = "一级ID") + private Integer firstTypeId; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java index ddadac5e..0390062e 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseOutDetailsServiceImpl.java @@ -442,6 +442,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { BigDecimal outNum = record.getOutNum(); sltAgreementInfo.setNum(num.add(outNum)); res = sltAgreementInfoMapper.updSltInfo(sltAgreementInfo); + record.setAgreementId(sltAgreementInfo.getAgreementId()); } else { String agreementId = " "; agreementId = tmTaskAgreementMapper.getAgreementId(taskId); @@ -462,6 +463,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService { } } res = sltAgreementInfoMapper.insSltInfo(record, agreementId, maType); + record.setAgreementId(Long.valueOf(agreementId)); } return res; } 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 c547c702..229466a5 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 @@ -120,6 +120,17 @@ public class TypeController extends BaseController { } } + /** + * 查询一级列表 + * @param maTypeVo + * @return + */ + @ApiOperation(value = "查询一级列表") + @GetMapping("/getListLevel") + public AjaxResult getListLevel(MaTypeVo maTypeVo) { + return typeService.getListLevel(maTypeVo); + } + /** * 根据物资仓库ID查询施工类型 */ 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 cbe2d2ce..b6ca8868 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 @@ -189,4 +189,11 @@ public interface TypeMapper { * @return */ List selectMaTypeThreeLists(Long agreementId); + + /** + * 查询一级列表 + * @param maTypeVo + * @return + */ + List getListLevel(MaTypeVo maTypeVo); } 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 3fd9e583..7ba9a874 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 @@ -130,4 +130,11 @@ public interface ITypeService { * @return */ List getEquipmentThreeTypes(Long typeId, Long agreementId); + + /** + * 查询一级列表 + * @param maTypeVo + * @return + */ + AjaxResult getListLevel(MaTypeVo maTypeVo); } 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 f9b50eaa..cee4c3c4 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 @@ -183,6 +183,17 @@ public class TypeServiceImpl implements ITypeService { return list; } + /** + * 查询一级列表 + * @param maTypeVo + * @return + */ + @Override + public AjaxResult getListLevel(MaTypeVo maTypeVo) { + List maTypeVos = typeMapper.getListLevel(maTypeVo); + return AjaxResult.success(maTypeVos); + } + @Override public List selectMaTypeListByHouseId(Long houseId) { 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 e4773d9c..7a4cdc1c 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 @@ -321,11 +321,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHEN bs.out_type = '2' THEN '二维码' WHEN bs.out_type = '3' THEN '标准箱' ELSE '未知入库方式' - END AS outStyle + END AS outStyle, + mt3.type_id as firstTypeId, + mt2.type_id as secondTypeId FROM bm_storage_log bs - LEFT JOIN tm_task_agreement tta ON tta.task_id = bs.task_id - LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id + LEFT JOIN bm_agreement_info bai ON bai.agreement_id = bs.agreement_id LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id @@ -333,6 +334,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND mt.del_flag = '0' LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id AND mt1.del_flag = '0' + LEFT JOIN ma_type mt2 ON mt1.parent_id = mt2.type_id + AND mt2.del_flag = '0' + LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id + AND mt3.del_flag = '0' LEFT JOIN tm_task tt ON bs.task_id = tt.task_id WHERE bs.out_num != 0 @@ -358,6 +363,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bs.type_model_name like CONCAT('%',#{typeModelName},'%') + + and mt3.type_id = #{firstTypeId} + AND bs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') 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 7c383c08..45549938 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 @@ -918,4 +918,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE sai.agreement_id = #{agreementId} AND sai.STATUS = '0') + +