Просмотр исходного кода

退换单列表查询逻辑变更

hu 3 лет назад
Родитель
Сommit
e7dc26ba4f

+ 5 - 1
src/custom/restcontroller/webmanage/sale/aftersalesmag/aftersalesmag.java

@@ -20,6 +20,7 @@ import common.data.Row;
 import common.data.Rows;
 import common.data.RowsMap;
 import common.data.SQLFactory;
+import org.apache.commons.lang.StringUtils;
 import restcontroller.R;
 import utility.ERPDocking;
 
@@ -225,7 +226,10 @@ public class aftersalesmag extends Controller {
     @CACHEING
     public String queryaftersalesmagList() throws YosException {
         StringBuffer where = new StringBuffer(" 1=1 ");
-        where.append(" and t1.type ='").append(content.getString("type")).append("' ");
+        if(!StringUtils.isBlank(content.getString("type"))){
+            where.append(" and t1.type ='").append(content.getString("type")).append("' ");
+        }
+
         if (content.containsKey("where")) {
             JSONObject whereObject = content.getJSONObject("where");
             if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {