/** * 响应页面提交 * * @param actionMapping ActionMapping 这个 Action 的配置信息 * @param actionForm ActionForm 用户提交的表单数据 * @param request HttpServletRequest 当前的 HTTP 请求对象 * @param response HttpServletResponse 当前的 HTTP 响应对象 * @return ActionForward 请求转发路径 * @throws Exception */ public ActionForward execute( ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ProjectPriceQueryForm aWebForm = (ProjectPriceQueryForm) actionForm; // 查询目前该总工程资金拨付列表,供“资金拨付列表”table页调用 Deal.doProjectPriceQuery(aWebForm.getProjectID(), request, response); // 查询目前该总工程下面的子项目列表,供“子项目列表”table页调用 Deal.doTotalSubProjectQuery(aWebForm.getProjectID(), request, response); // 查询目前该总工程的所有合同,供“合同”table页调用 Deal.doProjectContractQuery(aWebForm.getProjectID(), request, response); Deal.doSubProjectContractQuery(aWebForm.getProjectID(), request, response); // 查询建设工程审批历史记录,供审批历史记录table页使用.相应要传入ProjectID,SubProjectID,后面3个参数默认 java.util.ArrayList TYwJsgcHistoryList = BaseInfoView.doHistoryQuery(aWebForm.getProjectID(), 0, request, response); request.setAttribute("TYwJsgcHistoryList", TYwJsgcHistoryList); // 查询建设工程法律法规,供法律法规table页使用 java.util.ArrayList TYwJsgcLawList = BaseInfoView.doLawQuery(6, request, response); request.setAttribute("TYwJsgcLawList", TYwJsgcLawList); // 查询附件列表,根据projectid 查询处于工程款管理状态的 // 临时去掉 UploadForm aUploadForm = new UploadForm(); aUploadForm.setType("建设工程"); // aUploadForm.setBid(Long.parseLong(aWebForm.getProjectID())); aUploadForm.setBid4(aWebForm.getProjectID()); aUploadForm.setBid1("工程款"); aUploadForm.setBid2("工程款管理"); com.tjsoft.system.upload.CDeal.setUploadDefault(aUploadForm, request, response); aWebForm.setUploadedFile(aUploadForm.getUploadedFile()); return actionMapping.getInputForward(); }
/** * 查看处理 * * @param actionForm ActionForm 表单From * @param request HttpServletRequest Web请求 * @param response HttpServletResponse Web结果 * @throws CDealException 处理异常 */ public static void doYuDelView( EditForm pEditForm, HttpServletRequest request, HttpServletResponse response) throws CDealException { String deptID = request.getParameter("ZHJCDEPARTMENTID"); Connection mConn = null; PreparedStatement mPstmt = null; try { pEditForm.setBaseInfoObj(CommonDeal.getBaseInfoObj(pEditForm.getBusinessID())); if (deptID != null && !deptID.equals("")) { pEditForm.setFlowInfoObj( CommonDeal.getFlowInfoObj(pEditForm.getBaseInfoObj().getItemid(), deptID)); } else { pEditForm.setFlowInfoObj(CommonDeal.getFlowInfoObj(pEditForm.getBaseInfoObj().getItemid())); } // 取时限监察信息 mConn = CDBManager.getConn(); String mSql = "select a.SUBBUSIINDEXID,a.BUSIINDEXID,to_char(a.BEGINDATE,'" + CommonDeal.DATAFORMAT + "')," + "to_char(a.ENDDATE,'" + CommonDeal.DATAFORMAT + "'),a.LIMITTYPE,to_char(a.LAWENDDATE,'" + CommonDeal.DATAFORMAT + "'),a.LEAVINGSDAY,a.LIMITUNIT,a.RINGSTATS,a.RINGDATE,a.YELLOWSTATUS," + "a.YELLOWDATE,a.REDSTATUS,a.REDDATE,a.CURSTATUSTYPE,a.SPECIALDAY,b.begindatedesc,b.enddatedesc,b.describe," + "a.DEPARTID,c.ABBRNAME from T_JC_ZDSX_DCK_BUSINDEXLIMIT a,T_JC_ZDSX_DCK_PARAMETERLIMIT b,T_SYS_DEPARTMENT c " + "where a.limittype=b.limittype and a.PARAMETERSVERSION=b.PARAMETERSVERSION and a.DEPARTID=c.id and a.SPARE1='1' and a.BUSIINDEXID=? "; if (deptID != null && !deptID.equals("")) { mSql += " and a.DEPARTID = '" + deptID + "' "; } mSql += " order by a.departid"; mPstmt = mConn.prepareStatement(mSql); mPstmt.setString(1, pEditForm.getBusinessID()); ResultSet mRs = mPstmt.executeQuery(); ArrayList mTimeLimitObjList = new ArrayList(); while (mRs.next()) { TimeLimitObj aTimeLimitObj = new TimeLimitObj(); aTimeLimitObj.setSUBBUSIINDEXID(mRs.getString(1)); aTimeLimitObj.setBUSIINDEXID(mRs.getString(2)); aTimeLimitObj.setBEGINDATE(mRs.getString(3)); aTimeLimitObj.setENDDATE(mRs.getString(4)); aTimeLimitObj.setLIMITTYPE(mRs.getString(5)); aTimeLimitObj.setLAWENDDATE(mRs.getString(6)); aTimeLimitObj.setLEAVINGSDAY(mRs.getString(7)); aTimeLimitObj.setLIMITUNIT(mRs.getString(8)); aTimeLimitObj.setRINGSTATS(mRs.getString(9)); aTimeLimitObj.setRINGDATE(mRs.getString(10)); aTimeLimitObj.setYELLOWSTATUS(mRs.getString(11)); aTimeLimitObj.setYELLOWDATE(mRs.getString(12)); aTimeLimitObj.setREDSTATUS(mRs.getString(13)); aTimeLimitObj.setREDDATE(mRs.getString(14)); aTimeLimitObj.setCURSTATUSTYPE(mRs.getString(15)); aTimeLimitObj.setSPECIALDAY(mRs.getString(16)); aTimeLimitObj.setBEGINDATEDESC(mRs.getString(17)); aTimeLimitObj.setENDDATEDESC(mRs.getString(18)); aTimeLimitObj.setLIMITTYPEDESC(mRs.getString(19)); aTimeLimitObj.setDEPARTID(mRs.getString(20)); aTimeLimitObj.setABBRNAME(mRs.getString(21)); if (aTimeLimitObj.getLEAVINGSDAY().indexOf("-") > -1) { aTimeLimitObj.setLEAVINGSDAY( "<font color=red><b>" + aTimeLimitObj.getLEAVINGSDAY() + "</b></font>"); } TreeMap TempTm = CCodeMap.getMapByType("政府采购监察当前预警黄牌红牌状态PIC"); aTimeLimitObj.setCURSTATUSTYPE((String) TempTm.get(aTimeLimitObj.getCURSTATUSTYPE())); TempTm = CCodeMap.getMapByType("应急预案监察时限单位"); aTimeLimitObj.setLIMITUNIT((String) TempTm.get(aTimeLimitObj.getLIMITUNIT())); mTimeLimitObjList.add(aTimeLimitObj); } pEditForm.getSuperviseObj().setTimeLimitObjList(mTimeLimitObjList); // 定期反馈信息 Iterator taskIterator = pEditForm.getFlowInfoObj().getTTaskBreakDckList().iterator(); ArrayList mTermLimitObjList = new ArrayList(); while (taskIterator.hasNext()) { TTaskBreakDck taskBreak = (TTaskBreakDck) taskIterator.next(); int termlyFlag = taskBreak.getTERMLY(); String taskID = taskBreak.getTASKBREAKID(); CLog.println("termlyFlag:::" + termlyFlag); CLog.println("taskID:::" + taskID); if (termlyFlag == 1) { // 查询本月 mSql = "select main.LIMITFOREWARN,main.LIMITYELLOW,main.LIMITRED,main.TASKBREAKID,main.TRANSACTDEPARTMENT,dept.abbrname,main.TERMLYTYPE," + "sub.CURSTATUSTYPE,sub.termlytype,sub.TERMLYMONTH,sub.DEPARTID,sub.BUSIINDEXID,to_char(sub.ENDDATE,'yyyy-mm-dd') ENDDATE," + "to_char(sub.LAWENDDATE,'yyyy-mm-dd') LAWENDDATE,sub.LEAVINGSDAY,decode(sub.LIMITUNIT,0,'工作日',1,'自然日',2,'表示小时',3,'表示分钟') LIMITUNIT," + "sub.STATUS,sub.nianfen,sub.yuefen,sub.jidu " + "from t_jc_zdsx_dck_termly_busindex main,t_jc_zdsx_dck_ty_busindexlimit sub,t_sys_department dept " + " where main.itemid =? and main.TASKBREAKID = ? and main.TRANSACTDEPARTMENT = dept.id "; if (deptID != null && !deptID.equals("")) { mSql += " and dept.id = '" + deptID + "' "; } String temp = " and sub.busiindexid = main.busiindexid(+) and sub.nianfen || '-' || sub.yuefen = to_char(trunc(sysdate, 'mm'),'yyyy-mm') "; CLog.println("query statement:" + mSql + temp); mPstmt = mConn.prepareStatement(mSql + temp); mPstmt.setString(1, pEditForm.getBaseInfoObj().getItemid()); mPstmt.setString(2, taskID); mRs = mPstmt.executeQuery(); while (mRs.next()) { TermlyLimitObj aTermlyLimitObj = new TermlyLimitObj(); aTermlyLimitObj.setTranId(mRs.getString("TASKBREAKID")); aTermlyLimitObj.setCURSTATUSTYPE(mRs.getString("CURSTATUSTYPE")); aTermlyLimitObj.setDEPARTID(mRs.getString("TRANSACTDEPARTMENT")); aTermlyLimitObj.setLIMITTYPE(mRs.getString("TERMLYTYPE")); aTermlyLimitObj.setABBRNAME(mRs.getString("abbrname")); aTermlyLimitObj.setENDDATE(mRs.getString("ENDDATE")); aTermlyLimitObj.setLAWENDDATE(mRs.getString("LAWENDDATE")); mTermLimitObjList.add(aTermlyLimitObj); } // 查询上月 temp = " and sub.busiindexid = main.busiindexid(+) and sub.nianfen || '-' || sub.yuefen = to_char(trunc(trunc(sysdate,'mm')-1, 'mm'),'yyyy-mm') "; mPstmt = mConn.prepareStatement(mSql + temp); mPstmt.setString(1, pEditForm.getBaseInfoObj().getItemid()); mPstmt.setString(2, taskID); mRs = mPstmt.executeQuery(); while (mRs.next()) { String tid = mRs.getString("TASKBREAKID").trim(); String type = mRs.getString("CURSTATUSTYPE"); String lawdate = mRs.getString("LAWENDDATE"); String enddate = mRs.getString("ENDDATE"); Iterator it = mTermLimitObjList.iterator(); while (it.hasNext()) { TermlyLimitObj aTermlyLimitObj = (TermlyLimitObj) it.next(); if (tid.equals(aTermlyLimitObj.getTranId())) { aTermlyLimitObj.setPreviousStatusType(type); aTermlyLimitObj.setPreviousLAWENDDATE(lawdate); aTermlyLimitObj.setPreviousENDDATE(enddate); } } } } else if (termlyFlag == 2) { // 查询本季度 mSql = "select main.LIMITFOREWARN,main.LIMITYELLOW,main.LIMITRED,main.TASKBREAKID,main.TRANSACTDEPARTMENT,dept.abbrname,main.TERMLYTYPE," + "sub.CURSTATUSTYPE,sub.termlytype,sub.TERMLYMONTH,sub.DEPARTID,sub.BUSIINDEXID,to_char(sub.ENDDATE,'yyyy-mm-dd') ENDDATE," + "to_char(sub.LAWENDDATE,'yyyy-mm-dd') LAWENDDATE,sub.LEAVINGSDAY,decode(sub.LIMITUNIT,0,'工作日',1,'自然日',2,'表示小时',3,'表示分钟') LIMITUNIT," + "sub.STATUS,sub.nianfen,sub.yuefen,sub.jidu " + "from t_jc_zdsx_dck_termly_busindex main,t_jc_zdsx_dck_ty_busindexlimit sub,t_sys_department dept " + " where main.itemid =? and main.TASKBREAKID = ? and main.TRANSACTDEPARTMENT = dept.id "; if (deptID != null && !deptID.equals("")) { mSql += " and dept.id = '" + deptID + "' "; } String temp = " and sub.busiindexid = main.busiindexid(+) and sub.jidu = decode(to_char(trunc(sysdate,'mm'),'mm'),01,1,02,1,03,1,04,2,05,2,06,2,07,3,08,3,09,3,10,4,11,4,12,4) " + " and sub.nianfen = to_char(trunc(sysdate,'mm'),'yyyy') "; CLog.println("query statement:" + mSql + temp); mPstmt = mConn.prepareStatement(mSql + temp); mPstmt.setString(1, pEditForm.getBaseInfoObj().getItemid()); mPstmt.setString(2, taskID); mRs = mPstmt.executeQuery(); while (mRs.next()) { TermlyLimitObj aTermlyLimitObj = new TermlyLimitObj(); aTermlyLimitObj.setTranId(mRs.getString("TASKBREAKID")); aTermlyLimitObj.setCURSTATUSTYPE(mRs.getString("CURSTATUSTYPE")); aTermlyLimitObj.setDEPARTID(mRs.getString("TRANSACTDEPARTMENT")); aTermlyLimitObj.setLIMITTYPE(mRs.getString("TERMLYTYPE")); aTermlyLimitObj.setABBRNAME(mRs.getString("abbrname")); aTermlyLimitObj.setENDDATE(mRs.getString("ENDDATE")); aTermlyLimitObj.setLAWENDDATE(mRs.getString("LAWENDDATE")); mTermLimitObjList.add(aTermlyLimitObj); } // 查询上季度 temp = " and sub.busiindexid = main.busiindexid(+) and sub.jidu = decode(to_char(trunc(sysdate,'mm'),'mm'),04,1,05,1,06,1,07,2,08,2,09,2,10,3,11,3,12,3) " + " and sub.nianfen = to_char(trunc(sysdate,'mm'),'yyyy') "; mPstmt = mConn.prepareStatement(mSql + temp); mPstmt.setString(1, pEditForm.getBaseInfoObj().getItemid()); mPstmt.setString(2, taskID); mRs = mPstmt.executeQuery(); while (mRs.next()) { String tid = mRs.getString("TASKBREAKID").trim(); String type = mRs.getString("CURSTATUSTYPE"); String lawdate = mRs.getString("LAWENDDATE"); String enddate = mRs.getString("ENDDATE"); Iterator it = mTermLimitObjList.iterator(); while (it.hasNext()) { TermlyLimitObj aTermlyLimitObj = (TermlyLimitObj) it.next(); if (tid.equals(aTermlyLimitObj.getTranId())) { aTermlyLimitObj.setPreviousStatusType(type); aTermlyLimitObj.setPreviousLAWENDDATE(lawdate); aTermlyLimitObj.setPreviousENDDATE(enddate); } } } } } pEditForm.getSuperviseObj().setTermlyLimitObjList(mTermLimitObjList); UploadForm aUploadForm = new UploadForm(); aUploadForm.setType("重大事项督查科"); aUploadForm.setBid(Long.parseLong(pEditForm.getBaseInfoObj().getItemid())); com.tjsoft.system.upload.CDeal.setUploadDefault(aUploadForm, request, response); pEditForm.setUploadedFile(aUploadForm.getUploadedFile()); UploadForm aMyUploadForm = new UploadForm(); aMyUploadForm.setType("重大事项督查科承办部门"); aMyUploadForm.setBid(Long.parseLong(pEditForm.getBaseInfoObj().getItemid())); if (deptID != null) { aMyUploadForm.setBid1(deptID); } com.tjsoft.system.upload.CDeal.setUploadDefault(aMyUploadForm, request, response); pEditForm.setMyUploadedFile(aMyUploadForm.getUploadedFile()); } catch (Exception e) { throw new CDealException("进入详细信息查看时失败。", e); } finally { if (mPstmt != null) { try { mPstmt.close(); } catch (Exception e) { } } if (mConn != null) { try { mConn.close(); } catch (Exception e) { } } } }
/** * 设置进入查看详细信息页面的初始值 setEditDefault * * @param aWebForm EditForm * @param request HttpServletRequest * @param response HttpServletResponse */ public static void setEditDefault( EditForm pWebForm, HttpServletRequest request, HttpServletResponse response) throws CDealException { try { // 初始化页面,初始化投诉形式下拉菜单 int type = 0; Connection mConn = null; PreparedStatement pstmt = null; try { mConn = CDBManager.getConn(); // 创建数据库连接 // 设置进入修改页面的初始值SQL String mSQL = "select A.CHENGPIID,A.COMPLAINEDPERSON,A.COMPLAINPERSON, A.COMPLAINEDUNIT, A.COMPLAINUNIT, A.COMPLAINEDDUTY, A.COMPLAINDUTY, A.QUESTIONKIND, A.COMPLAINVERSION, " + " A.CONTENTABSTRACT, A.SUGGESTION, A.SIGN1, to_char(A.DATE1, 'yyyy-mm-dd') DATE1,A.LEADERCONFIRM, A.SIGN2, to_char(A.DATE2, 'yyyy-mm-dd') DATE2, A.REMARK, A.BUSINESSID, " + " decode(A.BUSINESSTYPE,'1','建设工程','2','行政许可','3','政府采购','4','重大事项','5','行政执法','6','财政预算','7','信访','8','应急预案') BUSINESSTYPE," + " t.abbrname,A.COMPLAINEDGRADE,A.XZGCXYFL,A.SUBXZGCXYFL,A.XZGLFL,A.XZGCBXXS from T_YW_ZDSX_JCJ_TSCHENGPIBIAO A,t_Sys_Department t where A.COMPLAINEDUNIT = t.id and A.CHENGPIID = ?"; pstmt = mConn.prepareStatement(mSQL); pstmt.setString(1, pWebForm.getCHENGPIID()); // 主键 ResultSet rs = pstmt.executeQuery(); if (rs.next()) { pWebForm.getTTsChengpibiao().setCHENGPIID(rs.getString(1)); // 呈批表编号 pWebForm.getTTsChengpibiao().setCOMPLAINEDPERSON(rs.getString(2)); // 呈批表被投诉人姓名 pWebForm.getTTsChengpibiao().setCOMPLAINPERSON(rs.getString(3)); // 呈批表投诉人姓名 pWebForm.getTTsChengpibiao().setCOMPLAINEDUNIT(rs.getString(4)); // 呈批表被投诉人单位 pWebForm.getTTsChengpibiao().setCOMPLAINUNIT(rs.getString(5)); // 呈批表投诉人单位 pWebForm.getTTsChengpibiao().setCOMPLAINEDDUTY(rs.getString(6)); // 呈批表被投诉人职务 pWebForm.getTTsChengpibiao().setCOMPLAINDUTY(rs.getString(7)); // 呈批表投诉人职务 pWebForm.getTTsChengpibiao().setQUESTIONKIND(rs.getString(8)); // 呈批表问题性质 pWebForm.getTTsChengpibiao().setCOMPLAINVERSION(rs.getInt(9)); // 呈批表投诉形式 type = rs.getInt(9); pWebForm.getTTsChengpibiao().setCONTENTABSTRACT(rs.getString(10)); // 呈批表内容摘要 pWebForm.getTTsChengpibiao().setSUGGESTION(rs.getString(11)); // 呈批表拟办意见 pWebForm.getTTsChengpibiao().setSIGN1(rs.getString(12)); // 呈批表拟办人签字 pWebForm.getTTsChengpibiao().setDATE1_STR(rs.getString(13)); // 呈批表拟办人签字日期 pWebForm.getTTsChengpibiao().setLEADERCONFIRM(rs.getString(14)); // 呈批表局领导批示 pWebForm.getTTsChengpibiao().setSIGN2(rs.getString(15)); // 呈批表局领导签字 pWebForm.getTTsChengpibiao().setDATE2_STR(rs.getString(16)); // 呈批表局领导签字日期 pWebForm.getTTsChengpibiao().setREMARK(rs.getString(17)); // 呈批表备注 pWebForm.getTTsChengpibiao().setBUSINESSID(rs.getString(18)); pWebForm.setTypename(rs.getString(19)); pWebForm.setDepartmentname(rs.getString(20)); pWebForm.getTTsChengpibiao().setCOMPLAINEDGRADE(rs.getInt(21)); pWebForm.getTTsChengpibiao().setXZGCXYFL(rs.getInt(22)); pWebForm.getTTsChengpibiao().setSUBXZGCXYFL(rs.getInt(23)); pWebForm.getTTsChengpibiao().setXZGLFL(rs.getInt(24)); pWebForm.getTTsChengpibiao().setXZGCBXXS(rs.getInt(25)); } else { throw new CDealException( "使用编号 " + pWebForm.getCHENGPIID() + "未能找到数据。", new Exception("查询数据失败。")); } TreeMap COMPLAINVERSIONList = new TreeMap(); CCodeMap aCodeMap = new CCodeMap(); COMPLAINVERSIONList = aCodeMap.getMapByType("行政效能投诉形式"); String busitypename = (String) COMPLAINVERSIONList.get("" + type); pWebForm.setTsxingshu(busitypename); // 处理附件 UploadForm aUploadForm = new UploadForm(); aUploadForm.setType("行政效能"); aUploadForm.setBid2("办理呈批表"); aUploadForm.setBid(Long.parseLong(pWebForm.getTTsChengpibiao().getCHENGPIID())); com.tjsoft.system.upload.CDeal.setUploadDefault(aUploadForm, request, response); pWebForm.setUploadedFile(aUploadForm.getUploadedFile()); } catch (Exception e) { throw e; } finally { if (pstmt != null) try { pstmt.close(); } catch (Exception e) { } ; if (mConn != null) try { mConn.close(); } catch (Exception e) { } ; } } catch (Exception e) { throw new CDealException("进入修改" + mModuleName + "时失败。", e); } }