laoyao 3 anni fa
parent
commit
05a449ece4

+ 14 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/impl/ProductionresourceServiceImpl.java

@@ -148,6 +148,7 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
             map.put("gatherSql",gatherSql);
         }
 
+        getQueryMap(map);
         List<Map>list = productionresourceviewMapper.getList(map);
         //设置字典表
         setDesc(list);
@@ -163,6 +164,19 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
         return retMap;
     }
 
+
+    private Map getQueryMap(Map map){
+        Map modelMap = map.get("model")==null?null:(Map)map.get("model");
+        if(modelMap!=null){
+            for(Object key:modelMap.keySet()){
+                map.put(key.toString(),modelMap.get(key));
+            }
+        }
+        return map;
+
+
+    }
+
     /**
      * 生产资源按图标分类
      * @param map

+ 2 - 2
imcs-admin-boot/imcs-tenant-biz/src/main/resources/mapper_tenant/base/defaults/ProductionresourceviewMapper.xml

@@ -121,10 +121,10 @@
         <if test="zoneId != null">
             and v.id in(select resource_id from imcs_z_zone_productionresource e where e.zone_id =  #{zoneId})
         </if>
-        <if test="code == null and code == ''">
+        <if test="code == null and code != ''">
             and v.code = #{code}
         </if>
-        <if test="name == null and name == ''">
+        <if test="name != null and name != ''">
             and v.name  like concat('%', #{name}, '%')
         </if>
         <if test="ip == null and ip == ''">