Esempio n. 1
0
  @UiHandler("done")
  public void onDoneClick(ClickEvent event) {
    // 验证路由工单列表
    if (!verifyRouteWorkListInfo()) {
      Window.alert("产生的路由工单表有误,请检查...");
      return;
    }
    // 保存路由工单列表
    String jobOrderCode = jobOrder.getCode();
    int length = previewA.getItemCount();
    for (int i = 0; i < length; i++) {
      ExecuteOrder executeOrder = new ExecuteOrder();
      String tempPreviewA = previewA.getItemText(i); // 设备名称,设备编码,板卡编码,端口编码,type
      String tempPreviewZ = previewZ.getItemText(i); // 设备名称,设备编码,板卡编码,端口编码,type
      String[] apreivew = tempPreviewA.split(","); //
      String[] zpreview = tempPreviewZ.split(",");

      executeOrder.setName(jobOrderCode + "_" + i++);

      executeOrder.setJobOderCode(jobOrderCode);
      executeOrder.setAmeCode(apreivew[1]);
      executeOrder.setAcard(apreivew[2]); // 板卡编码:。。/。。
      executeOrder.setAportCode(apreivew[3]); // 端口编码:./././.

      executeOrder.setZmeCode(zpreview[1]);
      executeOrder.setZcard(zpreview[2]);
      executeOrder.setZportCode(zpreview[3]);

      executeOrder.setType(apreivew[4]);
      executeOrder.setStatus((short) 1);

      businessListService.addExecuteOrder(executeOrder, addExecuteOrderCallback);
    }
    businessListService.updateJobOrderStatus(
        jobOrderCode,
        2,
        new AsyncCallback<Void>() {
          @Override
          public void onFailure(Throwable caught) {
            Window.alert("更新业务工单状态失败!!!");
          }

          @Override
          public void onSuccess(Void result) {}
        }); // 已创建路由
    //
    if (businessWorkListManagerTable != null) {
      businessWorkListManagerTable.updateBusinessWorkList();
      if (businessWorkListDetail == null) {
        this.businessWorkListDetail = businessWorkListManagerTable.getBusinessWorkListDetail();
      }
    }
    // 更新业务工单详细信息,业务工单的路由工单列表
    businessWorkListDetail.setJobOrder(jobOrder);
    businessListService.getAllExecuteOrderByJobOrder(jobOrder.getCode(), allExecuteOrdersCallBack);
    this.hide();
  }
Esempio n. 2
0
  public AddRouteWorkList(
      JobOrder jobOrder, BusinessWorkListManagerTable businessWorkListManagerTable) {
    setWidget(uiBinder.createAndBindUi(this));

    this.jobOrder = jobOrder;
    this.businessWorkListManagerTable = businessWorkListManagerTable;

    bWorkListAName.setHTML(jobOrder.getAmeCode());
    bworkListZName.setHTML(jobOrder.getZmeCode());

    setSize("743px", "420px");
    setGlassEnabled(true);

    type.setValue(true);

    previewA.addClickHandler(previewAClickhandler);
    previewZ.addClickHandler(previewZClickhandler);
  }