shenjingwei 2 月之前
父节点
当前提交
fdb3e184d2

+ 3 - 1
src/custom/restcontroller/crm/agent/custorder/Custorder.java

@@ -112,6 +112,7 @@ public class Custorder extends Controller {
         Rows sa_custorderRow = SQLFactory.createQuerySQL(this, "sa_custorder", "sa_custorderid").setSiteid(siteid).setUniqueid(sa_custorderid).query();
         SQLDump sqldump = new SQLDump();
         if (sa_custorderid == 0 || sa_custorderRow.isEmpty()) {
+            sa_custorderid = createTableID("sa_custorder");
             InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sa_custorder");
             insertSQL.setValue("sonum", createBillCode("custorder"));// 订单编号
             insertSQL.setValue("siteid", siteid);// 站点
@@ -122,6 +123,7 @@ public class Custorder extends Controller {
             insertSQL.setValue("ispaid", 0);// 付款状态,待付款
             insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);// 合作企业档案ID
             insertSQL.setValue("sa_customersid", sa_customersid);// 合作企业档案ID
+            insertSQL.setUniqueid(sa_custorderid);
             sqldump.add(insertSQL);
         } else {
             UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sa_custorder");
@@ -132,7 +134,7 @@ public class Custorder extends Controller {
             sqldump.add(updateSQL);
         }
         sqldump.commit();
-        return getSucReturnObject().toString();
+        return getSucReturnObject().setData(sa_custorderid).toString();
     }
 
     @API(title = "美大CRM_经销商_客户订单删除", apiversion = R.ID2026031414454901.v1.class, params = {

+ 2 - 2
src/custom/restcontroller/crm/agent/item/item.java

@@ -12,9 +12,9 @@ import restcontroller.R;
 import java.util.ArrayList;
 
 @API(title = "美大CRM_经销商_商品管理")
-public class Item extends Controller {
+public class item extends Controller {
 
-    public Item(JSONObject content) throws YosException {
+    public item(JSONObject content) throws YosException {
         super(content);
     }
 

+ 6 - 2
src/custom/restcontroller/crm/agent/stock/stockbill.java

@@ -52,6 +52,7 @@ public class stockbill extends Controller {
         }
         SQLDump sqldump = new SQLDump();
         if (sys_enterprise_stockbillid <= 0 || SQLFactory.createQuerySQL(this, "sys_enterprise_stockbill", "sys_enterprise_stockbillid").setSiteid(siteid).setUniqueid(sys_enterprise_stockbillid).query().isEmpty()) {
+            sys_enterprise_stockbillid = createTableID("sys_enterprise_stockbill");
             InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_enterprise_stockbill");
             insertSQL.setValue("billno", createBillCode("enterprise_stockbill"));// 单据编号
             insertSQL.setValue("sa_custorderid", sa_custorderid);// C端订单ID
@@ -65,6 +66,7 @@ public class stockbill extends Controller {
             insertSQL.setValue("siteid", siteid);// 站点
             insertSQL.setValue("sys_enterprise_stockid", sys_enterprise_stockid);// 企业仓库ID
             insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);// 合作企业档案ID
+            insertSQL.setUniqueid(sys_enterprise_stockbillid);
             sqldump.add(insertSQL);
         } else {
             UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_enterprise_stockbill");
@@ -80,7 +82,7 @@ public class stockbill extends Controller {
             sqldump.add(updateSQL);
         }
         sqldump.commit();
-        return getSucReturnObject().toString();
+        return getSucReturnObject().setData(sys_enterprise_stockbillid).toString();
     }
 
     @API(title = "美大CRM_经销商_出入库单删除", apiversion = R.ID2026031715591001.v1.class, params = {
@@ -219,6 +221,7 @@ public class stockbill extends Controller {
 
         SQLDump sqldump = new SQLDump();
         if (sys_enterprise_stockbill_itemsid <= 0 || SQLFactory.createQuerySQL(this, "sys_enterprise_stockbill_items", "sys_enterprise_stockbill_itemsid").setSiteid(siteid).setUniqueid(sys_enterprise_stockbill_itemsid).query().isEmpty()) {
+            sys_enterprise_stockbill_itemsid = createTableID("sys_enterprise_stockbill_items");
             InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sys_enterprise_stockbill_items");
             insertSQL.setValue("siteid", siteid);// 站点
             insertSQL.setValue("sys_enterpriseid", sys_enterpriseid);// 合作企业档案ID
@@ -242,6 +245,7 @@ public class stockbill extends Controller {
             insertSQL.setValue("itemname", itemrow.get(0).getString("itemname"));// 产品名称
             insertSQL.setValue("skucontrol", itemrow.get(0).getBoolean("skucontrol"));// 是否单品管理
             insertSQL.setValue("qty", qty);// 数量
+            insertSQL.setUniqueid(sys_enterprise_stockbill_itemsid);
             sqldump.add(insertSQL);
         } else {
             UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_enterprise_stockbill_items");
@@ -254,7 +258,7 @@ public class stockbill extends Controller {
         }
         sqldump.commit();
         updateRowno(sys_enterprise_stockbillid);
-        return getSucReturnObject().toString();
+        return getSucReturnObject().setData(sys_enterprise_stockbill_itemsid).toString();
     }
 
     @API(title = "美大CRM_经销商_出入库单商品明细删除", apiversion = R.ID2026031716132201.v1.class, params = {