From 3ca6bd00d03f10f8faa1e62af8ebe23bc2f2d79b Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Thu, 7 Dec 2023 11:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=99=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../win/module/wms/service/rule/RuleServiceImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java index 3747f97c..94874db5 100644 --- a/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java +++ b/win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/rule/RuleServiceImpl.java @@ -8,13 +8,10 @@ import com.google.common.annotations.VisibleForTesting; import com.win.framework.common.pojo.CustomConditions; import com.win.framework.common.pojo.PageResult; import com.win.framework.datapermission.core.util.DataPermissionUtils; -import com.win.module.wms.controller.itembasic.vo.ItembasicExportReqVO; import com.win.module.wms.controller.rule.vo.*; import com.win.module.wms.convert.rule.RuleConvert; -import com.win.module.wms.dal.dataobject.itembasic.ItembasicDO; import com.win.module.wms.dal.dataobject.rule.RuleDO; import com.win.module.wms.dal.mysql.rule.RuleMapper; -import org.checkerframework.checker.units.qual.A; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -492,7 +489,6 @@ public class RuleServiceImpl implements RuleService { @Override public RuleRespVO batch(String supplierCode, String customerCode, String abcClass, String itemType, String itemGroup, String project, String itemCode) { - System.out.println("99999999:" + itemCode); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("strategy_code", "S010"); queryWrapper.orderByDesc("priority"); @@ -620,7 +616,7 @@ public class RuleServiceImpl implements RuleService { for(int i = 0; i < conditionArray.size(); i++) { JSONObject conditionObject = conditionArray.getJSONObject(i); for (String key : params.keySet()) { - if(key.equals(conditionObject.get("ParamCode"))) { + if(key.equals(conditionObject.get("ParamCode")) && conditionObject.get("ParamCode") != null) { boolean result = this.checkCondition(conditionObject, key, params.get(key)); if(!result) { return false; @@ -640,9 +636,9 @@ public class RuleServiceImpl implements RuleService { */ private boolean checkCondition(JSONObject conditionObject, String paramCode, String paramValue) { if(conditionObject.get("ParamCode").equals(paramCode)) { - String operator = conditionObject.get("ParamCode").toString(); + String operator = conditionObject.get("Operator").toString(); String value = conditionObject.get("Value").toString(); - if(paramValue != null && paramValue.isEmpty()) { + if(paramValue != null && !paramValue.isEmpty()) { if(operator.equals("==")) { if(value.equals(paramValue)) { return true;