/**
   * 删除入库单中的半成品
   *
   * @throws IOException
   */
  public String deleteBom() throws IOException {
    List<ZgTstorageCanclebomEx> bomECancleList =
        (List<ZgTstorageCanclebomEx>) this.getSession().getAttribute("bomECancleList");

    for (int i = 0; i < items.length; i++) {
      Hashtable params = HttpUtils.parseQueryString(items[i]);
      String cuid = (String) params.get("cuid");
      for (ZgTstorageCanclebomEx obj : bomECancleList) {
        if (cuid.equals(obj.getCuid())) {
          obj.setIsDel(true);
          obj.setIsModity(true);
          break;
        }
      }
    }

    this.getSession().setAttribute("bomECancleList", bomECancleList);

    // 保存bomIds到session中,用于页面展示可选bom的时候过滤
    String bomECancleIds = "";
    for (ZgTstorageCanclebomEx obj : bomECancleList) {
      if (!obj.getIsDel()) {
        bomECancleIds = bomECancleIds + obj.getStorageId() + obj.getOrderBomId() + ",";
      }
    }
    this.getSession().setAttribute("bomECancleIds", bomECancleIds);

    return SUCCESS;
  }
Ejemplo n.º 2
0
 /** 删除对象 */
 public String delBatch() {
   for (int i = 0; i < items.length; i++) {
     Hashtable params = HttpUtils.parseQueryString(items[i]);
     java.lang.Integer id = new java.lang.Integer((String) params.get("id"));
     noteSendManager.removeById(id);
   }
   Flash.current().success(DELETE_SUCCESS);
   return LIST_ACTION;
 }
  /**
   * 为入库冲单生成入生成半成品
   *
   * @throws IOException
   */
  public void generateBom() throws IOException {
    List<ZgTstorageCanclebomEx> bomECancleList =
        (List<ZgTstorageCanclebomEx>) this.getSession().getAttribute("bomECancleList");

    for (int i = 0; i < items.length; i++) {
      Hashtable params = HttpUtils.parseQueryString(items[i]);
      ZgTstorageCanclebomEx obj = new ZgTstorageCanclebomEx();
      String cuid = zgTorderPlanbomExBo.getCUID();
      obj.setCuid(cuid);
      obj.setAufnr((java.lang.String) params.get("aufnr"));

      obj.setArbpl((java.lang.String) params.get("arbpl"));
      obj.setStorageId((java.lang.String) params.get("storageId"));
      obj.setMatnr((java.lang.String) params.get("matnr"));
      obj.setIdnrk((java.lang.String) params.get("idnrk"));
      obj.setMsehl1((java.lang.String) params.get("msehl1"));
      obj.setAllNum(Double.parseDouble((java.lang.String) params.get("allNum")));
      obj.setNum(Double.parseDouble((java.lang.String) params.get("allNum")));
      obj.setOrderBomId((java.lang.String) params.get("orderBomId"));
      obj.setStorageCancleId((java.lang.String) params.get("storageCancleId"));
      obj.setLgort((String) params.get("lgort"));
      obj.setIsModity(true);
      bomECancleList.add(obj);
    }
    this.getSession().setAttribute("bomECancleList", bomECancleList);

    // 保存bomIds到session中,用于页面展示可选bom的时候过滤
    String bomECancleIds = "";
    for (ZgTstorageCanclebomEx obj : bomECancleList) {
      if (!obj.getIsDel()) {
        bomECancleIds = bomECancleIds + obj.getStorageId() + obj.getOrderBomId() + ",";
      }
    }
    this.getSession().setAttribute("bomECancleIds", bomECancleIds);

    returnMsgAndCloseWindow("操作成功");
  }