|
|
@@ -549,6 +549,7 @@ public class aftersalesmag extends Controller {
|
|
|
}
|
|
|
ArrayList<String> sqlList = new ArrayList<>();
|
|
|
SQLFactory sqlFactoryupdate;
|
|
|
+ Rows departmenthrrows =dbConnect.runSqlQuery("select *from sys_departmenthrid where hrid="+hrid);
|
|
|
if (ischeck) {
|
|
|
InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "st_stockbill");
|
|
|
long st_stockbillid = createTableID("st_stockbill");
|
|
|
@@ -560,6 +561,7 @@ public class aftersalesmag extends Controller {
|
|
|
insertSQL.setValue("sys_enterpriseid", rows.get(0).getLong("sys_enterpriseid"));
|
|
|
insertSQL.setValue("rb", 1);
|
|
|
insertSQL.setValue("sourceobject", "sa_aftersalesmag");
|
|
|
+ insertSQL.setValue("departmentid", departmenthrrows.isNotEmpty()?departmenthrrows.get(0).getLong("departmentid"):0);
|
|
|
insertSQL.setValue("sourceid", sa_aftersalesmagid);
|
|
|
insertSQL.setValue("stockid", stockid);
|
|
|
insertSQL.setValue("remarks", rows.get(0).getString("remarks"));
|
|
|
@@ -568,7 +570,8 @@ public class aftersalesmag extends Controller {
|
|
|
insertSQL.setDateValue("createdate");
|
|
|
insertSQL.setDateValue("billdate");
|
|
|
sqlList.add(insertSQL.getSQL());
|
|
|
-
|
|
|
+ sqlList.add(
|
|
|
+ DataContrlLog.createLog(this, "st_stockbill", st_stockbillid, "新增", "返修入库新增成功").getSQL());
|
|
|
int i = 1;
|
|
|
for (Row row : rowsdetail) {
|
|
|
insertSQL = SQLFactory.createInsertSQL(this, "st_stockbill_items");
|