|
|
@@ -2,6 +2,9 @@ package beans.stockbill.bills;
|
|
|
|
|
|
import common.Controller;
|
|
|
import common.YosException;
|
|
|
+import common.data.Row;
|
|
|
+import common.data.Rows;
|
|
|
+import common.data.RowsMap;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
@@ -13,6 +16,23 @@ public class QTRK extends BasicBill {
|
|
|
|
|
|
@Override
|
|
|
public void checkValidate(boolean ischeck) throws YosException {
|
|
|
+ if(ischeck){
|
|
|
+ RowsMap codeRowsMap = codeRows.toRowsMap("st_stockbill_itemsid");
|
|
|
+ for(Row row:itemRows){
|
|
|
+ if(row.getBoolean("skucontrol")){
|
|
|
+ if(codeRowsMap.containsKey(row.getString("st_stockbill_itemsid"))){
|
|
|
+ if(codeRowsMap.get(row.getString("st_stockbill_itemsid")).size()!=row.getInteger("qty")){
|
|
|
+ throw new YosException("行号:"+row.getString("rowno")+"序列号数量和入库数量不一致");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ throw new YosException("受序列号管控的商品,审核时必须有序列号");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
super.checkValidate(ischeck);
|
|
|
}
|
|
|
|