skyouc
2025-08-05 4d0a406c204d3a9c590fc713a6dc2fce60b9d012
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/OrderServiceImpl.java
@@ -1,6 +1,7 @@
package com.zy.asrs.wms.asrs.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.zy.asrs.framework.common.Cools;
import com.zy.asrs.framework.exception.CoolException;
import com.zy.asrs.wms.asrs.entity.*;
@@ -304,7 +305,17 @@
    }
    @Override
    public List<OrderInfoDto> getDetlForOrderId(Long id) {
        return this.baseMapper.getDetlForOrderId(id);
    public List<OrderInfoDto> getDetlForOrderId(Long id, String matnr) {
        if (!Objects.isNull(matnr)) {
            Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>()
                    .eq(StringUtils.isNotBlank(matnr), Mat::getMatnr, matnr), false);
            if (Objects.isNull(mat)) {
                return this.baseMapper.getDetlForOrderId(id, null);
            } else {
                return this.baseMapper.getDetlForOrderId(id, mat.getId());
            }
        } else {
            return this.baseMapper.getDetlForOrderId(id, null);
        }
    }
}