|
|
@@ -179,9 +179,11 @@ public class dbstockbill extends Controller {
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- dbConnect.runSqlUpdate(
|
|
|
- "delete from st_dbstockbill where siteid='" + siteid + "' and st_dbstockbillid=" + st_dbstockbillid);
|
|
|
+ ArrayList<String> sqllist = new ArrayList<>();
|
|
|
+ sqllist.add("delete from st_dbstockbill where siteid='" + siteid + "' and st_dbstockbillid=" + st_dbstockbillid);
|
|
|
+ sqllist.add("delete from st_dbstockbilldetail where siteid='" + siteid + "' and st_dbstockbillid=" + st_dbstockbillid);
|
|
|
+ sqllist.add("delete from st_dbstockbilldetailsku where siteid='" + siteid + "' and st_dbstockbillid=" + st_dbstockbillid);
|
|
|
+ dbConnect.runSqlUpdate(sqllist);
|
|
|
}
|
|
|
return batchDeleteErr.getReturnObject().toString();
|
|
|
}
|
|
|
@@ -397,10 +399,13 @@ public class dbstockbill extends Controller {
|
|
|
if(!dbstockbilldetailrowsMap.containsKey(row.getString("st_dbstockbilldetailid"))){
|
|
|
return getErrReturnObject().setErrMsg("关联表体不存在").toString();
|
|
|
}
|
|
|
- if(dbstockbilldetailrowsMap.get(row.getString("st_dbstockbilldetailid")).get(0).getLong("instockid")
|
|
|
+ if(!dbstockbillrows.get(0).getBoolean("isnotimmediately") && dbstockbilldetailrowsMap.get(row.getString("st_dbstockbilldetailid")).get(0).getLong("instockid")
|
|
|
!=skurowsmap.get(row.getString("sku")).get(0).getLong("stockid")){
|
|
|
return getErrReturnObject().setErrMsg("序列号" + row.getString("sku")+ "所在仓库已变动").toString();
|
|
|
}
|
|
|
+ if(dbstockbillrows.get(0).getBoolean("isnotimmediately") && 0!=skurowsmap.get(row.getString("sku")).get(0).getLong("stockid")){
|
|
|
+ return getErrReturnObject().setErrMsg("序列号" + row.getString("sku")+ "所在仓库已变动").toString();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Rows stockbill=dbConnect.runSqlQuery("select * from st_stockbill where sourceid="+st_dbstockbillid +" and sourceobject='st_dbstockbill' and siteid='"+siteid+"'");
|