From 7bec3c51febd3595f0b8f369cbe24b8577c4e05f Mon Sep 17 00:00:00 2001 From: Kelvin Date: Fri, 6 Dec 2024 09:54:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ktg/mes/md/mapper/BaseKnifeMapper.java | 2 ++ .../com/ktg/mes/md/mapper/UcmCtMaterialMapper2.java | 2 ++ .../mes/wm/service/impl/UcmCtBaseServiceImpl.java | 13 +++++-------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java index cc8c34c..25b6d43 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/BaseKnifeMapper.java @@ -2,6 +2,7 @@ package com.ktg.mes.md.mapper; import com.ktg.mes.md.domain.BaseKnife; import com.ktg.mes.md.domain.MdItem; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -12,6 +13,7 @@ import java.util.List; * @author yinjinlu * @date 2024-10-31 */ +@Mapper public interface BaseKnifeMapper { /** * 查询工具台账 diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/UcmCtMaterialMapper2.java b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/UcmCtMaterialMapper2.java index 980b511..6493b54 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/mapper/UcmCtMaterialMapper2.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/mapper/UcmCtMaterialMapper2.java @@ -1,6 +1,7 @@ package com.ktg.mes.md.mapper; import com.ktg.mes.wm.domain.UcmCtMaterial; +import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -10,6 +11,7 @@ import java.util.List; * @author yinjinlu * @date 2024-11-15 */ +@Mapper public interface UcmCtMaterialMapper2 { /** * 查询料箱物料绑定 diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java index 249f295..7e4da12 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/UcmCtBaseServiceImpl.java @@ -12,6 +12,7 @@ import com.ktg.mes.wm.domain.box.BoxItem; import com.ktg.mes.wm.domain.box.RfidCard; import com.ktg.mes.wm.mapper.UcmCtBaseMapper; import com.ktg.mes.wm.service.IUcmCtBaseService; +import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -28,15 +29,11 @@ import static org.apache.commons.lang3.SystemUtils.getUserName; * @date 2024-10-31 */ @Service +@RequiredArgsConstructor public class UcmCtBaseServiceImpl implements IUcmCtBaseService { - @Autowired - private UcmCtBaseMapper ucmCtBaseMapper; - - @Autowired - private BaseKnifeMapper baseKnifeMapper; - - @Autowired - private UcmCtMaterialMapper2 ucmCtMaterialMapper2; + private final UcmCtBaseMapper ucmCtBaseMapper; + private final BaseKnifeMapper baseKnifeMapper; + private final UcmCtMaterialMapper2 ucmCtMaterialMapper2; /** * 查询料箱管理