コード例 #1
0
  public ArrayList<ExpenseVO> getExpense(
      ArrayList<ExpenseVO> listExpenseTime,
      ArrayList<ExpenseVO> listExpenseType,
      ArrayList<ExpenseVO> listExpenseClient,
      ArrayList<ExpenseVO> listExpenseOperator,
      ArrayList<ExpenseVO> listExpenseStorehouse) {
    ArrayList<ExpenseVO> listExpense = new ArrayList<ExpenseVO>();
    int sizeTime = listExpenseTime.size();
    int sizeType = listExpenseType.size();
    int sizeClient = listExpenseClient.size();
    int sizeOperator = listExpenseOperator.size();
    int sizeStorehouse = listExpenseStorehouse.size();

    if (sizeTime > 0) {
      listExpense = listExpenseTime;
    } else {
      if (sizeType > 0) {
        listExpense = listExpenseType;
      } else {
        if (sizeClient > 0) {
          listExpense = listExpenseClient;
        } else {
          if (sizeOperator > 0) {
            listExpense = listExpenseOperator;
          } else {
            listExpense = listExpenseStorehouse;
          }
        }
      }
    }

    if (sizeTime > 0) {
      for (int t = 0; t < listExpense.size(); ) {
        for (int k = 0; k < sizeTime; k++) {
          if (listExpense.get(t).equals(listExpenseTime.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeTime - 1) {
              listExpense.remove(t);
            }
          }
        }
      }
    }

    if (sizeType > 0) {
      for (int t = 0; t < listExpense.size(); ) {
        for (int k = 0; k < sizeType; k++) {
          if (listExpense.get(t).equals(listExpenseType.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeType - 1) {
              listExpense.remove(t);
            }
          }
        }
      }
    }

    if (sizeClient > 0) {
      for (int t = 0; t < listExpense.size(); ) {
        for (int k = 0; k < sizeClient; k++) {
          if (listExpense.get(t).equals(listExpenseClient.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeClient - 1) {
              listExpense.remove(t);
            }
          }
        }
      }
    }

    if (sizeOperator > 0) {
      for (int t = 0; t < listExpense.size(); ) {
        for (int k = 0; k < sizeOperator; k++) {
          if (listExpense.get(t).equals(listExpenseOperator.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeOperator - 1) {
              listExpense.remove(t);
            }
          }
        }
      }
    }

    if (sizeStorehouse > 0) {
      for (int t = 0; t < listExpense.size(); ) {
        for (int k = 0; k < sizeStorehouse; k++) {
          if (listExpense.get(t).equals(listExpenseStorehouse.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeStorehouse - 1) {
              listExpense.remove(t);
            }
          }
        }
      }
    }
    return listExpense;
  }
コード例 #2
0
  public ArrayList<UnderflowBillVO> getUnderflow(
      ArrayList<UnderflowBillVO> listUnderflowTime,
      ArrayList<UnderflowBillVO> listUnderflowType,
      ArrayList<UnderflowBillVO> listUnderflowClient,
      ArrayList<UnderflowBillVO> listUnderflowOperator,
      ArrayList<UnderflowBillVO> listUnderflowStorehouse) {
    ArrayList<UnderflowBillVO> listUnderflow = new ArrayList<UnderflowBillVO>();
    int sizeTime = listUnderflowTime.size();
    int sizeType = listUnderflowType.size();
    int sizeClient = listUnderflowClient.size();
    int sizeOperator = listUnderflowOperator.size();
    int sizeStorehouse = listUnderflowStorehouse.size();

    if (sizeTime > 0) {
      listUnderflow = listUnderflowTime;
    } else {
      if (sizeType > 0) {
        listUnderflow = listUnderflowType;
      } else {
        if (sizeClient > 0) {
          listUnderflow = listUnderflowClient;
        } else {
          if (sizeOperator > 0) {
            listUnderflow = listUnderflowOperator;
          } else {
            listUnderflow = listUnderflowStorehouse;
          }
        }
      }
    }

    if (sizeTime > 0) {
      for (int t = 0; t < listUnderflow.size(); ) {
        for (int k = 0; k < sizeTime; k++) {
          if (listUnderflow.get(t).equals(listUnderflowTime.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeTime - 1) {
              listUnderflow.remove(t);
            }
          }
        }
      }
    }

    if (sizeType > 0) {
      for (int t = 0; t < listUnderflow.size(); ) {
        for (int k = 0; k < sizeType; k++) {
          if (listUnderflow.get(t).equals(listUnderflowType.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeType - 1) {
              listUnderflow.remove(t);
            }
          }
        }
      }
    }

    if (sizeClient > 0) {
      for (int t = 0; t < listUnderflow.size(); ) {
        for (int k = 0; k < sizeClient; k++) {
          if (listUnderflow.get(t).equals(listUnderflowClient.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeClient - 1) {
              listUnderflow.remove(t);
            }
          }
        }
      }
    }

    if (sizeOperator > 0) {
      for (int t = 0; t < listUnderflow.size(); ) {
        for (int k = 0; k < sizeOperator; k++) {
          if (listUnderflow.get(t).equals(listUnderflowOperator.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeOperator - 1) {
              listUnderflow.remove(t);
            }
          }
        }
      }
    }

    if (sizeStorehouse > 0) {
      for (int t = 0; t < listUnderflow.size(); ) {
        for (int k = 0; k < sizeStorehouse; k++) {
          if (listUnderflow.get(t).equals(listUnderflowStorehouse.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeStorehouse - 1) {
              listUnderflow.remove(t);
            }
          }
        }
      }
    }
    return listUnderflow;
  }
