From f800f8c750529e56b9bd08dc705ead135bb00c2f Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Thu, 15 Aug 2024 14:31:38 +0800 Subject: [PATCH] '123' --- .../web/controller/redBook/RedBookController.java | 15 ++++++++------- .../com/ruoyi/redBook/mapper/OARedBookMapper.java | 5 ++--- .../ruoyi/redBook/service/IRedBookService.java | 5 ++--- .../redBook/service/impl/RedBookServiceImpl.java | 7 +++---- .../resources/mapper/redBook/OARedBookMapper.xml | 11 ++++------- .../views/components/Tools/ChangeRecord/index.vue | 6 +++--- ruoyi-ui/src/views/redBook/productSelect.vue | 8 +++----- 7 files changed, 25 insertions(+), 32 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java index 771e510..28c3891 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java @@ -221,14 +221,15 @@ public class RedBookController extends BaseController public List handleSearchData(Product product) { List list = new ArrayList<>(); - String name_0 = product.getName_0();//型号 - String model = product.getModel();//规格 - if(!StringUtils.isBlank(name_0) || !StringUtils.isBlank(model) ){ - if(!StringUtils.isBlank(name_0)){ - name_0 = name_0.replace(" ",""); - name_0 = name_0.toUpperCase(); + String model = product.getModel();//规格规格 + List sqlParam = new ArrayList(); + + if(!StringUtils.isBlank(model)){ + String[] split = model.split("\\s"); + for(String each : split){ + sqlParam.add(each.toUpperCase()); } - list = redBookService.handleSearchData(name_0,model); + list = redBookService.handleSearchData(sqlParam); } return list; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java index f9a4465..320fe6a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java @@ -71,11 +71,10 @@ public interface OARedBookMapper /** * 点击查询按钮查询数据 - * @param name_0 - * @param model + * @param sqlParam * @return */ - List handleSearchData(@Param("name_0")String name_0,@Param("model")String model); + List handleSearchData(List sqlParam); /** * 保存报价单 diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java index 7717479..f4d21a8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java @@ -67,11 +67,10 @@ public interface IRedBookService /** * 点击查询按钮查询数据 - * @param name_0 - * @param model + * @param sqlParam * @return */ - List handleSearchData(String name_0,String model); + List handleSearchData(List sqlParam); /** * 保存报价单 diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java index 47397b6..fb66eea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java @@ -103,13 +103,12 @@ public class RedBookServiceImpl implements IRedBookService /** * 点击查询按钮查询数据 - * @param name_0 - * @param model + * @param sqlParam * @return */ @Override - public List handleSearchData(String name_0,String model) { - return oaRedBookMapper.handleSearchData(name_0,model); + public List handleSearchData(List sqlParam) { + return oaRedBookMapper.handleSearchData(sqlParam); } /** diff --git a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml index 376239b..6f7bbba 100644 --- a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml @@ -73,13 +73,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" convert(decimal,convert(float,A.红本价格)) price,convert(varchar(10),B.date_0,23) pricedate from [rb_product_price] A left join rb_productVersion B on A.version_uid_0=B.uid_0 - where B.sta_0=1 - - and A.型号 like '%${name_0}%' - - - and A.规格 = #{model} - + where B.sta_0=1 and + + A.namevoltage like '%${item}%' + order by len(A.namevoltage) diff --git a/ruoyi-ui/src/views/components/Tools/ChangeRecord/index.vue b/ruoyi-ui/src/views/components/Tools/ChangeRecord/index.vue index 2a87dd4..6e99e10 100644 --- a/ruoyi-ui/src/views/components/Tools/ChangeRecord/index.vue +++ b/ruoyi-ui/src/views/components/Tools/ChangeRecord/index.vue @@ -1,7 +1,7 @@