/** * 删除入库单中的半成品 * * @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; }
/** * 保存入库冲单表的半成品,保存在session * * @return */ public String saveBom() { List<ZgTstorageCanclebomEx> bomECancleList = (List<ZgTstorageCanclebomEx>) this.getSession().getAttribute("bomECancleList"); if (null != cancleBomList) { for (ZgTstorageCanclebomEx obj : cancleBomList) { if (obj != null) { for (ZgTstorageCanclebomEx temp : bomECancleList) { if (obj.getCuid().equals(temp.getCuid())) { temp.setNum(obj.getNum()); temp.setZbz(obj.getZbz()); temp.setStorageCancleId(obj.getStorageCancleId()); temp.setIsModity(true); } } } } } return SUCCESS; }