コード例 #3
0
  public ArrayList<PurchaseReturnBillVO> getPurchaseReturn(
      ArrayList<PurchaseReturnBillVO> listPurchaseReturnTime,
      ArrayList<PurchaseReturnBillVO> listPurchaseReturnType,
      ArrayList<PurchaseReturnBillVO> listPurchaseReturnClient,
      ArrayList<PurchaseReturnBillVO> listPurchaseReturnOperator,
      ArrayList<PurchaseReturnBillVO> listPurchaseReturnStorehouse) {
    ArrayList<PurchaseReturnBillVO> listPurchaseReturn = new ArrayList<PurchaseReturnBillVO>();
    int sizeTime = listPurchaseReturnTime.size();
    int sizeType = listPurchaseReturnType.size();
    int sizeClient = listPurchaseReturnClient.size();
    int sizeOperator = listPurchaseReturnOperator.size();
    int sizeStorehouse = listPurchaseReturnStorehouse.size();

    if (sizeTime > 0) {
      listPurchaseReturn = listPurchaseReturnTime;
    } else {
      if (sizeType > 0) {
        listPurchaseReturn = listPurchaseReturnType;
      } else {
        if (sizeClient > 0) {
          listPurchaseReturn = listPurchaseReturnClient;
        } else {
          if (sizeOperator > 0) {
            listPurchaseReturn = listPurchaseReturnOperator;
          } else {
            listPurchaseReturn = listPurchaseReturnStorehouse;
          }
        }
      }
    }

    if (sizeTime > 0) {
      for (int t = 0; t < listPurchaseReturn.size(); ) {
        for (int k = 0; k < sizeTime; k++) {
          if (listPurchaseReturn.get(t).equals(listPurchaseReturnTime.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeTime - 1) {
              listPurchaseReturn.remove(t);
            }
          }
        }
      }
    }

    if (sizeType > 0) {
      for (int t = 0; t < listPurchaseReturn.size(); ) {
        for (int k = 0; k < sizeType; k++) {
          if (listPurchaseReturn.get(t).equals(listPurchaseReturnType.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeType - 1) {
              listPurchaseReturn.remove(t);
            }
          }
        }
      }
    }

    if (sizeClient > 0) {
      for (int t = 0; t < listPurchaseReturn.size(); ) {
        for (int k = 0; k < sizeClient; k++) {
          if (listPurchaseReturn.get(t).equals(listPurchaseReturnClient.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeClient - 1) {
              listPurchaseReturn.remove(t);
            }
          }
        }
      }
    }

    if (sizeOperator > 0) {
      for (int t = 0; t < listPurchaseReturn.size(); ) {
        for (int k = 0; k < sizeOperator; k++) {
          if (listPurchaseReturn.get(t).equals(listPurchaseReturnOperator.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeOperator - 1) {
              listPurchaseReturn.remove(t);
            }
          }
        }
      }
    }

    if (sizeStorehouse > 0) {
      for (int t = 0; t < listPurchaseReturn.size(); ) {
        for (int k = 0; k < sizeStorehouse; k++) {
          if (listPurchaseReturn.get(t).equals(listPurchaseReturnStorehouse.get(k))) {
            t++;
            break;
          } else {
            if (k == sizeStorehouse - 1) {
              listPurchaseReturn.remove(t);
            }
          }
        }
      }
    }
    return listPurchaseReturn;
  }