登录 login.jsp
接下来在每个人的登录页面会展示待办事项,法律审核,目前在做的是审核类得流程图的修改,法人授权的流程还没有修改,这都是委托的流程的内容
红色标示的是代码
首先我们在web.xml文件中可以看到欢迎页面为login.jsp
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>500</error-code>
<location>/Services/500.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/Services/404.jsp</location>
</error-page>
login.jsp:
<form name="loginForm" id="loginForm" action="default/loginAction" method="post">
登陆后跳转到loginAction
struts.xml中的action的注册
<!-- 管理员登陆-->
<action name="loginAction" class="loginAction" method="login">
<result name="success">/frame/frame.html</result>
<result name="fail">/login.jsp</result>
</action>
<action name="loginAction1" class="loginAction" method="flswiqManage1">
<result name="success">/frame/fxlz.jsp</result>
<result name="fail">/frame/fxlz.jsp</result>
</action>
<!--通过单点登录系统登陆-->
<action name="loginSingleSystemAction" class="loginSingleSystemAction" method="loginSingleSystem">
<result name="success">/frame/frame.html</result>
<result name="fail">/login.jsp</result>
</action>
成功登陆后会跳转到frame.html:
<frame src="/LawEvent/frame/Top.jsp" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="中南电力设计院"/>
<frame src="/LawEvent/frame/middel.jsp" name="centerFrame" scrolling="no" noresize="noresize" id="centerFrame" title="中南电力设计院"/>
<!--
<frame src="/LawEvent/frame/fxlz.jsp" name="fxlz" scrolling="no" noresize="noresize" id="fxlz" title="中南电力设计院"/>
-->
<frame src="/LawEvent/frame/bottom.html" name="bottomFrame" scrolling="no" noresize="noresize" id="bottomFrame" title="版权"/>
这里面使用了三个布局文件,特别要注意middle.jsp,菜单换成三级菜单后,middle.jsp有所改动
注意新的middle.jsp中对mainframe的定义:
<td align="center" valign="top"><iframe name="mainFrame" height="100%" width="100%" src="fxlz.jsp" frameborder="0" id="mainFrame"> 浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架</iframe></td>
之前用的是fxlz.html,会导致待办事项的界面无法显示出来
HTML <img> 标签的 alt 属性
实例
<img src="/i/eg_tulip.jpg" alt="上海鲜花港 - 郁金香"
/>
如果无法显示图像,浏览器将显示替代文本,就像这样:
此外,当用户把鼠标移到图像上方,最新的浏览器会在一个文本框中显示描述性文本。下面的代码在 alt 属性中为图像添加了描述性文本:
您可以把鼠标移动到下面的照片上,看看相应的效果:
接下来从新增委托开始看
新增委托的页面为/LawEventInput/LawEventInput.jsp:
<form id="flswInputForm" name="flswInputForm" action="lawEventInput/FlswAddUpdateAction" method="post" enctype="multipart/form-data" onsubmit="return doValidate('flswInputForm')">
将相关的信息提交之后会根据form跳转到相应的FlswAddUpdateAction:
<!-- ”保存并进入下一页“ -->
<action name="FlswUpdateAction" class="FlswAddUpdateAction" method="flswSecondUpdate">
<result name="success">/lawAuthorized/AuthorizedSubmit.jsp</result>
<result name="fail">/lawAuthorized/AuthorizedInput.jsp</result>
</action>
AuthorizedSubmit.jsp:
<form id="InputSubmitForm" name="InputSubmitForm" action="lawAuthorized/FrsqSubmitAction?ACT=1" method="post" enctype="multipart/form-data" >
<action name="FrsqSubmitAction" class="FlswSubmitAction" method="flswFrsqSubmit">
<result name="success" type="redirect">lawAuthorized/DepartmentCheck3Action</result>
<result name="fail" >lawAuthorized/frsqInputedView.jsp</result>
</action>
<action name="DepartmentCheck3Action" class="BeDepartmentCheckAction" method="CheckFrsq4Manage">
<result name="success">/lawAuthorized/DepartmentCheck.jsp</result>
<result name="fail">/lawAuthorized/DepartmentCheck.jsp</result>
</action>
DepartmentCheck.jsp:
新增委托提交给相关的领导后,再由领导进行审批,审批页面为:
<action name="BeDepartmentCheckAction" class="BeDepartmentCheckAction" method="beCheckFlswManage">
<result name="success">/LawEventFlow/BeDepartmentCheck.jsp</result>
<result name="fail">/LawEventFlow/BeDepartmentCheck.jsp</result>
</action>
点击审批按钮后:
<a href="flswFlow/DepartmentCheckAction?backFlag=BeDepartmentCheckAction&lawFlswId=<s:property value='lawFlswId'/>">审批</a>
链接:
<action name="DepartmentCheckAction" class="StaffExecuteAction" method="staffExecute">
<result name="success">/LawEventFlow/DepartmentCheck.jsp</result>
<result name="fail">/LawEventFlow/BeDepartmentCheck.jsp</result>
</action>
批准委托单:
<form id="departmentCheckForm" name="departmentCheckForm" action="riskFlow/DepPassAction?id=<s:property value="riskId&update_flag=update"/>" method="post" enctype="multipart/form-data">
<!-- "流转到下一级"——部门审核页面-->
<action name="DepPassAction" class="DepPassAction" method="departmentPass">
<result name="success">/LawEventFlow/FlowConfirm.jsp</result>
</action>
若上级部门领导批准通过,则流转给员工本人:
<s:elseif test='lawFlswNode=="040"'><a href="javascript:submit11('<s:property value="lawFlswId"/>')">提交</a> </s:elseif>
提交后跳转到相应的页面:
<!-- "提交"——员工待提交委托单-->
<action name="StaffSubmitAction" class="StaffSubmitAction" method="staffSubmit">
<result name="success">/LawEventFlow/FlowConfirm.jsp</result>
</action>
点击流转,提交给法律事务科进行审核:
<form id="FlowConfirm" name="FlowConfirm" method="post" action="flswFlow/FlswFlowtoAction" enctype="multipart/form-data">
流转页面比较多,这里有一个下拉菜单选择流向到哪里:
<!-- “流转”——确认页面 -->
<action name="FlswFlowtoAction" class="FlswFlowtoAction" method="flowtoNext">
<!-- <result name="success">/LawEventFlow/BeDepartmentCheck.jsp?operation=flowto*result=success</result>-->
<!-- <result name="staffSubmit">/LawEventFlow/BeStaffSubmit.jsp?operation=staffSubmit*result=success</result>-->
<!-- <result name="lawDepSubmit">/LawEventFlow/BeLawDepCheck.jsp?operation=lawDepSubmit*result=success</result>-->
<!-- <action name="updateCampaign" class="campaignAction" method="updateCampaign"> -->
<!-- <result name="success" type="redirectAction">viewCampaignDetail?campaignId=${campaignId}</result> -->
<!-- </action> -->
<!-- <result name="BeCollegeStaffNotPassAction" type="redirectAction">flswFlow/BeCollegeStaffNotPassAction?NODE=${100}</result>-->
<result name="BeDepartmentCheckAction" type="redirectAction">flswFlow/BeDepartmentCheckAction?NODE=${030}</result>
<result name="BeDepStaffNotPassAction" type="redirectAction">flswFlow/BeDepStaffNotPassAction?NODE=${080}</result>
<result name="BeLawDepCheckAction" type="redirectAction">flswFlow/BeLawDepCheckAction?NODE=${060}</result>
<result name="BeStaffExecuteAction" type="redirectAction">flswFlow/BeStaffExecuteAction?NODE=${070}</result>
<result name="BeStaffMustExecuteAction" type="redirectAction">flswFlow/BeStaffMustExecuteAction?NODE=${090}</result>
<!-- <result name="BeStaffNotExecuteAction" type="redirectAction">flswFlow/BeStaffNotExecuteAction?NODE=${130}</result>-->
<result name="BeStaffSubmitAction" type="redirectAction">flswFlow/BeStaffSubmitAction?NODE=${040}</result>
<!-- <result name="BeStaffReplyedAction" type="redirectAction">flswFlow/BeStaffReplyedAction?NODE=${125}</result>-->
<result name="BeFgfyNotPassAction" type="redirectAction">flswFlow/BeFgfyNotPassAction?NODE=${100}</result>
<result name="BeYZNotPassAction" type="redirectAction">flswFlow/BeYZNotPassAction?NODE=${105}</result>
</action>
登陆到相应的审核人的页面,首先会显示fxlz.jsp的内容,此时我们就可以看到我们刚才所流转过来的委托
点击审核:<s:elseif test='lawFlswNode=="280"'><a href="lawAuthorized/YZDepartmentCheckAction?backFlag=BeLawDepCheckSecondAction&lawFlswId=<s:property value='lawFlswId'/>">审核</a></s:elseif>
跳转到相应的页面:
<a href="flswFlow/LawDepCheckAction?backFlag=BeLawDepCheckAction&lawFlswId=<s:property value='lawFlswId'/>">审核</a>
<!-- "审核"——进入法律事务部审核页面-->
<action name="LawDepCheckAction" class="LawDepCheckAction" method="lawDepCheck">
<result name="success">/LawEventFlow/LawDepCheck.jsp</result>
<result name="second">/LawEventFlow/LawDepCheckSecond.jsp</result>
</action>
继续流转
LawDepPassAction:
<!-- "流转到下一级"——法律事务部审核页面-->
<action name="LawDepPassAction" class="LawDepPassAction" method="lawDepPass">
<result name="success">/LawEventFlow/FlowConfirm.jsp</result>
</action>
FlowConfirm.jsp:
流转:
<!-- “流转”——确认页面 -->
<action name="FlswFlowtoAction" class="FlswFlowtoAction" method="flowtoNext">
<!-- <result name="success">/LawEventFlow/BeDepartmentCheck.jsp?operation=flowto*result=success</result>-->
<!-- <result name="staffSubmit">/LawEventFlow/BeStaffSubmit.jsp?operation=staffSubmit*result=success</result>-->
<!-- <result name="lawDepSubmit">/LawEventFlow/BeLawDepCheck.jsp?operation=lawDepSubmit*result=success</result>-->
<!-- <action name="updateCampaign" class="campaignAction" method="updateCampaign"> -->
<!-- <result name="success" type="redirectAction">viewCampaignDetail?campaignId=${campaignId}</result> -->
<!-- </action> -->
<!-- <result name="BeCollegeStaffNotPassAction" type="redirectAction">flswFlow/BeCollegeStaffNotPassAction?NODE=${100}</result>-->
<result name="BeDepartmentCheckAction" type="redirectAction">flswFlow/BeDepartmentCheckAction?NODE=${030}</result>
<result name="BeDepStaffNotPassAction" type="redirectAction">flswFlow/BeDepStaffNotPassAction?NODE=${080}</result>
<result name="BeLawDepCheckAction" type="redirectAction">flswFlow/BeLawDepCheckAction?NODE=${060}</result>
<result name="BeStaffExecuteAction" type="redirectAction">flswFlow/BeStaffExecuteAction?NODE=${070}</result>
<result name="BeStaffMustExecuteAction" type="redirectAction">flswFlow/BeStaffMustExecuteAction?NODE=${090}</result>
<!-- <result name="BeStaffNotExecuteAction" type="redirectAction">flswFlow/BeStaffNotExecuteAction?NODE=${130}</result>-->
<result name="BeStaffSubmitAction" type="redirectAction">flswFlow/BeStaffSubmitAction?NODE=${040}</result>
<!-- <result name="BeStaffReplyedAction" type="redirectAction">flswFlow/BeStaffReplyedAction?NODE=${125}</result>-->
<result name="BeFgfyNotPassAction" type="redirectAction">flswFlow/BeFgfyNotPassAction?NODE=${100}</result>
<result name="BeYZNotPassAction" type="redirectAction">flswFlow/BeYZNotPassAction?NODE=${105}</result>
</action>
审核通过,交给员工本人执行:
<s:else><a href="flswFlow/StaffExecuteAction?backFlag=BeStaffExecuteAction&lawOpinionType=2&lawFlswId=<s:property value='lawFlswId'/>">执行</a> </s:else></s:elseif>
<!-- "执行"——进入提交页面(所有信息)+情况说明-->
<action name="StaffExecuteAction" class="StaffExecuteAction" method="staffExecute">
<result name="success">/LawEventFlow/StaffExecute.jsp</result>
</action>
StaffExecute.jsp:
继续流转:
<input type="button" name="btn_pass4" value="流转" class="button" onclick="passNext()"/>
//流转
function passNext()
{
getFileYN();
if(test==1){
staffExecuteForm.action='flswFlow/StaffExecutePassNextAction';
staffExecuteForm.submit();
}
}
<action name="StaffExecutePassNextAction" class="StaffExecutePassNextAction" method="staffExecutePassNext">
<!-- <result name="pass" type="redirectAction">flswFlow/StaffExecutePassAction?ACT=${1}</result>-->
<!-- <result name="notPass" type="redirectAction">flswFlow/StaffExecuteNotPassAction?ACT=${2}</result>-->
<result name="allpass" type="redirectAction">flswFlow/BeStaffExecuteAction?NODE=${070}</result>
<result name="success">/LawEventFlow/FlowConfirm.jsp</result>
</action>
执行的是第一个重定向的:跳回到BeStaffExecuteAction,所有的流程已经走完,可以再本人已完结的委托上看到:
邓虎修改的部分,查看相应的节点流转的信息,在
public String flowtoNext() {
try{
System.out.print("flowtoNext:");
System.out.println(this.getLawFlswBigEvent());
//得到flsw
flsw=this.getFlswDao().findById(this.getLawFlswId());
flsw.setLawFlswRemark3("");//将flsw可能暂时存储的数据清空,以暂存下一次“审核意见”的暂存数据
if(this.getLawFlswBigEvent()!=null&&!(this.getLawFlswBigEvent().isEmpty())){
flsw.setLawFlswBigEvent(this.getLawFlswBigEvent());
}//存入三重一大
//对FlowRecord表中的Last字段进行清除
clearLast(flsw);
//对Flsw流转到人,下一个节点,处理这个flsw的用户Id
flsw.setLawFlswRemark2(this.getFlowtoperson());
//待办人=流转到人,作为外键存储
users=this.getUsersDao().findById(this.getFlowtoperson());
if(null != users)
{
flsw.setBeUser(users);
}
//当backFlag=BeLawDepCheckAction时,此时为法律事务科审核,保存回复时间
if(this.getBackFlag().equals("BeLawDepCheckAction"))
{
//得到法律事务科审批时间
Date date = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
flsw.setLawFlswLawDepCheckTime(df.format(date).toString());//法律事务科审批时间,即当前系统时间
//得到法律事务科审批人
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
Users us = (Users)session.getAttribute("loginUser");
flsw.setLawDepLeader(us);
}
//通过fnId找到fn
flowNode=this.getFlowNodeDao().findById(this.getLawFnId());
flowRecord.setFlsw(flsw);
flowRecord.setFlowNode(flowNode);
if(null!=this.getLawOpinionRemark2()&&this.getLawOpinionRemark2().equals("不同意")){
this.setACT("2");
}
//System.out.print("GGGGGGGGGGGGGGGGGGG"+this.getLawFnId()+"___"+ACT);
flowRecord.setLawFrAct(ACT);
flowRecord.setLawLastYn("1");
//判断前一页是否有输入框
if(!this.getBoxYN().equals("not")){
flowRecord.setLawOpinionBoxYn("1");
//得到审批意见
flowRecord.setLawFrOpinion(this.getFeedback());
//得到审批人
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
Users us = (Users)session.getAttribute("loginUser");
flowRecord.setLawFrLeader(us.getUserId());
//得到审批时间
Date date = new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
flowRecord.setLawFrDate(df.format(date).toString());//审批时间,即当前系统时间
}else{
flowRecord.setLawOpinionBoxYn("0");
flowRecord.setLawFrOpinion("");
flowRecord.setLawFrDate("");
}
this.getFlowRecordDao().save(flowRecord);
//对Flsw的Node、PreNode进行修改
flsw.setLawFlswPreNode(flowNode.getLawFnNode());
flsw.setLawFlswNode(flowNode.getLawFnNexNode());
System.out.println("流向的节点:"+flsw.getLawFlswNode());
//System.out.println(flowNode.getLawFnNode()+"Q流转到发起人的节点"+flowNode.getLawFnNexNode());
//FlowRecord表中同一个委托单的FlowRecord,将最后一个fr的Id保存在flsw中
//以方便下一次对FlowRecord表中的Last字段进行清除
flsw.setLawFlswRemark1(flowRecord.getLawFrId().toString());
this.getFlswDao().merge(flsw);
beCheckFlswManage();//得到各部门领导待批准委托单
/*
* 文书类:法律咨询委托、出具法律文书 在法律事务科审核完后进入FlowConfirm,就结束,此时传过来的FlowNode=3333,nextNode=****
* 所以这里要先判断,若flsw.getLawFlswNode()=****,则deleteTask;否则updateTask
* 删除或更新代办
*/
if(flsw.getLawFlswNode().equals("****"))
{
/*
* 删除待办
*/
this.setFlowtoperson("@@@");
updateTasks(this.getLawFlswId(),this.getFlowtoperson());
//deleteTasks(this.getLawFlswId());
//System.out.println("delete Success");
}
else
{
/*
* 更新代办
*/
updateTasks(this.getLawFlswId(),this.getFlowtoperson());
//System.out.println("update Success");
}
}catch(Exception e){
e.printStackTrace();
return "fail";
}
//System.out.println(this.getBackFlag());
return this.getBackFlag();
}
FlswInputAction.java:
public String inputFirstFlowRecord(Flsw f1) {
try {
// 从 * 到010的流程记录
fr = new FlowRecord();
fr.setFlsw(f1);
fn = this.getFlowNodeDao().findById(FIRST_FLOWNODE);
fr.setFlowNode(fn);
fr.setLawFrAct("0");
fr.setLawLastYn("0");
fr.setLawOpinionBoxYn("0");
this.getFlowRecordDao().save(fr);
// 从010到015的流程记录
fr = new FlowRecord();
fr.setFlsw(f1);
fn = this.getFlowNodeDao().findById(SECOND_FLOWNODE);
fr.setFlowNode(fn);
fr.setLawFrAct("0");
fr.setLawLastYn("1");
fr.setLawOpinionBoxYn("0");
this.getFlowRecordDao().save(fr);
System.out.println(fn.getLawFnId()+"xxxxxxxxxxxx"+fn.getLawFnNexNode()+"YYYYYYYYYYYY"+fn.getLawFnNode());
// 对Flsw的Node、PreNode进行修改
f1.setLawFlswNode(fn.getLawFnNexNode());
f1.setLawFlswPreNode(fn.getLawFnNode());
// FlowRecord表中同一个委托单的FlowRecord,将最后一个fr的Id保存在flsw中
// 以方便对FlowRecord表中的Last字段进行清除
f1.setLawFlswRemark1(fr.getLawFrId().toString());
this.getFlswDao().merge(f1);
} catch (Exception e) {
e.printStackTrace();
return "fail";
}
return "success";
}