Esempio n. 1
0
  @Override
  public JavaBean1 inquireA(String id) {
    try {
      javaBean1 = transferOrderdataservice.findA(id);
    } catch (RemoteException e) {
      e.printStackTrace();
    }
    transferOrderPO = (TransferOrderPO) javaBean1.getObject();
    this.transferOrderVO = new TransferOrderVO();

    if (javaBean1.getResultMessage() == ResultMessage.NotExist) {
      return javaBean1;
    }
    this.transferOrderVO.setID(transferOrderPO.getID());
    this.transferOrderVO.setLoadingDate(transferOrderPO.getLoadingDate());
    this.transferOrderVO.setCarriage(transferOrderPO.getCarriage());
    this.transferOrderVO.setOrigin(transferOrderPO.getOrigin());
    this.transferOrderVO.setDestination(transferOrderPO.getDestination());
    this.transferOrderVO.setFlightNum(transferOrderPO.getVehicleNum());
    this.transferOrderVO.setContainerNum(transferOrderPO.getContainerNum());
    this.transferOrderVO.setOrderIDs(transferOrderPO.getOrderIDs());
    this.transferOrderVO.setSupervisionMan(transferOrderPO.getSupervisionMan());
    this.transferOrderVO.setApproState(transferOrderPO.getApproState());
    this.transferOrderVO.setTransportType(transferOrderPO.getTransportType());

    javaBean1.setObject(transferOrderVO);
    return javaBean1;
  }
Esempio n. 2
0
  @Override
  public JavaBean1 inquireB(String time) {
    try {
      javaBean1 = transferOrderdataservice.findB(time);
    } catch (RemoteException e) {
      e.printStackTrace();
    }
    arrayList = (ArrayList<TransferOrderlineitemPO>) javaBean1.getObject();
    int k = arrayList.size();

    lineitemPOtolineitemVO(k);

    javaBean1.setObject(arrayList2);
    return javaBean1;
  }
Esempio n. 3
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. 4
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;
  }