郭齐峰 před 2 roky
rodič
revize
b6eeff8cef

+ 0 - 5
src/custom/restcontroller/R.java

@@ -4731,11 +4731,6 @@ public class R {
         }
     }
 
-    public static class ID20230511131504 {
-        public static class v1 {
-        }
-    }
-
     public static class ID20230511144904 {
         public static class v1 {
         }

+ 0 - 15
src/custom/restcontroller/webmanage/sale/agents/agents.java

@@ -558,21 +558,6 @@ public class agents extends Controller {
     }
 
 
-    @API(title = "批量修改经销商营销区域", apiversion = R.ID20230511131504.v1.class)
-    @CACHEING_CLEAN(apiClass = {EnterpriseTradeField.class}, cms = {@cm(clazz = agents.class, method = {"query_agentList", "query_agentMain"}), @cm(clazz = salearea.class, method = {"query_agent"}), @cm(clazz = salearea.class, method = {"query_agent"})})
-    public String updateSaler() throws YosException {
-        Long sa_saleareaid = content.getLong("sa_saleareaid");
-        JSONArray sa_agentsids = content.getJSONArray("sa_agentsids");
-        if (sa_agentsids.isEmpty()) {
-            return getErrReturnObject().setErrMsg("未选择经销商").toString();
-        }
-        String sql = "update sys_enterprise_tradefield set sa_saleareaid=" + sa_saleareaid + " WHERE sa_agentsid in" + sa_agentsids + "  AND siteid = '" + siteid + "'";
-        sql = sql.replace("[", "(").replace("]", ")");
-        dbConnect.runSqlUpdate(sql);
-        return getSucReturnObject().toString();
-    }
-
-
     /**
      * 添加默认的营销账户余额
      *

+ 2 - 2
src/custom/restcontroller/webmanage/sale/promotion/ExportExcel.java

@@ -159,7 +159,7 @@ public class ExportExcel {
         cellStyle2.setWrapText(true);
 
         /*第一行*/
-        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 9));
+        sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 8));
 
         /*第一行塞值*/
         row = sheet.createRow(0);
@@ -167,7 +167,7 @@ public class ExportExcel {
         cell.setCellStyle(cellStyle4);
         cell.setCellValue("促销商品导入");
         /*第二行*/
-        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 9));
+        sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 8));
         /*第二行塞值*/
         row = sheet.createRow(1);
         cell = row.createCell(0);// ID

+ 1 - 1
src/custom/restcontroller/webmanage/sale/promotion/SQL/商品查询.sql

@@ -11,7 +11,7 @@ SELECT
 FROM
 	plm_item t1
 	 LEFT JOIN plm_unit t2 ON t2.unitid = t1.unitid AND t2.siteid = t1.siteid
-	where $where$ and t1.siteid=$siteid$ and ifnull(t1.isonsale,0) =1 and t1.itemid not in (select itemid from sa_promotion_items where sa_promotionid=$sa_promotionid$)
+	where $where$ and t1.siteid=$siteid$ and t1.status='审核' and t1.itemid not in (select itemid from sa_promotion_items where sa_promotionid=$sa_promotionid$)
 	  and t1.itemid in (SELECT itemid
                     from plm_item_tradefield
                     WHERE ($where1$)

+ 1 - 1
src/custom/restcontroller/webmanage/sale/promotion/promotionItems.java

@@ -327,7 +327,7 @@ public class promotionItems extends Controller {
             sqlFactory.addParameter("siteid", siteid);
             sqlFactory.addParameter_in("itemno", itemnoList);
             RowsMap itemRowsMap = dbConnect.runSqlQuery(sqlFactory.getSQL()).toRowsMap("itemno");
-            ArrayList<String> inItemnoList = dbConnect.runSqlQuery("select itemno from sa_promotion_auth where siteid='" + siteid + "' and sa_promotionid=" + sa_promotionid).toArrayList("itemno");
+            ArrayList<String> inItemnoList = dbConnect.runSqlQuery("select t2.itemno from sa_promotion_items t1 inner join plm_item t2 on t1.siteid=t2.siteid and t1.itemid=t2.itemid where t1.siteid='" + siteid + "' and t1.sa_promotionid=" + sa_promotionid).toArrayList("itemno");
             for (Row row : rows) {
                 String itemno = row.getString("itemno");
                 String orderminqty = row.getString("orderminqty");

+ 1 - 0
src/custom/restcontroller/webmanage/sale/salearea/salearea.java

@@ -354,6 +354,7 @@ public class salearea extends Controller {
         }
         boolean isExport = content.getBooleanValue("isExport");
         Boolean isAll = content.getBooleanValue("isAll");
+        if (sa_saleareaidsList.isEmpty()) isAll = true;
         if (isAll) {
             sa_saleareaidsList = dbConnect.runSqlQuery("SELECT sa_saleareaid from sa_salearea  WHERE siteid = '" + siteid + "' AND isused").toArrayList("sa_saleareaid");
         } else {

+ 2 - 1
src/custom/restcontroller/webmanage/sale/transferbill/Transferbill.java

@@ -91,7 +91,8 @@ public class Transferbill extends Controller {
         sqlFactory.addParameter("remarks", remarks);
         sqlFactory.addParameter("sa_transferbillid", sa_transferbillid);
         dbConnect.runSqlUpdate(sqlFactory.getSQL());
-        return getSucReturnObject().toString();
+        content.put("sa_transferbillid",sa_transferbillid);
+        return queryById();
     }
 
     @API(title = "审核", apiversion = R.ID20230511144704.v1.class)