From f35fc1f577af2cb76198a520f47b4c7b85fb170e Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期四, 21 十二月 2023 15:19:52 +0800
Subject: [PATCH] 合并订单bug修改

---
 src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java
index 213c542..48d8271 100644
--- a/src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/LocRuleServiceImpl.java
@@ -1,20 +1,20 @@
 package com.zy.asrs.service.impl;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.core.common.Cools;
 import com.zy.asrs.entity.LocMast;
+import com.zy.asrs.entity.LocRule;
 import com.zy.asrs.entity.Mat;
 import com.zy.asrs.mapper.LocRuleMapper;
-import com.zy.asrs.entity.LocRule;
 import com.zy.asrs.service.LocMastService;
 import com.zy.asrs.service.LocRuleService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.zy.asrs.service.MatService;
 import com.zy.asrs.utils.Utils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.List;
 
 @Service("locRuleService")
@@ -38,6 +38,30 @@
         return this.baseMapper.selectByMatnr(matnr);
     }
 
+    @Override
+    public List<LocRule> findCode(String matnr,String other) {
+        if (Cools.isEmpty(matnr)) {
+            return null;
+        }
+        Mat mat = matService.selectByMatnr(matnr);
+        if (Cools.isEmpty(mat)) {
+            return null;
+        }
+        if(Cools.isEmpty(mat.getBrand())){
+            return null;
+        }
+
+        Wrapper<LocRule> wrapper = new EntityWrapper<LocRule>()
+                .eq("matnr",mat.getBrand().substring(0,4))
+                .eq("mixed",0)
+                .eq("status",1);
+
+        Utils.wapperSetCondition(wrapper,"other",other);
+
+        return this.selectList(wrapper);
+
+    }
+
     //鎵炬贩杞藉簱浣嶈鍒�
     @Override
     public List<LocRule> findMixed() {

--
Gitblit v1.9.1