Survive by day and develop by night.
talk for import biz , show your perfect code,full busy,skip hardness,make a better result,wait for change,challenge Survive.
happy for hardess to solve denpendies.
目录
概述
需求:
设计思路
实现思路分析
package bp.ccoa;
import bp.da.*;
import bp.web.*;
import bp.en.*;
/**
记事本
*/
public class Notepad extends EntityMyPK
{
///#region 基本属性
/**
组织编号
*/
public final String getOrgNo()
{
return this.GetValStrByKey(NotepadAttr.OrgNo);
}
public final void setOrgNo(String value)
{
this.SetValByKey(NotepadAttr.OrgNo, value);
}
/**
记录人
*/
public final String getRec()
{
return this.GetValStrByKey(NotepadAttr.Rec);
}
public final void setRec(String value)
{
this.SetValByKey(NotepadAttr.Rec, value);
}
/**
记录日期
*/
public final String getRDT()
{
return this.GetValStrByKey(NotepadAttr.RDT);
}
public final void setRDT(String value)
{
this.SetValByKey(NotepadAttr.RDT, value);
}
/**
年月
*/
public final String getNianYue()
{
return this.GetValStrByKey(NotepadAttr.NianYue);
}
public final void setNianYue(String value)
{
this.SetValByKey(NotepadAttr.NianYue, value);
}
///#endregion
///#region 构造方法
/**
权限控制
*/
@Override
public UAC getHisUAC() {
UAC uac = new UAC();
if (WebUser.getIsAdmin())
{
uac.IsUpdate = true;
return uac;
}
return super.getHisUAC();
}
/**
记事本
*/
public Notepad() {
}
public Notepad(String mypk)throws Exception
{
this.setMyPK(mypk);
this.Retrieve();
}
/**
重写基类方法
*/
@Override
public bp.en.Map getEnMap() {
if (this.get_enMap() != null)
{
return this.get_enMap();
}
Map map = new Map("OA_Notepad", "记事本");
map.AddMyPK(true);
map.AddTBString(NotepadAttr.Name, null, "标题", true, false, 0, 300, 10, true);
map.AddTBStringDoc(NotepadAttr.Docs, null, "内容", true, false);
map.AddTBString(NotepadAttr.OrgNo, null, "OrgNo", false, false, 0, 100, 10);
map.AddTBString(NotepadAttr.Rec, null, "记录人", false, false, 0, 100, 10, true);
map.AddTBDateTime(NotepadAttr.RDT, null, "记录时间", false, false);
map.AddTBString(NotepadAttr.NianYue, null, "NianYue", false, false, 0, 10, 10);
map.AddTBInt(NotepadAttr.IsStar, 0, "是否标星", false, false);
//RefMethod rm = new RefMethod();
//rm.Title = "方法参数"; // "设计表单";
//rm.ClassMethodName = this.ToString() + ".DoParas";
//rm.Visable = true;
//rm.refMethodType = RefMethodType.RightFrameOpen;
//rm.Target = "_blank";
rm.GroupName = "开发接口";
map.AddRefMethod(rm);
//rm = new RefMethod();
//rm.Title = "方法内容"; // "设计表单";
//rm.ClassMethodName = this.ToString() + ".DoDocs";
//rm.Visable = true;
//rm.refMethodType = RefMethodType.RightFrameOpen;
//rm.Target = "_blank";
rm.GroupName = "开发接口";
//map.AddRefMethod(rm);
this.set_enMap(map);
return this.get_enMap();
}
///#endregion
///#region 执行方法.
@Override
protected boolean beforeInsert() throws Exception {
this.setMyPK(DBAccess.GenerGUID(0, null, null));
this.setRec(WebUser.getNo());
this.setRDT(DataType.getCurrentDateTime());
this.setNianYue(DataType.getCurrentYearMonth());
return super.beforeInsert();
}
///#endregion 执行方法.
}
package bp.ccoa;
import bp.en.*;
/**
记事本 属性
*/
public class NotepadAttr extends EntityMyPKAttr
{
/**
名称
*/
public static final String Name = "Name";
/**
功能ID
*/
public static final String Docs = "Docs";
/**
组织编号
*/
public static final String OrgNo = "OrgNo";
/**
记录人
*/
public static final String Rec = "Rec";
/**
记录日期
*/
public static final String RDT = "RDT";
/**
年月
*/
public static final String NianYue = "NianYue";
/**
是否收藏
*/
public static final String IsStar = "IsStar";
}
package bp.ccoa;
import bp.web.*;
import bp.en.*;
import java.util.*;
/**
记事本 s
*/
public class Notepads extends EntitiesMyPK
{
/**
查询前30个数据.
@return
*/
public final String RetrieveTop30() throws Exception {
QueryObject qo = new QueryObject(this);
qo.AddWhere(NotepadAttr.Rec, WebUser.getNo());
//qo.addAnd();
//qo.AddWhere(NotepadAttr.IsStar, 0);
qo.Top = 30;
qo.addOrderBy("RDT");
qo.DoQuery();
return this.ToJson("dt");
}
public final String RetrieveTop30Stars() throws Exception {
QueryObject qo = new QueryObject(this);
qo.AddWhere(NotepadAttr.Rec, WebUser.getNo());
qo.addAnd();
qo.AddWhere(NotepadAttr.IsStar, 1);
qo.Top = 30;
qo.addOrderBy("RDT");
qo.DoQuery();
return this.ToJson("dt");
}
/**
记事本
*/
public Notepads(){
}
/**
得到它的 Entity
*/
@Override
public Entity getGetNewEntity() {
return new Notepad();
}
///#region 为了适应自动翻译成java的需要,把实体转换成List.
/**
转化成 java list,C#不能调用.
@return List
*/
public final java.util.List<Notepad> ToJavaList() {
return (java.util.List<Notepad>)(Object)this;
}
/**
转化成list
@return List
*/
public final ArrayList<Notepad> Tolist() {
ArrayList<Notepad> list = new ArrayList<Notepad>();
for (int i = 0; i < this.size(); i++)
{
list.add((Notepad)this.get(i));
}
return list;
}
///#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
package bp.ccoa;
import bp.da.*;
import bp.web.*;
import bp.en.*;
/**
日程
*/
public class Schedule extends EntityMyPK
{
///#region 基本属性
public final String getNianYue()
{
return this.GetValStrByKey(ScheduleAttr.NianYue);
}
public final void setNianYue(String value)
{
this.SetValByKey(ScheduleAttr.NianYue, value);
}
/**
组织编号
*/
public final String getOrgNo()
{
return this.GetValStrByKey(ScheduleAttr.OrgNo);
}
public final void setOrgNo(String value)
{
this.SetValByKey(ScheduleAttr.OrgNo, value);
}
public final String getRec()
{
return this.GetValStrByKey(ScheduleAttr.Rec);
}
public final void setRec(String value)
{
this.SetValByKey(ScheduleAttr.Rec, value);
}
public final String getRDT()
{
return this.GetValStrByKey(ScheduleAttr.RDT);
}
public final void setRDT(String value)
{
this.SetValByKey(ScheduleAttr.RDT, value);
}
///#endregion
///#region 构造方法
/**
权限控制
*/
@Override
public UAC getHisUAC() {
UAC uac = new UAC();
if (WebUser.getIsAdmin())
{
uac.IsUpdate = true;
return uac;
}
return super.getHisUAC();
}
/**
日程
*/
public Schedule() {
}
public Schedule(String mypk)throws Exception
{
this.setMyPK(mypk);
this.Retrieve();
}
/**
重写基类方法
*/
@Override
public bp.en.Map getEnMap() {
if (this.get_enMap() != null)
{
return this.get_enMap();
}
Map map = new Map("OA_Schedule", "日程");
map.AddMyPK(true);
map.AddTBString(ScheduleAttr.Name, null, "标题", true, false, 0, 300, 10, true);
map.AddTBDate(ScheduleAttr.DTStart, null, "开始时间", true, false);
map.AddTBDate(ScheduleAttr.DTEnd, null, "结束时间", true, false);
map.AddTBString(ScheduleAttr.TimeStart, null, "TimeStart", true, false, 0, 10, 10);
map.AddTBString(ScheduleAttr.TimeEnd, null, "TimeEnd", true, false, 0, 10, 10);
map.AddTBString(ScheduleAttr.ChiXuTime, null, "持续时间", true, false, 0, 10, 10);
map.AddTBDateTime(ScheduleAttr.DTAlert, null, "提醒时间", true, false);
map.AddDDLSysEnum(ScheduleAttr.Repeats, 0, "重复", true, false, "Repeat", "@0=永不@1=每年@2=每月");
map.AddTBString(ScheduleAttr.Local, null, "位置", true, false, 0, 300, 10, true);
map.AddTBString(ScheduleAttr.MiaoShu, null, "描述", true, false, 0, 300, 10, true);
map.AddTBString(ScheduleAttr.NianYue, null, "隶属年月", false, false, 0, 10, 10);
map.AddTBString(ScheduleAttr.OrgNo, null, "OrgNo", false, false, 0, 100, 10);
map.AddTBString(ScheduleAttr.Rec, null, "记录人", false, false, 0, 100, 10, true);
map.AddTBDateTime(ScheduleAttr.RDT, null, "记录时间", false, false);
//RefMethod rm = new RefMethod();
//rm.Title = "方法参数"; // "设计表单";
//rm.ClassMethodName = this.ToString() + ".DoParas";
//rm.Visable = true;
//rm.refMethodType = RefMethodType.RightFrameOpen;
//rm.Target = "_blank";
rm.GroupName = "开发接口";
map.AddRefMethod(rm);
//rm = new RefMethod();
//rm.Title = "方法内容"; // "设计表单";
//rm.ClassMethodName = this.ToString() + ".DoDocs";
//rm.Visable = true;
//rm.refMethodType = RefMethodType.RightFrameOpen;
//rm.Target = "_blank";
rm.GroupName = "开发接口";
//map.AddRefMethod(rm);
this.set_enMap(map);
return this.get_enMap();
}
///#endregion
///#region 执行方法.
@Override
protected boolean beforeInsert() throws Exception {
this.setMyPK(DBAccess.GenerGUID(0, null, null));
this.setRec(WebUser.getNo());
this.setOrgNo(WebUser.getOrgNo());
this.setRDT(DataType.getCurrentDateTime());
this.setNianYue(DataType.getCurrentYearMonth());
return super.beforeInsert();
}
///#endregion 执行方法.
}
package bp.ccoa;
import bp.en.*;
/**
日程 属性
*/
public class ScheduleAttr extends EntityMyPKAttr
{
/**
名称
*/
public static final String Name = "Name";
/**
功能ID
*/
public static final String DTStart = "DTStart";
/**
从
*/
public static final String TimeStart = "TimeStart";
/**
功能来源
*/
public static final String DTEnd = "DTEnd";
/**
时间从
*/
public static final String TimeEnd = "TimeEnd";
/**
持续时间
*/
public static final String ChiXuTime = "ChiXuTime";
/**
重复方式
*/
public static final String Repeats = "Repeats";
/**
位置
*/
public static final String Local = "Local";
/**
描述
*/
public static final String MiaoShu = "MiaoShu";
/**
提醒时间
*/
public static final String DTAlert = "DTAlert";
/**
组织编号
*/
public static final String OrgNo = "OrgNo";
/**
记录人
*/
public static final String Rec = "Rec";
/**
记录日期
*/
public static final String RDT = "RDT";
/**
年月.
*/
public static final String NianYue = "NianYue";
}
表单是用来呈现与存储数据的图形化界面,数据展现、数据存储、用户交互的工具。我们用火车来比喻,数据就是货物、表单就是车厢、火车头就是工作流程引擎。
驰骋表单分类:驰骋表单为了适用与不同的用户类型与不同的应用平台,把他分为:自由表单、自定义表单、Office表单。驰骋表单可以与驰骋工作流引擎紧密结合运行,也可以单独运行。
自由表单:
它采用关系型数据库存储表单模版的设计理念表单。它可以通过拖拽的方式图形化的设计一个表单。驰骋的自由表单=表单模版+表单设计器+表单解析执行器三部分构成。对于表单解析执行器,我们又分为aspx表单解析执行器,jsp表单解析执行器, andriod表单解析执行器。
自定义表单:
使用户自己定义一个表单,把他的url设置到表单注册表里,双方通过一定的参数约定来工作。
开发者表单:
借助百度UEditer在线编辑html功能。
Office表单:
他是借助web office的在线编辑文档的组件,完成对数据的采集需要,它直接提供给操作用户的是一个excel文件或者word文件。所以驰骋的office表单=Excel表单+Word表单。对于公文类的流程大多用word表单,业务类的表单多用于使用excel表单。我们使用上驰骋的office表单,需要感谢北京点聚公司为我们提供的这个在线编辑组件。
流行的表单引擎设计思想:
基于文件模式的与基于关系型数据库模式的。
以上任何一个类型的表单,都有一个表单ID,一个表单类型,一个表单数据存储表, 自定义表单与office表单也不例外。
性能参数测试:
待测试
参考资料和推荐阅读
- 暂无
2.https://gitee.com/opencc/JFlow/wikis/%E8%A1%A8%E5%8D%95%E5%BC%95%E6%93%8E/%E7%B1%BB%E5%9E%8B/%E6%A6%82%E8%A6%81%E8%AF%B4%E6%98%8E
欢迎阅读,各位老铁,如果对你有帮助,点个赞加个关注呗!~