|
|
@@ -208,17 +208,15 @@ public class stockbillitems extends Controller {
|
|
|
}else{
|
|
|
insertSQL.setValue("stockid", stockRowsMap.get("101").get(0).getLong("stockid"));
|
|
|
}
|
|
|
- }else if(rowscount.get(0).getString("type").equals("其他出库")){
|
|
|
- if(rowscount.get(0).getLong("stockid")!=0){
|
|
|
- insertSQL.setValue("stockid", rowscount.get(0).getLong("stockid"));
|
|
|
- }else{
|
|
|
- insertSQL.setValue("stockid",itemRowsMap.containsKey(iteminfo.getStringValue("itemid"))?itemRowsMap.get(iteminfo.getStringValue("itemid")).get(0).getLong("stockid"):iteminfo.getLongValue("stockid"));
|
|
|
- }
|
|
|
+ }
|
|
|
+ }else if(rowscount.get(0).getString("type").equals("其他出库")){
|
|
|
+ if(rowscount.get(0).getLong("stockid")!=0){
|
|
|
+ insertSQL.setValue("stockid", rowscount.get(0).getLong("stockid"));
|
|
|
}else{
|
|
|
- insertSQL.setValue("stockid", iteminfo.getLong("stockid"));
|
|
|
+ insertSQL.setValue("stockid",itemRowsMap.containsKey(iteminfo.getStringValue("itemid"))?itemRowsMap.get(iteminfo.getStringValue("itemid")).get(0).getLong("stockid"):iteminfo.getLongValue("stockid"));
|
|
|
}
|
|
|
}else{
|
|
|
- insertSQL.setValue("stockid", iteminfo.getLongValue("stockid"));
|
|
|
+ insertSQL.setValue("stockid", iteminfo.getLong("stockid"));
|
|
|
}
|
|
|
|
|
|
insertSQL.setValue("itemid", iteminfo.getStringValue("itemid"));
|
|
|
@@ -240,7 +238,7 @@ public class stockbillitems extends Controller {
|
|
|
if(StringUtils.isBlank(rowscount.get(0).getString("name"))
|
|
|
|| StringUtils.isBlank(rowscount.get(0).getString("phonenumber"))
|
|
|
|| StringUtils.isBlank(rowscount.get(0).getString("address"))){
|
|
|
- Rows orderRows =dbConnect.runSqlQuery("select * from sa_order where sa+sa_orderid="+iteminfo.getLongValue("sa_orderid"));
|
|
|
+ Rows orderRows =dbConnect.runSqlQuery("select * from sa_order where sa_orderid="+iteminfo.getLongValue("sa_orderid"));
|
|
|
if(orderRows.isNotEmpty()){
|
|
|
sqlList.add("update st_stockbill set name='"+orderRows.get(0).getString("contact")+"',phonenumber='"+orderRows.get(0).getString("phonenumber")+"',address='"+orderRows.get(0).getString("address")+"' where st_stockbillid="+st_stockbillid);
|
|
|
}
|