Esempio n. 1
0
  @Override
  public JavaBean1 modify(TransferOrderVO transferOrderVO) {
    transferOrderPO = new TransferOrderPO();
    this.transferOrderVO = transferOrderVO;

    this.transferOrderVO.setCarriage(
        generateFare(transferOrderVO.getDestination(), transferOrderVO.getTransportType()));
    VOtoPO();
    try {
      resultMessage = transferOrderdataservice.update(transferOrderPO);
    } catch (RemoteException e) {
      e.printStackTrace();
    }
    javaBean1.setObject(this.transferOrderVO);
    javaBean1.setResultMessage(resultMessage);

    return javaBean1;
  }
Esempio n. 2
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;
  }
Esempio n. 3
0
 public void VOtoPO() {
   this.transferOrderPO.setID(transferOrderVO.getID());
   this.transferOrderPO.setLoadingDate(transferOrderVO.getLoadingDate());
   this.transferOrderPO.setGenerateTime(transferOrderVO.getGenerateTime());
   this.transferOrderPO.setCarriage(transferOrderVO.getCarriage());
   this.transferOrderPO.setOrigin(transferOrderVO.getOrigin());
   this.transferOrderPO.setDestination(transferOrderVO.getDestination());
   this.transferOrderPO.setVehicleNum(transferOrderVO.getFlightNum());
   this.transferOrderPO.setContainerNum(transferOrderVO.getContainerNum());
   this.transferOrderPO.setOrderIDs(transferOrderVO.getOrderIDs());
   this.transferOrderPO.setSupervisionMan(transferOrderVO.getSupervisionMan());
   this.transferOrderPO.setApproState(transferOrderVO.getApproState());
   this.transferOrderPO.setTransportType(transferOrderVO.getTransportType());
 }