From 27b3352a6a7f514c98cce083eded6c3bb9e3f519 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期三, 15 一月 2025 10:50:10 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java             |    3 
 north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue                    |   13 ++-
 north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java        |    5 +
 north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml                            |    3 
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue         |    1 
 north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue                   |    2 
 north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java |    8 ++
 north-glass-erp/src/main/resources/mapper/userInfo/User.xml                               |   14 ++++
 north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java        |    4 +
 north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue                         |   40 ++++++++++++-
 north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue                     |   14 ++++
 north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue                     |    2 
 north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue          |    8 ++
 north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java           |   27 ++++++--
 north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java                |    2 
 north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java                |    2 
 north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml                   |    8 +-
 17 files changed, 127 insertions(+), 29 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
index 2f8bcc7..ee7dac7 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -194,6 +194,18 @@
     }
   },
   {
+    tid: 'icon', title: '鍟嗘爣', data: '', type: 'text',
+    options: {
+      field: 'icon',
+      testData: '',
+      width:270,
+      height: 16,
+      fontSize: 11.25,
+      textAlign: "left",
+      textContentVerticalAlign: "middle"
+    }
+  },
+  {
     tid: 'orderType', title: '璁㈠崟绫诲瀷', data: '', type: 'text',
     options: {
       field: 'orderType',
@@ -852,7 +864,7 @@
 }
 const changeTag = () => {
   const json = JSON.parse(tag.value.value)
-  //json.panels[0].printElements[0].options.fields.push({text: '搴忓彿灏哄', field: 'numberSize'})
+  //json.panels[0].printElements[0].options.fields.push({text: '鍟嗘爣', field: 'icon'})
 
   hiprintTemplate.value.setPaper(json.panels[0].width, json.panels[0].height)
   hiprintTemplate.value.update(json)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
index 4cd4e59..16a748b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/GlassInventory.vue
@@ -231,7 +231,6 @@
         xGrid.value.loadData(updatedData);
       } catch (error) {
         console.error('鏇存柊琛ㄦ牸鏁版嵁鏃跺嚭閿�:', error);
-        // 杩欓噷鍙互鏍规嵁瀹為檯闇�姹傛坊鍔犱竴浜涘洖婊氭搷浣滄垨鑰呮彁绀虹敤鎴风殑閫昏緫锛屾瘮濡傛樉绀轰竴涓敊璇彁绀烘绛�
         ElMessage.error('鏇存柊琛ㄦ牸鏁版嵁鏃跺嚭鐜伴敊璇紝璇锋鏌ヨ緭鍏ユ垨鑱旂郴绠$悊鍛�');
       }
     } else {
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
index 6d82f3c..4e837d0 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -121,6 +121,14 @@
       sortable: true
     },
     {
+      field: 'price',
+      width: 150,
+      title: t('鍗曚环'),
+      filters: [{data: ''}],
+      slots: {filter: 'num1_filter'},
+      sortable: true
+    },
+    {
       field: 'remark',
       width: 150,
       title: t('basicData.remarks'),
diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
index 7306530..a04a46b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -192,12 +192,15 @@
       <div class="row5">
         <span style="white-space: pre-wrap;font-size: 6pt">{{ item.building_number?item.building_number.replace(/\r|\n|\s/g,''):'' }}</span>
         <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span>
-      </div>
-      <div class="row6">
-        <span>{{item.glass_child}}</span>&nbsp;
+        <br>
         <span v-if="company.showDeliveryCreator" >{{item.processing_note}}</span>
         <span v-else style="font-size: 6pt">{{item.processing_note}}</span>
       </div>
+      <div class="row6">
+        <span>{{item.glass_child}}</span>&nbsp;
+
+      </div>
+
       <div class="row5">
         <span>{{item.project}}</span>&nbsp;
       </div>
@@ -275,7 +278,7 @@
 #entirety{
   text-align: center;
   width: 180px;
-  height: 87px;
+  height: 90px;
   margin-bottom: 10px;
   margin-right: 5px;
   overflow: hidden;
@@ -322,7 +325,7 @@
 
 .row5 {
   margin-top: 5px;
-  height: 15px;
+  height: 18px;
   font-weight: bold;
   font-size: 6pt;
 }
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 896d765..1009735 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -297,7 +297,7 @@
     {field: 'deliveryState',title: t('basicData.review'), width: 40,filters:[{ data: '' }], slots: { default: 'state',filter: 'num2_filter' }},
     {field: 'stockState',title: t('productStock.outbound'), width: 40, filters:[{ data: '' }], slots: { default: 'state',filter: 'num2_filter' }},
 
-    {field: 'deliveryId',width:120,  title: t('delivery.deliveryNoteId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
+    {field: 'deliveryId',width:120,  title: t('delivery.deliveryNoteId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
     {field: 'creator',width:120,  title: t('delivery.shipper'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
     {field: 'deliveryDate',width:120,  title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
     {field: 'customerId',width:120,  title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }},
diff --git a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
index 1c27aad..5d82427 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -134,7 +134,7 @@
   keyboardConfig:{
     isArrow: true,
     isDel: true,
-    isEnter: true,
+    //isEnter: true,
     isTab: true,
     isEdit: true,
     isChecked: true
@@ -1386,13 +1386,45 @@
   }
   if(evnt.$event.keyCode === 13 ){
     const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord()
-    let nextRowIndex = xGrid.value.getRowIndex(row) + 1;
-    if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
+    let nextRowIndex = xGrid.value.getRowIndex(row) + 1
+
+
+    switch (column.field){
+      case 'width':
+        xGrid.value.setSelectCell(row, 'height')
+        break;
+      case 'height':
+        xGrid.value.setSelectCell(row, 'quantity')
+        break;
+      case 'quantity':
+        if(nextRowIndex === length){
+          xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
+        }
+        const nextRow = xGrid.value.getTableData().fullData[nextRowIndex]
+        xGrid.value.setCurrentRow(nextRow)
+        xGrid.value.scrollToRow(nextRow)
+        xGrid.value.setSelectCell(nextRow, 'width')
+        break;
+      default:
+        if(nextRowIndex === length){
+          xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
+        }
+        const nextRow1 = xGrid.value.getTableData().fullData[nextRowIndex]
+        xGrid.value.setCurrentRow(nextRow1)
+        xGrid.value.scrollToRow(nextRow1)
+        xGrid.value.setSelectCell(nextRow1, column.field)
+        break;
+
+    }
+
+
+
+    /*if (nextRowIndex < xGrid.value.getTableData().fullData.length) {
       xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
     }
     if(rowIndex === length-1){
       xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1)
-    }
+    }*/
 
   }
   if(evnt.$event.keyCode === 38 ){
diff --git a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
index 8ef1bcc..7fe9e4f 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -162,6 +162,8 @@
 }
 
 const  saveProducts=(product)=>{
+  console.log(product)
+  return
   request.post(`/product/saveProduct`,product).then((res) =>{
     if(res.code==200){
       ElMessage.success(t('product.msg.saveSuccess'))
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
index f48141e..27758bd 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/sd/ProductController.java
@@ -42,6 +42,11 @@
     public Result saveProduct(@RequestBody Map<String,Object> product){
         return Result.seccess(productService.saveProduct(product));
     }
+    @ApiOperation("鍏朵粬绯荤粺浜у搧淇濆瓨鎺ュ彛")
+    @PostMapping("/otherSysSaveProduct")
+    public Result otherSysSaveProduct(@RequestBody Map<String,Object> product){
+        return Result.seccess(productService.saveProduct(product));
+    }
 
     @ApiOperation("浜у搧鏌ラ噸鎺ュ彛")
     @SaCheckPermission("createProduct.add")
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java b/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
index e175ff1..0adad18 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/userInfo/UserInfoController.java
@@ -10,6 +10,8 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Map;
+
 @RestController
 @Api(value="鐢ㄦ埛controller",tags={"鐢ㄦ埛鎿嶄綔鎺ュ彛"})
 @RequestMapping("/userInfo")
@@ -62,6 +64,12 @@
         return Result.seccess(userService.findAll());
     }
 
+    @ApiOperation("app鏌ヨ鎶ュ伐鐝粍鍒楄〃")
+    @PostMapping("findByAddress")
+    public Result findByAddress(@RequestBody Map<String,String> userName){
+        return Result.seccess(userService.findByAddress(userName));
+    }
+
     @ApiOperation("鏌ヨ鎵�鏈夊伐搴�")
     @SaCheckPermission("userList.search")
     @PostMapping("selectProcess")
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java b/north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java
index 9f65e0f..a1c945e 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/pp/ReportingWork.java
@@ -3,14 +3,12 @@
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
-import com.example.erp.entity.sd.DeliveryDetail;
 import com.example.erp.entity.sd.Order;
 import com.example.erp.entity.sd.OrderDetail;
 import com.example.erp.entity.sd.OrderGlassDetail;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
-import java.time.LocalDate;
 import java.time.LocalDateTime;
 
 @Data
diff --git a/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java b/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
index 704a6cf..1ee4995 100644
--- a/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
+++ b/north-glass-erp/src/main/java/com/example/erp/mapper/userInfo/UserMapper.java
@@ -2,7 +2,6 @@
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.example.erp.controller.dto.UserDTO;
 import com.example.erp.entity.userInfo.User;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -38,4 +37,6 @@
     Boolean updateUserNameById(Integer id,String userName);
 
     Boolean updateProcessMp(Integer id, String process);
+
+    List<User> findByAddress(String userName);
 }
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index 7b8af8f..8eb9bba 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -245,6 +245,10 @@
         } else {
             reportingWork.setReviewedState(0);
         }
+        if(reportingWork.getReportingWorkTime()==null){
+            LocalDateTime localDateTime = LocalDateTime.now();
+            reportingWork.setReportingWorkTime(localDateTime);
+        }
 
         reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess()));
         //涓昏〃鎻掑叆
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
index 4f3d29a..1a9ad90 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -165,7 +165,7 @@
 
     private String getOrderId(String dateType){
         String orderId = null;
-        if(dateType.equals("day")){
+        if(dateType==null || dateType.equals("day")){
             Integer maxOrderId = orderMapper.selectMaxOrderId();
             //鏌ヨ璁㈠崟id锛屽苟涓旇嚜澧�
             String formattedNumber = String.format("%02d", maxOrderId+1);
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
index a035b9c..1127965 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/userInfo/UserService.java
@@ -5,24 +5,17 @@
 import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.example.erp.controller.dto.UserDTO;
-import com.example.erp.entity.userInfo.PermissionBasic;
 import com.example.erp.entity.userInfo.Role;
-import com.example.erp.entity.userInfo.SysError;
 import com.example.erp.entity.userInfo.User;
 import com.example.erp.mapper.pp.ProductionSchedulingMapper;
 import com.example.erp.mapper.userInfo.*;
 import com.example.erp.tools.TokenTools;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Service
 @DS("user_info")
@@ -196,5 +189,23 @@
     public Boolean updateProcessSv(Integer id, String process) {
         return userMapper.updateProcessMp(id,process);
     }
+
+    public Object findByAddress(Map<String,String> userName) {
+        if(Objects.equals(userName.get("userName"), "")){
+            userName.put("userName", null) ;
+        }
+        List<User> users = userMapper.findByAddress(userName.get("userName"));
+        List<Map<String,Object>> userList = new ArrayList<>();
+        users.forEach(user -> {
+            Map<String,Object> userMap = new HashMap<>();
+            userMap.put("value", user.getLoginName());
+            userMap.put("text", user.getUserName());
+            userList.add(userMap);
+        });
+        Map<String,List<Object>> map = new HashMap<>();
+
+        map.put("users", Collections.singletonList(userList));
+        return map;
+    }
 }
 
diff --git a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
index 3063c2a..3a2adbd 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/FinishedGoodsInventory.xml
@@ -588,7 +588,7 @@
         left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on
         o.order_id=fc.order_id
         <where>
-                and fc.received_quantity <![CDATA[<]]> fc.min_inventory_quantity
+                and fc.received_quantity <![CDATA[<]]> fc.min_inventory_quantity and o.create_order>0
             <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
                 and o.order_id regexp #{flowCard.order.orderId}
             </if>
@@ -646,7 +646,7 @@
         select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on
         fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id
         <where>
-            and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity
+            and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity and o.create_order>0
             <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
                 and o.order_id regexp #{flowCard.order.orderId}
             </if>
@@ -722,7 +722,7 @@
         left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number
         left join sd.`order` o on fgi.order_id = o.order_id
         <where>
-                and fgi.status = 0 and fgi.quantity_available>0
+                and fgi.status = 0 and fgi.quantity_available>0 and o.create_order>0
             <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                 and od.width regexp #{finishedGoodsInventory.orderDetail.width}
             </if>
@@ -796,7 +796,7 @@
         left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number
         left join sd.`order` o on fgi.order_id = o.order_id
         <where>
-                and fgi.status = 0 and  fgi.quantity_available>0
+                and fgi.status = 0 and  fgi.quantity_available>0 and o.create_order>0
             <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''">
                 and od.width regexp #{finishedGoodsInventory.orderDetail.width}
             </if>
diff --git a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
index 8dda058..06521a6 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -68,9 +68,10 @@
             d.shape ,
             op.process_cards ,
             d.product_name ,
+            d.price,
             op.remark ,
             d.building_number ,
-            round(((`g`.`child_width` + g.child_height) * 2 * `f`.`quantity`),2) as perimeter ,
+            round(((`g`.`child_width`/ 1000 + g.child_height / 1000) * 2 * `f`.`quantity`),2) as perimeter ,
             round((`g`.`area` * `f`.`quantity`),4) AS area,
             f.technology_number ,
             g.glass_child ,
diff --git a/north-glass-erp/src/main/resources/mapper/userInfo/User.xml b/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
index 7029b59..62f4a3d 100644
--- a/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
+++ b/north-glass-erp/src/main/resources/mapper/userInfo/User.xml
@@ -29,6 +29,20 @@
         on b.role_id = c.id
         where state =1 and a.id != 1
     </select>
+    <select id="findByAddress" resultMap="findAllMap">
+        SELECT a.*,
+               b.role_id,
+               c.role
+        FROM erp_user_info.user as a
+                 left join user_role as b
+                           on a.id = b.user_id
+                 left join role as c
+                           on b.role_id = c.id
+        where state =1 and a.id != 1 and address is not null and address !=''
+        <if test="userName != null and userName != '' and userName != 'null'">
+            and user_name like concat('%',#{userName},'%')
+        </if>
+    </select>
 
     <select id="findOne" >
         SELECT *

--
Gitblit v1.8.0