hu 5 месяцев назад
Родитель
Сommit
c552bc84e2

+ 6 - 8
src/custom/restcontroller/webmanage/sale/stockbill/stockbillitems.java

@@ -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"));