ソースを参照

资金流水查询条件更新及促销方案查询商品添加领域

hu 3 年 前
コミット
f7da79339d

+ 2 - 2
src/custom/restcontroller/sale/cashbill/cashbill.java

@@ -448,11 +448,11 @@ public class cashbill extends Controller {
 
             }
             if (whereObject.containsKey("begindate") && !"".equals(whereObject.getString("begindate"))) {
-                where = where + " and t1.checkdate >='" + whereObject.getString("begindate") + "'";
+                where = where + " and DATE_FORMAT(t1.checkdate,'%Y-%m-%d') >=DATE_FORMAT('"+whereObject.getString("begindate")+"','%Y-%m-%d')";
 
             }
             if (whereObject.containsKey("enddate") && !"".equals(whereObject.getString("enddate"))) {
-                where = where + " and t1.checkdate <='" + whereObject.getString("enddate") + "' ";
+                where = where + " and DATE_FORMAT(t1.checkdate,'%Y-%m-%d') <=DATE_FORMAT('"+whereObject.getString("enddate")+"','%Y-%m-%d')";
 
             }
 

+ 4 - 0
src/custom/restcontroller/sale/promotion/promotion.java

@@ -102,8 +102,12 @@ public class promotion extends Controller {
         ArrayList ids = rows.toArrayList("itemid", new ArrayList<>());
         // 附件
         RowsMap attRowsMap = getAttachmentUrl("plm_item", ids);
+        //商品领域
+        RowsMap tradefieldRowsMap = beans.Item.Item.getTradefieldRowsMap(this, ids);
+
         for (Row row : rows) {
             row.put("attinfos", attRowsMap.getOrDefault(row.getString("itemid"), new Rows()));
+            row.put("tradefield", tradefieldRowsMap.getOrDefault(row.getString("itemid"), new Rows()));
         }
 
         return getSucReturnObject().setData(rows).toString();