QTRK.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package beans.stockbill.bills;
  2. import common.Controller;
  3. import common.YosException;
  4. import common.data.Row;
  5. import common.data.Rows;
  6. import common.data.RowsMap;
  7. import java.util.ArrayList;
  8. public class QTRK extends BasicBill {
  9. public QTRK(Controller controller, long st_stockbillid) throws YosException {
  10. super(controller, st_stockbillid);
  11. }
  12. @Override
  13. public void checkValidate(boolean ischeck) throws YosException {
  14. if(ischeck){
  15. RowsMap codeRowsMap = codeRows.toRowsMap("st_stockbill_itemsid");
  16. for(Row row:itemRows){
  17. if(row.getBoolean("skucontrol")){
  18. if(codeRowsMap.containsKey(row.getString("st_stockbill_itemsid"))){
  19. if(codeRowsMap.get(row.getString("st_stockbill_itemsid")).size()!=row.getInteger("qty")){
  20. //throw new YosException("行号:"+row.getString("rowno")+"序列号数量和入库数量不一致");
  21. }
  22. }else{
  23. //throw new YosException("受序列号管控的商品,审核时必须有序列号");
  24. }
  25. }
  26. }
  27. }
  28. super.checkValidate(ischeck);
  29. }
  30. @Override
  31. public ArrayList<String> getCheckSql(boolean ischeck) throws YosException {
  32. return super.getCheckSql(ischeck);
  33. }
  34. @Override
  35. public boolean isInStock(boolean fischeck) {
  36. if (fischeck && rb == 1 || !fischeck && rb == 0) {
  37. return true;
  38. }
  39. return false;
  40. }
  41. }