瀏覽代碼

2020/1/29 17:38

jzdsh 4 年之前
父節點
當前提交
3cdd0f7c21

+ 19 - 1
src/main/java/com/yc/education/controller/admin/ProviderAdminController.java

@@ -119,6 +119,7 @@ public class ProviderAdminController extends BaseController {
             @RequestParam(defaultValue = "") Integer brandId,
             @RequestParam(defaultValue = "") String status,
             @RequestParam(defaultValue = "") String isUse,
+            @RequestParam(defaultValue = "") String paramTypeStr,
             @RequestParam(defaultValue = "1") Integer pageNum,
             @RequestParam(defaultValue = "10") Integer pageSize
     ) {
@@ -150,9 +151,25 @@ public class ProviderAdminController extends BaseController {
         if("- 县/区".equals(district.trim())){
             district = null;
         }
+        /*根据经营类别筛选的数据处理*/
+        String paramTypeValue = "";//用来存放paramType数据
+        String pMainValue = "";//用来存放维修保养,美容洗车,电子与改装
+        if (StringUtils.isBlank(paramTypeStr)){         //值为空时
+            paramTypeValue ="";
+            pMainValue="";
+        }else {
+            if ("2".equals(paramTypeStr.trim())||"3".equals(paramTypeStr.trim())){      //当表示商用车专修和4S店时,将传来的值赋值给paramTypeValue,pMainValue置空
+                paramTypeValue = paramTypeStr.trim();
+                pMainValue   = "";
+            }else {               //将字符串拆到数组中,第一个元素就是paramType,第二个就是pMainvalue
+                String[] paramTypeArr = paramTypeStr.split(",");
+                paramTypeValue = paramTypeArr[0];
+                pMainValue     = paramTypeArr[1];
+            }
+        }
 
         if (StringUtils.isBlank(isImport) || Objects.equals("-1", isImport)) isImport = null; //查询全部
-        List< Provider > listAllProviderInfo = iProviderService.listAllProviderInfo(province,city,district,name,isImport, company, brandId, status, isUse, pageNum, pageSize);//查询服务商信息并分页
+        List< Provider > listAllProviderInfo = iProviderService.listAllProviderInfo(province,city,district,name,isImport, company, brandId, status, isUse,paramTypeValue,pMainValue, pageNum, pageSize);//查询服务商信息并分页
 
 
         List< Authentication > listAllAuthentication = iAuthenticationService.listAuthenticationInfoProvider("", "", "", "", 1, Integer.MAX_VALUE);
@@ -213,6 +230,7 @@ public class ProviderAdminController extends BaseController {
         mav.addObject("brandId", brandId);
         mav.addObject("status", status);
         mav.addObject("isUse", isUse);
+        mav.addObject("paramTypeStr",paramTypeStr);
         mav.addObject("isImport", isImport);
         mav.addObject("pageNum", pageNum);
         mav.addObject("pageSize", pageSize);

+ 11 - 1
src/main/java/com/yc/education/controller/admin/SupplierAdminController.java

@@ -25,6 +25,7 @@ import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -122,6 +123,7 @@ public class SupplierAdminController extends BaseController {
      * @param brandId
      * @param status
      * @param isUse
+     * @param  paramTypeStr
      * @param pageNum
      * @param pageSize
      * @return
@@ -137,10 +139,17 @@ public class SupplierAdminController extends BaseController {
             @RequestParam(defaultValue = "") Integer brandId,
             @RequestParam(defaultValue = "") String status,
             @RequestParam(defaultValue = "") String isUse,
+            @RequestParam(defaultValue = "") String paramTypeStr,
             @RequestParam(defaultValue = "1") Integer pageNum,
             @RequestParam(defaultValue = "10") Integer pageSize) {
 
         ModelAndView mav = new ModelAndView( );
+        String[] paramType;
+        if (StringUtils.isBlank(paramTypeStr)){
+            paramType = null;
+        }else {
+             paramType = paramTypeStr.split(",");
+        }
 
         mav.addObject("province1", province);
         mav.addObject("city", city);
@@ -170,7 +179,7 @@ public class SupplierAdminController extends BaseController {
         }
 
         if(StringUtils.isBlank(isImport) || Objects.equals("-1",isImport)) isImport =null; //查询全部
-        List< Provider > listAllSupplierInfo = iProviderService.listAllSupplierInfo(province,city,district,name,isImport, company, brandId, status, isUse, pageNum, pageSize);//多条件查询
+        List< Provider > listAllSupplierInfo = iProviderService.listAllSupplierInfo(province,city,district,name,isImport, company, brandId, status, isUse, paramType, pageNum, pageSize);//多条件查询
 
         List< Authentication > listAllAuthentication = iAuthenticationService.listAuthenticationInfoProvider(null, "", "", "", 1, Integer.MAX_VALUE);
 
@@ -236,6 +245,7 @@ public class SupplierAdminController extends BaseController {
         mav.addObject("isUse", isUse);
         mav.addObject("isImport", isImport);
         mav.addObject("name", name);
+        mav.addObject("paramTypeStr",paramTypeStr);
         mav.addObject("pageNum", pageNum);
         mav.addObject("pageSize", pageSize);
 

+ 2 - 2
src/main/java/com/yc/education/mapper/ProviderMapper.java

@@ -53,7 +53,7 @@ public interface ProviderMapper extends MyMapper< Provider > {
      * @param isUse
      * @return
      */
-    List< Provider > listAllProviderInfo(@Param("province")String province,@Param("city")String city,@Param("district")String district,@Param("name")String name,@Param("isImport")String isImport,@Param("company") String company, @Param("brandId") Integer brandId, @Param("status") String status, @Param("isUse") String isUse);
+    List< Provider > listAllProviderInfo(@Param("province")String province,@Param("city")String city,@Param("district")String district,@Param("name")String name,@Param("isImport")String isImport,@Param("company") String company, @Param("brandId") Integer brandId, @Param("status") String status, @Param("isUse") String isUse,@Param("paramTypeValue") String paramTypeValue,@Param("pMainValue") String pMainValue);
 
     /**
      * 查询供应商信息
@@ -63,7 +63,7 @@ public interface ProviderMapper extends MyMapper< Provider > {
      * @param isUse
      * @return
      */
-    List< Provider > listAllSupplierInfo(@Param("province")String province,@Param("city")String city,@Param("district")String district,@Param("name")String name,@Param("isImport") String isImport,@Param("company") String company, @Param("brandId") Integer brandId, @Param("status") String status, @Param("isUse") String isUse);
+    List< Provider > listAllSupplierInfo(@Param("province")String province,@Param("city")String city,@Param("district")String district,@Param("name")String name,@Param("isImport") String isImport,@Param("company") String company, @Param("brandId") Integer brandId, @Param("status") String status, @Param("isUse") String isUse,@Param("paramType") String[] paramType);
 
 
     /**

+ 2 - 2
src/main/java/com/yc/education/service/IProviderService.java

@@ -41,7 +41,7 @@ public interface IProviderService extends IService<Provider> {
      * @param pageSize
      * @return
      */
-    List<Provider> listAllProviderInfo(String province,String city,String district,String name,String isImport,String company, Integer brandId, String status, String isUse, Integer pageNum, Integer pageSize);
+    List<Provider> listAllProviderInfo(String province,String city,String district,String name,String isImport,String company, Integer brandId, String status, String isUse,String paramTypeValue,String pMainValue, Integer pageNum, Integer pageSize);
 
 
     /**
@@ -54,7 +54,7 @@ public interface IProviderService extends IService<Provider> {
      * @param pageSize
      * @return
      */
-    List<Provider> listAllSupplierInfo(String province,String city,String district,String name,String isImport,String company,Integer brandId, String status, String isUse, Integer pageNum, Integer pageSize);
+    List<Provider> listAllSupplierInfo(String province,String city,String district,String name,String isImport,String company,Integer brandId, String status, String isUse,String[] paramType, Integer pageNum, Integer pageSize);
     List<Provider> listAllSupplierInfo();
     /**
      *  服务商 小型汽车/商用车

+ 4 - 4
src/main/java/com/yc/education/service/impl/ProviderServiceImpl.java

@@ -1060,9 +1060,9 @@ public class ProviderServiceImpl extends BaseService< Provider > implements IPro
      * @return
      */
     @Override
-    public List< Provider > listAllProviderInfo(String province,String city,String district,String name,String isImport, String company, Integer brandId, String status, String isUse, Integer pageNum, Integer pageSize) {
+    public List< Provider > listAllProviderInfo(String province,String city,String district,String name,String isImport, String company, Integer brandId, String status, String isUse,String paramTypeValue,String pMainValue, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
-        return providerMapper.listAllProviderInfo(province,city,district,name,isImport, company, brandId, status, isUse);
+        return providerMapper.listAllProviderInfo(province,city,district,name,isImport, company, brandId, status, isUse,paramTypeValue,pMainValue);
     }
 
     /**
@@ -1076,9 +1076,9 @@ public class ProviderServiceImpl extends BaseService< Provider > implements IPro
      * @return
      */
     @Override
-    public List< Provider > listAllSupplierInfo(String province,String city,String district,String name,String isImport, String company, Integer brandId, String status, String isUse, Integer pageNum, Integer pageSize) {
+    public List< Provider > listAllSupplierInfo(String province,String city,String district,String name,String isImport, String company, Integer brandId, String status, String isUse,String[] paramType, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
-        return providerMapper.listAllSupplierInfo(province,city,district,name,isImport, company, brandId, status, isUse);
+        return providerMapper.listAllSupplierInfo(province,city,district,name,isImport, company, brandId, status, isUse,paramType);
     }
 
     @Override

+ 19 - 0
src/main/java/com/yc/education/test/ChildrenJava.java

@@ -0,0 +1,19 @@
+package com.yc.education.test;
+
+/**
+ * @ClassName ChildrenJava
+ * @Description TODO
+ * @Author QuZhangJing
+ * @Date 2020/1/14 14:59
+ * @Version 1.0
+ */
+public class ChildrenJava extends ParentJava{
+
+    void print(){
+        System.out.println("子类方法");
+    }
+
+    public static void main(String [] argss){
+        new ChildrenJava().fun();
+    }
+}

+ 75 - 0
src/main/java/com/yc/education/test/JDBCTest.java

@@ -0,0 +1,75 @@
+package com.yc.education.test;
+
+
+import javax.sql.rowset.JdbcRowSet;
+
+/**
+ * @ClassName JDBCTest
+ * @Description TODO
+ * @Author QuZhangJing
+ * @Date 2020/1/8 10:32
+ * @Version 1.0
+ */
+public class JDBCTest {
+    private String name ;
+
+    {
+        System.out.println("构造方法之前的构造代码块");
+    }
+    public JDBCTest(){
+        System.out.println("构造方法");
+    }
+
+    {
+        System.out.println("构造方法之后的构造代码块");
+    }
+
+    public JDBCTest(String name){
+         this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getInfo(){
+        return  "name="+name;
+    }
+
+    public boolean compare(JDBCTest j){
+        JDBCTest jdbcTest = this;
+        JDBCTest jdbcTest1 = j;
+        if (jdbcTest == jdbcTest1){
+            return true;
+        }
+        if (jdbcTest.name.equals(jdbcTest1.name)){
+            return true;
+        }else {
+            return false;
+        }
+    }
+
+    public static void main(String [] args){
+
+    JDBCTest jdbcTest = new JDBCTest("zhangsan");
+       JDBCTest jdb       = new JDBCTest("zhangsan");
+       if (jdbcTest.compare(jdb)){
+           System.out.println("相等");
+       }else {
+           System.out.println("不相等");
+       }
+       System.out.println(jdbcTest.name.equals(jdb.name));
+
+        {
+            int a = 100;
+            System.out.println("普通代码块  a = "+a);
+        }
+           int a = 200;
+        System.out.println("代码块之外的变量:a="+a);
+
+    }
+}

+ 27 - 0
src/main/java/com/yc/education/test/Java0110.java

@@ -0,0 +1,27 @@
+package com.yc.education.test;
+
+import java.util.Calendar;
+
+/**
+ * @ClassName Java0110
+ * @Description TODO
+ * @Author QuZhangJing  内部类
+ * @Date 2020/1/10 10:17
+ * @Version 1.0
+ */
+public class Java0110 {
+
+    public  Java0110(){
+        System.out.println("构造方法");
+    }
+
+    {
+        System.out.println("构造代码块");
+    }
+
+    public static void main(String [] args){
+        new Java0110();
+    }
+
+
+}

+ 123 - 0
src/main/java/com/yc/education/test/Link.java

@@ -0,0 +1,123 @@
+package com.yc.education.test;
+
+
+
+/**
+ * @ClassName Link
+ * @Description TODO
+ * @Author QuZhangJing
+ * @Date 2020/1/13 11:47
+ * @Version 1.0
+ */
+class Link {
+
+    class Node {                           //内部类
+        private String data;//定义节点数据
+        private Node next;//定义下一个节点
+
+        public Node() {                //无参构造方法
+        }
+
+        public Node(String data) {     //go构造方法设置节点内容
+            this.data = data;
+        }
+
+        public void add(Node newNode) {
+
+            /*定义一个添加方法*/
+            if (this.next == null) {     //如果当前节点对象的下一个节点为空   则将新节点设置在当前节点的下一个节点上
+                this.next = newNode;
+            } else {
+                this.next.add(newNode);//如果不为空,则将新节点设置在当前节点的下一个节点的下一个节点上
+            }
+        }
+
+        /*定义一个判断节点数据是否存在的方法*/
+        public boolean search(String data) {
+
+            if (data.equals(this.data)) {             //判断当前查找的内容是否和当前节点的内容一致
+                return true;                           //如果一致,则返回true
+            } else {                                   //继续判断下一个
+                if (this.next != null) {               //下一个节点存在,则继续查找
+                    return this.next.search(data);      //返回下一个节点的查询结果
+                } else {
+                    return false;                        //节点不存在, 返回true
+                }
+            }
+        }
+
+        /*定义一个删除节点数据的方法*/
+        public void delete(Node previous,String data){
+
+             if (data.equals(this.data)){              //找到了匹配节点
+                 previous.next = next;                 //空出当前节点
+             }else {
+                 if (this.next != null){
+                     this.next.delete(this,data);        //继续向下找
+                 }
+             }
+        }
+
+        /*定义一个打印方法*/
+        public void print(){
+            System.out.println(this.data+"\t");
+            if (this.next != null){             //如果下一个节点不为空
+                this.next.print();              //下一个节点继续打印
+            }
+        }
+
+
+    }/*内部类结束*/
+
+    private  Node  root;//定义根节点
+
+    /*添加方法*/
+    public void  addNode(String data){
+         Node newNode   =  new Node(data);//建立一个新的节点  并将data数据赋值给节点内容
+         if (this.root == null){          //没有根节点
+             this.root = newNode;          //设置为根节点
+         }else {
+             this.root.add(newNode);        //添加到合适位置
+         }
+    }
+
+    /*查询方法*/
+    public boolean  contains(String name){
+          return this.root.search(name);//调用Node类中的search方法
+    }
+
+    /*删除方法*/
+    public void deleteNode(String data){   //删除节点
+        if (this.contains(data)){   //如果节点存在  就执行删除操作
+            if (this.root.data.equals(data)){  //判断根节点是否满足要求
+                this.root =  this.root.next;   //将根节点之后的内容设置为根节点
+            }else {
+                this.root.next.delete(root,data);//删除节点
+            }
+        }
+
+    }
+    /*打印方法*/
+    public void printNode(){   //打印全部节点
+        if (this.root != null){   //判断是否存在根节点
+           this.root.print();
+        }
+    }
+
+    /*调用主方法测试*/
+    public static void main(String[] args){
+        Link  link = new Link();
+        link.addNode("A");
+        link.addNode("B");
+        link.addNode("C");
+        link.addNode("D");
+        link.addNode("E");
+        System.out.println("==========================="+"删除之前"+"=====================================");
+        link.printNode();
+        link.deleteNode("C");
+        System.out.println("==========================删除之后============================================");
+        link.printNode();
+        System.out.println("查询节点:"+link.contains("A"));
+        System.out.println("查询节点:"+link.contains("F"));
+    }
+}

+ 0 - 175
src/main/java/com/yc/education/test/Node.java

@@ -1,175 +0,0 @@
-package com.yc.education.test;
-
-import org.jdom2.output.Format;
-
-import java.util.Arrays;
-
-/**
- * @ClassName Node
- * @Description TODO
- * @Author QuZhangJing
- * @Date 2019/12/27 9:55
- * @Version 1.0
- */
-public class Node {
-
-    public int data;
-
-    public Node next;
-
-    public Node(){}
-
-    public Node(int data) {
-        this.data = data;
-    }
-
-    public Node(int data, Node next) {
-        this.data = data;
-        this.next = next;
-    }
-
-    @Override
-    public String toString() {
-        return "Node{" +
-                "data=" + data +
-                ", next=" + next +
-                '}';
-    }
-    public static int staticFun(int x){
-        if (x==100){
-            return 100;
-        }else {
-             return x+staticFun(x+1);
-        }
-    }
-    public void staticFun1(){
-        System.out.println("不是静态方法能直接被调用吗");
-    }
-
-    public static int jieCheng(int x){
-            if (x<1) return 1;
-                return x * jieCheng(x-1);
-
-    }
-
-    public static void main(String [] args){
-        Node head = new Node(1);//创建头节点
-        Node node = new Node(2,new Node(3,new Node(4)));//初始化要加入的节点
-        Node temp = head;//临时节点
-        while(temp.next != null){//找到尾节点
-            temp = temp.next;
-        }
-        temp.next = node;
-        System.out.println(node.toString());
-
-        for(int i=1;i<=9;i++){   //正左直
-            for (int j=1;j<=i;j++){
-                System.out.print("3 ");
-            }
-            System.out.println();
-        }
-        System.out.println();
-        System.out.println();
-        System.out.println();
-        for (int k=9;k>=1;k--){   //倒左直
-            for (int l=k;l>=1;l--){
-                System.out.print("4 ");
-            }
-            System.out.println();
-        }
-        System.out.println();
-        System.out.println();
-        System.out.println();
-       for (int i=1;i<=8;i++){  //正右直
-           for (int j=1;j<=9-i;j++){
-               System.out.print("  ");
-           }
-           for (int j=1;j<=i;j++){
-               System.out.print(" 2  ");
-           }
-           System.out.println();
-       }
-       for (int i=1;i<=9;i++){  //倒右直
-           for (int j=2;j<=i;j++){
-               System.out.print("  ");
-           }
-           for (int j=9;j>=i;j--){
-               System.out.print(" 1  ");
-           }
-           System.out.println();
-       }
-
-
-      int [] scoreArr  = {56,67,57,89,74,91,54,60,67,98};
-       int max=0;
-       int min=0;
-       max = min = scoreArr[0];
-       for (int i=0;i<scoreArr.length;i++){
-           if (scoreArr[i]>max){
-               max = scoreArr[i];
-           }
-           if (scoreArr[i]<min){
-               min = scoreArr[i];
-           }
-       }
-       System.out.println("最大值:"+max);
-       System.out.println("最小值:"+min);
-
-       /*冒泡排序*/
-       for (int i=0;i<=scoreArr.length;i++){
-           for (int j= 0;j<scoreArr.length-i-1;j++){
-               if (scoreArr[j+1]<scoreArr[j]){
-                   int temp1;
-                   temp1 = scoreArr[j];
-                   scoreArr[j]=scoreArr[j+1];
-                   scoreArr[j+1] = temp1;
-               }
-           }
-       }
-
-       int [][] twoArr = new int [4][4];
-       System.out.println(Arrays.toString(twoArr));
-
-       int [][] twoArr1 = {{1,2,3,4},{5,6,7,8},{9,10,11,12}};//二维数组
-
-     for (int i=0;i<twoArr1.length;i++){
-         for (int j=0;j<twoArr1[i].length;j++){
-             System.out.print(twoArr1[i][j]+"\t");
-         }
-         System.out.println();
-     }
-
-     System.out.println(staticFun(1));//递归求和
-
-     node.staticFun1();
-
-     /*插入排序*/
-   /*  for (int i=1;i<scoreArr.length;i++){
-         for (int j=0;j<i;j++){
-             int left = scoreArr[i];
-             if (scoreArr[i]<scoreArr[j]){
-                 for(int k=i;k>j;k--){
-                     scoreArr[k] = scoreArr[k-1];
-                 }
-                 scoreArr[j] = left;
-             }
-         }
-     }
-     System.out.println(Arrays.toString(scoreArr));*/
-
-      int [] arr3 = {3,42,4,53,1,6,71,65,78};
-       Arrays.sort(arr3);
-
-       System.out.println(Arrays.toString(arr3));
-
-       System.out.println(jieCheng(1));
-
-       int sum=0;
-       for (int i=0;i<=10;i++){
-           System.out.println(i+"的阶乘是:"+jieCheng(i));
-           sum+=jieCheng(i);
-           System.out.println("阶乘和:"+sum);
-       }
-
-    }
-}

+ 17 - 0
src/main/java/com/yc/education/test/ParentJava.java

@@ -0,0 +1,17 @@
+package com.yc.education.test;
+
+/**
+ * @ClassName ParentJava
+ * @Description TODO
+ * @Author QuZhangJing
+ * @Date 2020/1/14 14:58
+ * @Version 1.0
+ */
+public class ParentJava {
+   private void print(){
+        System.out.println("弗雷芳芳");
+    }
+    public void fun(){
+       this.print();
+    }
+}

+ 55 - 2
src/main/java/com/yc/education/test/SortTest.java

@@ -13,7 +13,7 @@ public class SortTest {
 
     public static void main(String[] args) {
 
-        System.out.println(Node.staticFun(1));
+
 
         for (int a=100;a<=999;a++) {
             int b = a % 100;
@@ -72,11 +72,64 @@ public class SortTest {
 
         System.out.println(efg/=abc++);
         System.out.println(abc);
-    }
+
+        /*快速排序*/
+        int [] fastSort = {5,3,7,1,9,2,4,6,8};
+        for (int i=0;i<fastSort.length;i++){
+            int minIndex = i;
+            for (int j=i+1;j<fastSort.length;j++){
+                if (fastSort[j]<fastSort[minIndex]){
+                    minIndex = j;
+                }
+            }
+            if (minIndex != i){
+                int temp = fastSort[i];
+                fastSort[i] = fastSort[minIndex];
+                fastSort[minIndex] = temp;
+            }
+        }
+        System.out.println("快速排序:"+Arrays.toString(fastSort));
+
+      /*  *//*希尔排序*//*
+        int [] xSort = {8,3,5,7,2,9,1,4,5};
+        int xTemp = 0;
+        int incre  = xSort.length;
+        while (true){
+            incre = incre/2;
+
+            for (int k = 0;k<incre;k++){
+                for (int i=k+incre;i<xSort.length;i=+incre){
+                    for (int j=i;j>k;j-=incre){
+                        if (xSort[j]<xSort[j-incre]){
+                            xTemp = xSort[j-incre];
+                            xSort[j-incre]=xSort[j];
+                            xSort[j] = xTemp;
+                        }else {
+                            break;
+                        }
+                    }
+                }
+            }
+            if (incre==1){
+                break;
+            }
+        }
+        System.out.println("希尔排序:"+Arrays.toString(xSort));
+*/
+
+
+
+
+
 
 
 
 
 
 
+
+
+
+
+    }
 }

+ 3 - 0
src/main/java/com/yc/education/test/test.java

@@ -29,4 +29,7 @@ public class test {
         System.out.println(""+ ojb2.x2 );//5+1           6
         System.out.println(""+test.x1 ); //4+2+3         9
     }
+   static{
+       System.out .println("直接输入静态代码块");
+   }
 }

+ 14 - 1
src/main/resources/mapper/ProviderMapper.xml

@@ -367,6 +367,12 @@
             <if test="name != null and name != ''">
                 and name like concat ('%',#{name},'%')
             </if>
+            <if test="paramTypeValue != null and paramTypeValue != ''">
+                and param_type = #{paramTypeValue}
+            </if>
+            <if test="pMainValue != null and pMainValue != ''">
+                and p_main_business like concat('%',#{pMainValue},'%')
+            </if>
         </where>
         order by enter_date desc,id desc
     </select>
@@ -393,7 +399,7 @@
     </select>
 
     <!--查询所有供应商信息 分页-->
-    <select id="listAllSupplierInfo" resultMap="BaseResultMap">
+    <select id="listAllSupplierInfo"  resultMap="BaseResultMap">
         select * from provider
         <where>
             role_type = 2  and is_shelf = 1
@@ -424,10 +430,17 @@
             <if test="name != null and name != ''">
                 and name like concat ('%',#{name},'%')
             </if>
+            <if test="paramType != null and paramType.length >0">
+                and param_type in
+                <foreach collection="paramType" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
         </where>
         order by enter_date desc,id desc
     </select>
 
+
     <!--查询所有下架的经销商并分页-->
     <select id="listSupplierDownShelf" resultMap="BaseResultMap">
         select * from provider

+ 65 - 13
src/main/webapp/WEB-INF/jsp/admin/providerList.jsp

@@ -60,23 +60,33 @@
                 </c:forEach>
             </select>
 		</span>
-            <span class="select-box inline">
+        <span class="select-box inline">
             <select name="status" class="select">
                 <option value="">认证状态</option>
-
-                     <option value="0">未认证</option>
+                <option value="0">未认证</option>
                 <option value="1">已认证</option>
             </select>
 		</span>
+
             <span class="select-box inline">
+            <select name="paramTypeStr" id="paramTypeStr" class="select">
+                <option value="">经营类别</option>
+                <option value="1,维修保养" <c:if test="${paramTypeStr =='1,维修保养'}">selected="selected"</c:if>>维修保养</option>
+                <option value="1,美容洗车"<c:if test="${paramTypeStr =='1,美容洗车'}">selected="selected"</c:if>>美容洗车</option>
+                <option value="1,电子与改装" <c:if test="${paramTypeStr =='1,电子与改装'}">selected="selected"</c:if>>电子与改装</option>
+                <option value="2" <c:if test="${paramTypeStr =='2'}">selected="selected"</c:if>>商用车专修</option>
+                <option value="3" <c:if test="${paramTypeStr =='3'}">selected="selected"</c:if>>4S店</option>
+            </select>
+		</span>
+           <%-- <span class="select-box inline">
             <select name="isUse" class="select">
                 <option value="">店铺状态</option>
 
                      <option value="0">未认领</option>
                 <option value="1">已认领</option>
             </select>
-		</span>
-            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+		</span>--%>
+            <button class="btn btn-success" onclick="searchClick()" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
         </div>
     </form>
    <%-- <form action="providerExport.html" method="post" enctype="multipart/form-data">--%>
@@ -92,7 +102,14 @@
         <a class="btn btn-danger radius" href="javascript:;" id="delete"><i class="Hui-iconfont">&#xe6e2;</i>录入信息删除</a>
         <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>
         <a class="btn btn-primary radius" href="providerDownShelfList.html"> 下架管理</a>
-        <span class="r">共有数据:<strong>${pageInfo.total}</strong> 条</span>
+
+           <span class="r" id="total" hidden="hidden">共有:<strong>${pageInfo.total}</strong>个商家</span>
+            <span class="r" id="WXBY" hidden="hidden">维修保养有:<strong>${pageInfo.total}</strong> 个商家</span>
+            <span class="r" id="MRXC" hidden="hidden">美容洗车有:<strong>${pageInfo.total}</strong> 个商家</span>
+            <span class="r"  id="DZGZ" hidden="hidden">电子与改装有:<strong>${pageInfo.total}</strong> 个商家</span>
+            <span class="r" id="SYC" hidden="hidden">商用车专修有:<strong>${pageInfo.total}</strong> 个商家</span>
+            <span class="r"  id="4S" hidden="hidden">4S店有:<strong>${pageInfo.total}</strong> 个商家</span>
+
     </div>
 
     <div class="mt-20">
@@ -214,28 +231,28 @@
                         <option value="100"<c:if test="${pageInfo.pageSize == '100'}">selected="selected"</c:if>>100</option>
                     </select>
                     <li>
-                        <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=1&pageSize=${pageInfo.pageSize}">首页</a>
+                        <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=1&pageSize=${pageInfo.pageSize}">首页</a>
                     </li>
                     <li class="prev"><a
-                            href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.prePage}&pageSize=${pageInfo.pageSize}">上一页</a>
+                            href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.prePage}&pageSize=${pageInfo.pageSize}">上一页</a>
                     </li>
                     <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
                         <c:if test="${nav == pageInfo.pageNum}">
                             <li>
-                                <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${nav}&pageSize=${pageInfo.pageSize}"
+                                <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${nav}&pageSize=${pageInfo.pageSize}"
                                    class="active">${nav}</a></li>
                         </c:if>
                         <c:if test="${nav != pageInfo.pageNum}">
                             <li>
-                                <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${nav}&pageSize=${pageInfo.pageSize}">${nav}</a>
+                                <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${nav}&pageSize=${pageInfo.pageSize}">${nav}</a>
                             </li>
                         </c:if>
                     </c:forEach>
                     <li class="next"><a
-                            href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.nextPage}&pageSize=${pageInfo.pageSize}">下一页</a>
+                            href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.nextPage}&pageSize=${pageInfo.pageSize}">下一页</a>
                     </li>
                     <li>
-                        <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.pages }&pageSize=${pageInfo.pageSize}">末页</a>
+                        <a href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.pages }&pageSize=${pageInfo.pageSize}">末页</a>
                     </li>
                 </ul>
             </div>
@@ -245,6 +262,41 @@
 </div>
 <script type="text/javascript">
 
+    /*数据总条数显示*/
+    var paramTypeVal = $("#paramTypeStr").val();
+
+    function searchClick() {
+        if (paramTypeVal == ""){
+            $("#total").show();
+        }else if (paramTypeVal=="1,维修保养"){
+            $("#WXBY").show();
+        }else if(paramTypeVal=="1,美容洗车"){
+            $("#MRXC").show();
+        }else if (paramTypeVal=="1,电子与改装"){
+            $("#DZGZ").show();
+        } else if (paramTypeVal=="2"){
+            $("#SYC").show();
+        }else if(paramTypeVal == "3"){
+            $("#4S").show();
+        }
+    }
+
+    $(function () {
+        if (paramTypeVal == ""){
+            $("#total").show();
+        }else if (paramTypeVal=="1,维修保养"){
+            $("#WXBY").show();
+        }else if(paramTypeVal=="1,美容洗车"){
+            $("#MRXC").show();
+        }else if (paramTypeVal=="1,电子与改装"){
+            $("#DZGZ").show();
+        } else if (paramTypeVal=="2"){
+            $("#SYC").show();
+        }else if(paramTypeVal == "3"){
+            $("#4S").show();
+        }
+    })
+
     /*切换经销商点击事件*/
     function  roleChange(idVal) {
         var idVal = idVal;
@@ -313,7 +365,7 @@
     }
     <%--每页条数选择--%>
     function pageSizeChoose(pageSizeVal){
-        location.href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageSize="+pageSizeVal;
+        location.href="providerList.html?province=${province1}&city=${city}&district=${district}&name=${name}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageSize="+pageSizeVal;
     }
 
     //全选与反选

+ 2 - 2
src/main/webapp/WEB-INF/jsp/admin/recommenderReport.jsp

@@ -40,11 +40,11 @@
     <form action="recommenderReport.html" method="post"   enctype="multipart/form-data">
         <div class="text-c">
 
-                <input type="text"  name="sDateVal" id="sDateVal" value="${sDateVal}" onblur="sDate(this.value)"  onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="开始日期">
+                <input type="text"  name="sDateVal" id="sDateVal" autocomplete="off" value="${sDateVal}" onblur="sDate(this.value)"  onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="开始日期">
 
                 <input type="text" hidden onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"  class="input-text Wdate" style="width:120px;">
                 -
-                <input type="text"  name="eDateVal"  id="eDateVal" value="${eDateVal}" onblur="eDate(this.value)" onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="结束日期">
+                <input type="text"  name="eDateVal"  id="eDateVal" autocomplete="off" value="${eDateVal}" onblur="eDate(this.value)" onfocus="WdatePicker({ Date:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}' })" id="datemin" class="input-text Wdate" style="width:120px;" placeholder="结束日期">
 
                 <input type="text" hidden onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d' })"  class="input-text Wdate" style="width:120px;">
 

+ 54 - 9
src/main/webapp/WEB-INF/jsp/admin/supplierList.jsp

@@ -68,8 +68,17 @@
                 <option value="1">已认证</option>
             </select>
 		</span>
+            <span class="select-box inline">
+            <select name="paramTypeStr" id="paramTypeStr" class="select" >
+                <option value="">经营类别</option>
+                <option value="1,2" <c:if test="${paramTypeStr== '1,2'}">selected</c:if> >汽车配件</option>
+                <option value="3"<c:if test="${paramTypeStr== '3'}">selected</c:if>>用品改装</option>
+                 <option value="4"<c:if test="${paramTypeStr== '4'}">selected</c:if>>汽保工具与设备</option>
+                <option value="5,6"<c:if test="${paramTypeStr== '5,6'}">selected</c:if>>商用车</option>
+            </select>
+		</span>
 
-            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
+            <button class="btn btn-success" type="submit" onclick="searchClick()"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
         </div>
     </form>
     <%--<form action="supplierExport.html"  method="post" enctype="multipart/form-data">--%>
@@ -85,7 +94,11 @@
                    <i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</i>
                  <a class="btn btn-primary radius" href="supplierDownShelfList.html"> 下架管理</a>
 			</span>
-        <span class="r">共有数据:<strong>${pageInfo.total}</strong> 条</span>
+        <span class="r" id="total" hidden="hidden">总共有:<strong>${pageInfo.total}</strong> 个商家</span>
+        <span class="r" id="QCPJ" hidden="hidden">汽车配件有:<strong>${pageInfo.total}</strong> 个商家</span>
+        <span class="r" id="YPGZ" hidden="hidden">用品改装有:<strong>${pageInfo.total}</strong> 个商家</span>
+        <span class="r" id="QBSB" hidden="hidden">汽保设备与工具有:<strong>${pageInfo.total}</strong> 个商家</span>
+        <span class="r" id="SYC" hidden="hidden">商用车有:<strong>${pageInfo.total}</strong> 个商家</span>
     </div>
 
 
@@ -207,26 +220,26 @@
                         <option value="50"<c:if test="${pageInfo.pageSize == '50'}">selected="selected"</c:if>>50</option>
                         <option value="100"<c:if test="${pageInfo.pageSize == '100'}">selected="selected"</c:if>>100</option>
                     </select>
-                    <li><a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=1&pageSize=${pageInfo.pageSize}">首页</a></li>
+                    <li><a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=1&pageSize=${pageInfo.pageSize}">首页</a></li>
                     <li class="prev"><a
-                            href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.prePage}&pageSize=${pageInfo.pageSize}">上一页</a>
+                            href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.prePage}&pageSize=${pageInfo.pageSize}">上一页</a>
                     </li>
                     <c:forEach items="${pageInfo.navigatepageNums}" var="nav">
                         <c:if test="${nav == pageInfo.pageNum}">
-                            <li><a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${nav}&pageSize=${pageInfo.pageSize}"
+                            <li><a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${nav}&pageSize=${pageInfo.pageSize}"
                                    class="active">${nav}</a></li>
                         </c:if>
                         <c:if test="${nav != pageInfo.pageNum}">
                             <li>
-                                <a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${nav}&pageSize=${pageInfo.pageSize}">${nav}</a>
+                                <a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${nav}&pageSize=${pageInfo.pageSize}">${nav}</a>
                             </li>
                         </c:if>
                     </c:forEach>
                     <li class="next"><a
-                            href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.nextPage}&pageSize=${pageInfo.pageSize}">下一页</a>
+                            href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.nextPage}&pageSize=${pageInfo.pageSize}">下一页</a>
                     </li>
                     <li>
-                        <a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageNum=${pageInfo.pages }&pageSize=${pageInfo.pageSize}">末页</a>
+                        <a href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&isImport=${isImport}&company=${company}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageNum=${pageInfo.pages }&pageSize=${pageInfo.pageSize}">末页</a>
                     </li>
                 </ul>
             </div>
@@ -236,6 +249,38 @@
 </div>
 <script type="text/javascript">
 
+
+    /*数据总条数显示*/
+    var paramTypeVal = $("#paramTypeStr").val();
+
+    function searchClick() {
+        if (paramTypeVal == ""){
+            $("#total").show();
+        }else if (paramTypeVal=="1,2"){
+            $("#QCPJ").show();
+        }else if(paramTypeVal=="3"){
+            $("#YPGZ").show();
+        }else if (paramTypeVal=="4"){
+            $("#QBSB").show();
+        } else if (paramTypeVal=="5,6"){
+            $("#SYC").show();
+        }
+    }
+
+    $(function () {
+        if (paramTypeVal == ""){
+            $("#total").show();
+        }else if (paramTypeVal=="1,2"){
+            $("#QCPJ").show();
+        }else if(paramTypeVal=="3"){
+            $("#YPGZ").show();
+        }else if (paramTypeVal=="4"){
+            $("#QBSB").show();
+        } else if (paramTypeVal=="5,6"){
+            $("#SYC").show();
+        }
+    })
+
     /*切换服务商点击事件*/
     function  roleChange(idVal) {
         var idVal = idVal;
@@ -303,7 +348,7 @@
 
     <%--每页条数选择--%>
     function pageSizeChoose(pageSizeVal){
-        location.href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&brandId=${brandId}&status=${status}&isUse=${isUse}&pageSize="+pageSizeVal;
+        location.href="supplierList.html?province=${province1}&city=${city}&district=${district}&name=${name}&brandId=${brandId}&status=${status}&isUse=${isUse}&paramTypeStr=${paramTypeStr}&pageSize="+pageSizeVal;
     }
     //全选与反选
     $("#sltall").click(function () {

+ 0 - 1
src/main/webapp/WEB-INF/jsp/admin/supplierUpdate.jsp

@@ -469,7 +469,6 @@
                        <c:forEach items="${brand}" var="brand">
                        <option value="${brand.id}" <c:if test="${provider.brandId == brand.id}"> selected</c:if> >${brand.name}</option>
                        </c:forEach>
-
                    </select>
                </div>
            </div>