/** * 对已提交后的领料计划进行保存,不修改领料计划的状态,只保存领料组,领料人等信息 * * @return * @throws IOException */ @SuppressWarnings("unchecked") public void saveViewOrderPlan() throws IOException { for (ZgTorderPlanbom obj : orderPlanboms) { ZgTorderPlanbom entity = new ZgTorderPlanbom(); entity.setCuid(obj.getCuid()); entity.setDepartmentId(StringUtils.trimToNull(obj.getDepartmentId())); entity.setUserId(StringUtils.trimToNull(obj.getUserId())); entity.setPlanDate(obj.getPlanDate()); entity.setPlanStartTime(StringUtils.trimToNull(obj.getPlanStartTime())); entity.setPlanEndTime(StringUtils.trimToNull(obj.getPlanEndTime())); // entity.setState("8"); zgTorderPlanbomExBo.updateOrderPlan1(entity); } // 更新该领料计划的领料组 领料人 zgTorderPlanExBo.updateOrderDeptId(orderPlanId); forwardQuery("操作成功"); }
@SuppressWarnings("unchecked") public void saveOrderPlan() throws IOException { boolean isUpdated = false; for (ZgTorderPlanbom obj : orderPlanboms) { if (null != obj) { ZgTorderPlanbom entity = new ZgTorderPlanbom(); entity.setCuid(obj.getCuid()); entity.setDepartmentId(StringUtils.trimToNull(obj.getDepartmentId())); entity.setUserId(StringUtils.trimToNull(obj.getUserId())); entity.setPlanDate(obj.getPlanDate()); entity.setPlanStartTime(StringUtils.trimToNull(obj.getPlanStartTime())); entity.setPlanEndTime(StringUtils.trimToNull(obj.getPlanEndTime())); entity.setState("4"); zgTorderPlanbomExBo.updateOrderPlan(entity); isUpdated = true; } } String orderPlanIds[] = orderPlanId.split(","); for (int i = 0; i < orderPlanIds.length; i++) { if (isUpdated) { zgTorderPlanExBo.updateOrderPlanState(orderPlanIds[i], "4"); } // 更新该领料计划的领料组 领料人 zgTorderPlanExBo.updateOrderDeptId(orderPlanIds[i]); } forwardQuery("操作成功"); }