|
|
@@ -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 = {
|