|
|
@@ -114,7 +114,7 @@ public class icstockbill extends CrmBase {
|
|
|
|
|
|
RowsMap billRowsMap = billRows.toRowsMap("st_stockbillid");
|
|
|
|
|
|
- Rows agentrows = new DBConnect().runSqlQuery("select sa_agentsid from sa_agents where agentnum='" + fagentnum + "' and siteid='MD'");
|
|
|
+ Rows agentrows = new DBConnect().runSqlQuery("select sa_agentsid,sys_enterpriseid from sa_agents where agentnum='" + fagentnum + "' and siteid='MD'");
|
|
|
if (agentrows.isEmpty()) {
|
|
|
resultObject.put("code", 0);
|
|
|
resultObject.put("status", "err");
|
|
|
@@ -169,6 +169,7 @@ public class icstockbill extends CrmBase {
|
|
|
saWarrantycard.setWhere("siteid", "MD");
|
|
|
|
|
|
sqlDump.add(SQLFactory.createUpdateSQL(new DBConnect(), "sa_itemsku")
|
|
|
+ .setValue("sys_enterpriseid", agentrows.get(0).getLong("sys_enterpriseid"))
|
|
|
.setValue("sa_agentsid", agentrows.get(0).getLong("sa_agentsid"))
|
|
|
.setValue("stockid", stockrows.get(0).getLong("stockid"))
|
|
|
.setSiteid("MD")
|