Beispiel #1
0
  @Override
  public JavaBean1 addTransferOrder(TransferOrderVO transferOrderVO) {
    transferOrderPO = new TransferOrderPO();
    this.transferOrderVO = transferOrderVO;

    this.transferOrderVO.setApproState(ApproState.NotApprove);
    this.transferOrderVO.setLoadingDate(generateDate());
    this.transferOrderVO.setGenerateTime(Time.generateTime());
    this.transferOrderVO.setOrigin(CalculateFreight.origin);
    this.transferOrderVO.setID(generateId());
    this.transferOrderVO.setCarriage(
        generateFare(transferOrderVO.getDestination(), transferOrderVO.getTransportType()));
    VOtoPO();

    try {
      resultMessage = transferOrderdataservice.addTransferOrder(transferOrderPO);
    } catch (RemoteException e) {
      e.printStackTrace();
    }

    if (resultMessage == ResultMessage.Success) {
      updateLogisticsInfor = new UpdateLogisticsInfor();
      ArrayList<String> orderIDs = this.transferOrderVO.getOrderIDs();
      String orderID;
      for (int i = 0; i < orderIDs.size(); i++) {
        orderID = orderIDs.get(i);
        updateLogisticsInfor.update(
            date,
            orderID,
            " 订单已从" + Login.city + "中转中心发出,下一站: " + this.transferOrderVO.getDestination() + "中转中心");
      }
    }
    javaBean1.setObject(this.transferOrderVO);
    javaBean1.setResultMessage(resultMessage);

    return javaBean1;
  }
Beispiel #2
0
 public String generateDate() {
   date = Time.generateDate();
   return date;
 }