|
|
@@ -214,13 +214,20 @@ public class toolscode extends Controller {
|
|
|
Long sa_itemskuid = content.getLong("sa_itemskuid");
|
|
|
Long sa_agentsid = content.getLong("sa_agentsid");
|
|
|
Long stockid = content.getLong("stockid");
|
|
|
- // Long sys_enterpriseid = content.getLong("sys_enterpriseid");
|
|
|
+ Long sys_enterpriseid = 0L;
|
|
|
// Long sa_logiscompid = content.getLong("sa_logiscompid");
|
|
|
// Long rec_contactsid = content.getLongValue("rec_contactsid");
|
|
|
long itemid = content.getLong("itemid");
|
|
|
String sku = content.getString("sku");
|
|
|
boolean islimit = content.getBooleanValue("islimit");
|
|
|
boolean isyj = content.getBooleanValue("isyj");
|
|
|
+
|
|
|
+ Rows agentsrows = dbConnect.runSqlQuery("SELECT sys_enterpriseid,sa_agentsid from sa_agents WHERE sa_agentsid=" + sa_agentsid);
|
|
|
+ if (agentsrows.isNotEmpty()) {
|
|
|
+ sys_enterpriseid = agentsrows.get(0).getLong("sys_enterpriseid");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "商品序列号档案新增");
|
|
|
|
|
|
if (sa_itemskuid <= 0 || dbConnect.runSqlQuery("select sa_itemskuid from sa_itemsku where sa_itemskuid=" + sa_itemskuid).isEmpty()) {
|
|
|
@@ -290,10 +297,7 @@ public class toolscode extends Controller {
|
|
|
|
|
|
insertSQL.setValue("stockid", oldstockid);
|
|
|
insertSQL.setValue("stockidnew", newstockid);
|
|
|
- insertSQL.setValue("changenotes", "");
|
|
|
- if (newitemid != 0) {
|
|
|
- insertSQL.setValue("changenotes", content.getStringValue("changenotes"));
|
|
|
- }
|
|
|
+ insertSQL.setValue("changenotes", content.getStringValue("changenotes"));
|
|
|
|
|
|
insertSQL.setDateValue("changedate");
|
|
|
insertSQL.setValue("changeby", username);
|
|
|
@@ -314,6 +318,7 @@ public class toolscode extends Controller {
|
|
|
sqlFactory.addParameter("userid", userid);
|
|
|
sqlFactory.addParameter("username", username);
|
|
|
sqlFactory.addParameter("sa_itemskuid", sa_itemskuid);
|
|
|
+ sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
sqlList.add(sqlFactory.getSQL());
|
|
|
dbConnect.runSqlUpdate(sqlList);
|
|
|
|