From fcbb4059f11d1e2b320d581bf6f960d9965142c6 Mon Sep 17 00:00:00 2001 From: pjb <123456> Date: 星期二, 08 七月 2025 08:58:18 +0800 Subject: [PATCH] Merge branch 'ycds-wms-dev' of http://47.97.1.152:5880/r/zy-asrs-master into ycds-wms-dev --- zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java index 07f2e47..7b21abb 100644 --- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java +++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java @@ -1,12 +1,30 @@ -package com.zy.asrs.wms.asrs.service.impl; - -import com.zy.asrs.wms.asrs.mapper.MatMapper; -import com.zy.asrs.wms.asrs.entity.Mat; -import com.zy.asrs.wms.asrs.service.MatService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -@Service("matService") -public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService { - -} +package com.zy.asrs.wms.asrs.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.zy.asrs.wms.asrs.entity.MatFieldValue; +import com.zy.asrs.wms.asrs.mapper.MatMapper; +import com.zy.asrs.wms.asrs.entity.Mat; +import com.zy.asrs.wms.asrs.service.MatFieldValueService; +import com.zy.asrs.wms.asrs.service.MatService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service("matService") +public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService { + + @Autowired + private MatFieldValueService matFieldValueService; + + @Override + public List<Mat> parseMat(List<Mat> list) { + for (Mat mat : list) { + List<MatFieldValue> matFieldValueList = matFieldValueService.list(new LambdaQueryWrapper<MatFieldValue>() + .eq(MatFieldValue::getMatId, mat.getId())); + mat.syncField(matFieldValueList); + } + return list; + } +} -- Gitblit v1.9.1