public String dispatchTemp(HttpServletRequest request, ActionForm form) throws Exception { String forward = "resultMessage"; RepairSearchForm searchForm = (RepairSearchForm) form; RepairHandleBo rhb = RepairHandleBo.getInstance(); Long userId = (Long) request.getSession().getAttribute("userId"); searchForm.setCurrentStatus("T"); // 准备派工 searchForm.setUpdateBy(userId); searchForm.setUpdateDate(new Date()); String repairMans = request.getParameter("repairMans"); if (repairMans != null && repairMans.startsWith("@")) { repairMans = repairMans.substring(1) + " "; } rhb.dispatch(searchForm, repairMans); String tempAttache = request.getParameter("attacheIds"); if (tempAttache != null && !tempAttache.equals("")) { rhb.updateAttacheByAttacheIdsAndSheetNo( tempAttache.split(","), searchForm.getRepairNo(), userId); } request.setAttribute("tag", "1"); request.setAttribute("businessFlag", "repairDispatch"); return forward; }
/** * 修复提交审批 * * @param request * @param form * @return * @throws Exception */ public String repairEnd(HttpServletRequest request, ActionForm form) throws Exception { String forward = "resultMessage"; RepairSearchForm searchForm = (RepairSearchForm) form; RepairHandleBo rhb = RepairHandleBo.getInstance(); Long userId = (Long) request.getSession().getAttribute("userId"); searchForm.setCurrentStatus("F"); // 提交审批 searchForm.setUpdateBy(userId); searchForm.setUpdateDate(new Date()); try { rhb.repairEnd(searchForm); } catch (VersionException ve) { return "versionErr"; } String tempAttache = request.getParameter("attacheIds"); if (tempAttache != null && !tempAttache.equals("")) { rhb.updateAttacheByAttacheIdsAndSheetNo( tempAttache.split(","), searchForm.getRepairNo(), userId); } request.setAttribute("tag", "1"); request.setAttribute("businessFlag", "repairEnd"); return forward; }
/** * 返还 -- 返还完成 * * @param request * @param form * @return * @throws Exception */ public String repairReturnEnd(HttpServletRequest request, ActionForm form) throws Exception { String forward = "resultMessage"; RepairSearchForm searchForm = (RepairSearchForm) form; RepairHandleBo rhb = RepairHandleBo.getInstance(); Long userId = (Long) request.getSession().getAttribute("userId"); searchForm.setCurrentStatus("R"); // 已返还 searchForm.setUpdateBy(userId); searchForm.setUpdateDate(new Date()); String[] arrivalDate = request.getParameterValues("arrivalDate"); String[] returnDate = request.getParameterValues("returnDate"); String[] travelFee = request.getParameterValues("travelFee"); String[] laborCosts = request.getParameterValues("laborCosts"); String[] repairCondition = request.getParameterValues("repairCondition"); String[] travelId = request.getParameterValues("travelId"); String[] travelIdAjaxAdd = request.getParameterValues("travelIdAjaxAdd"); String[] repairManAjaxAdd = request.getParameterValues("repairManAjaxAdd"); String[] departDateAjaxAdd = request.getParameterValues("departDateAjaxAdd"); String[] arrivalDateAjaxAdd = request.getParameterValues("arrivalDateAjaxAdd"); String[] returnDateAjaxAdd = request.getParameterValues("returnDateAjaxAdd"); String[] travelFeeAjaxAdd = request.getParameterValues("travelFeeAjaxAdd"); String[] laborCostsAjaxAdd = request.getParameterValues("laborCostsAjaxAdd"); String[] repairConditionAjaxAdd = request.getParameterValues("repairConditionAjaxAdd"); String[] remarkAjaxAdd = request.getParameterValues("remarkAjaxAdd"); if (travelId == null) { throw new Exception("travelId null!"); } ArrayList<String[]> repairManInfo = new ArrayList<String[]>(); repairManInfo.add(travelId); repairManInfo.add(arrivalDate); repairManInfo.add(returnDate); repairManInfo.add(travelFee); repairManInfo.add(laborCosts); repairManInfo.add(repairCondition); ArrayList<String[]> repairManInfoAdd = new ArrayList<String[]>(); repairManInfoAdd.add(travelIdAjaxAdd); repairManInfoAdd.add(repairManAjaxAdd); repairManInfoAdd.add(departDateAjaxAdd); repairManInfoAdd.add(arrivalDateAjaxAdd); repairManInfoAdd.add(returnDateAjaxAdd); repairManInfoAdd.add(travelFeeAjaxAdd); repairManInfoAdd.add(laborCostsAjaxAdd); repairManInfoAdd.add(repairConditionAjaxAdd); repairManInfoAdd.add(remarkAjaxAdd); rhb.returnEnd(searchForm, repairManInfo, repairManInfoAdd); request.setAttribute("tag", "1"); request.setAttribute("businessFlag", "repairReturnEnd"); return forward; }
/** * 电诊--不修理 * * @param request * @param form * @return * @throws Exception */ public String doNotRepair(HttpServletRequest request, ActionForm form) throws Exception { RepairSearchForm searchForm = (RepairSearchForm) form; RepairHandleBo rhb = RepairHandleBo.getInstance(); Long userId = (Long) request.getSession().getAttribute("userId"); searchForm.setCurrentStatus("N"); searchForm.setUpdateBy(userId); searchForm.setUpdateDate(new Date()); rhb.repairOperate(searchForm); String tempAttache = request.getParameter("attacheIds"); if (tempAttache != null && !tempAttache.equals("")) { rhb.updateAttacheByAttacheIdsAndSheetNo( tempAttache.split(","), searchForm.getRepairNo(), userId); } request.setAttribute("tag", "1"); request.setAttribute("businessFlag", "doNotRepair"); return "resultMessage"; }