From 06c4e59fa35c1b9e74da9cf3d081e78c13d17e20 Mon Sep 17 00:00:00 2001 From: yangyang Date: 星期一, 14 七月 2025 06:36:36 +0800 Subject: [PATCH] no message --- 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