业务系统设计说明三

系统工作流管理:

 

概述:系统采用JBPM4.3作为工作流引擎

 

所有流程的处理都从我的代办任务页面进入。

表单审批页面的审核按钮为动态生成:

在你Action中跳转到审核页面中你会这么写:

this.transitions = this.tasksManager.getTransitionsByTaskId(taskId);

页面中为:

<s:iterator value="transitions" status="stat">

<button onclick="javascript:ck('<s:property value="name"/>')" class="sexybutton sexysimple sexyblue" id="accept">转至[<s:property value="destination.name"/>]

</button>

</s:iterator>

 

具体请参看:web----hr----TravelyApplyActionauditForward方法以及audit方法

<button  onclick="javascript:showDialog();return false; " class="sexybutton"><span><span><span class="flow">查看流程图</span></span></span></button>

可以在审核按钮旁边放上这个链接,并加入

Javascript方法:

function showDialog(){

    window.open ('${ctx}/workflow/processDefinition!showFlowImage.action?taskId=${task.id}', 'newwindow', 'height=650, width=650, top=10, left=200, toolbar=no, menubar=no,resizable=yes,location=no, status=no');

   

}

供审核人查看流程图以及流程处理过程中的信息。

系统提供三种消息提醒方式,分别为:站内信提醒,email提醒和手机短信提醒。

三个类分别为:MessageInRemind.java,EmailRemind.java,PhoneMessageRemind.java.

都实现接口:IRemindType.java  在填写流程表单页面,可以加入:

Action 中加入:

private Map<String,String>  redmindTypeMap = SysConstants.getRemindTypeMap();

并加入get方法:

<div id="tixing" style="text-align:left">

任务提醒方式:

<s:checkboxlist name="remindTypes" list="redmindTypeMap" listKey="value"  listValue="key" value="remindTypes" theme="simple" />

</div>

其后的处理请参看TravelApplyAction中的audit方法。

主要是在asiignment中写入:

String reminds =(String)execution.getVariable("remindTypes");

Class<IRemindType> remind =(Class<IRemindType>) Class.forName(clazz);

IRemindType rt =remind.newInstance();

rt.remind("系统提醒您…..",u);

系统提供基于PDF的打印功能:基于 iText

 

在需要打印的地方加入:

<a href="${ctx}/common/print!print.action?id=${id}&type=com.hjc.entity.hr.WorkSummary&template=worksummary.tpl" title="打印"><img src="${ctx }/images/icons/printer.png" alt="打印 "/></a>

 

其中type为要打印的实体类型,id为实体ID,template为打印模版(freemarker)

然后在reportTpl文件夹下创建模版:

使用freemarker创建模版,支持CSS,注意:在文件过多时候打印时候不能自动换行,需要加入:

<div style="width:100%;word-break:break-all;  overflow:auto;"> </div>

将以上代码作为文字的父容器。

 

系统提供定时调度的功能:基于spring squartz

你只需要在spring的配置文件中(applicationContext-job.xml)中参考已有配置,参考quartz的表达式文档,使用合适的表达式即可。

页面结构:

 

所有的查询页面有相同的结构:

<%@ page contentType="text/html;charset=UTF-8" %>

<%@ include file="/common/header.jsp" %>

<head>

<script type="text/javascript" src="${ctx }/js/ext/UserSettingWindow.js"></script>

<script type="text/javascript" src="${ctx }/js/ext/extMessage.js"></script>

</head>

<body></body>

<body  style="margin-left:4px">

<div id="Navgtion">

</div>

<form name=”mainFrom”>

    <div id="QueryPanel">

       <legend class="small" align=left>

       <b>查询</b>

    </legend>

    <table width="100%" class="TableList" align="left"  >

</table>

</div>

 

<div id="ActionPanel">  

       <button class="sexybutton" id="add"><span><span><span class="add">录入本周工作日记</span></span></span></button>

       …………

</div>

<div id="TablePanel">

     <table width="98%" class="bg" border=1 cellspacing=0   id="theObjTable">

</table>

</div>

<%@ include file="/common/msg.jsp" %>

<%@ include file="/common/pages.jsp" %>

<%@ include file="/common/footer.jsp" %>

<%@ include file="/common/bottom.jsp" %>

</form>

 

 

所有的查询页面都需要引入:ext的相关文件,以及

<%@ include file="/common/bottom.jsp" %>

按钮样式采用 sexy button 样式库。

其它说明

JSON 采用JsonLib  提供Strut2Utils类,ajax返回通常采用这个类

DateUitl:提供获取日期以及日期转换等方法

ReflectionUtils:提供反射的常用封装

EncodeUtils:编码常用类

 

编码规约:

所有的包名,类名,文件名都只采用英文全写的方式,比如实体类名为user ,则对应的DAO方法为userDAO,actionuserAction  页面为 user.jsp  user-input.jsp 

 

尽量采用已有的包,而不是自己随意建包,注意:你所建的任何一个Package,任何一个Class,任何一个jsp都影响着本系统未来的维护者。所以请慎重!

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值