EntityMyPKAttr
- 目录
- 概述
- 需求:
- 设计思路
- 实现思路分析
- 1.Notepads
- 2.EntityMyPK
- 3.EntityMyPKAttr
- 4.EntitiesMyPK
- 5.EntityMyPK
- EntityMyPKAttr
- EntitiesMyPK
- WebContralBase
- AtPara
- Cash
- ChartType
- 参考资料和推荐阅读
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.
目录
概述
网络爬虫的是一个非常常见的需求。
需求:
设计思路
实现思路分析
1.Notepads
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.
}
2.EntityMyPK
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 执行方法.
}
3.EntityMyPKAttr
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";
}
4.EntitiesMyPK
package bp.ccoa;
import bp.en.*;
import java.util.*;
/**
日程 s
*/
public class Schedules extends EntitiesMyPK
{
/**
查询事件到.
param dtFrom
param dtTo
@return
*/
public final String DTFromTo(String dtFrom, String dtTo) throws Exception {
this.RetrieveAll();
return this.ToJson("dt");
}
/**
日程
*/
public Schedules() throws Exception {
}
/**
得到它的 Entity
*/
@Override
public Entity getGetNewEntity() {
return new Schedule();
}
///#region 为了适应自动翻译成java的需要,把实体转换成List.
/**
转化成 java list,C#不能调用.
@return List
*/
public final java.util.List<Schedule> ToJavaList() {
return (java.util.List<Schedule>)(Object)this;
}
/**
转化成list
@return List
*/
public final ArrayList<Schedule> Tolist() {
ArrayList<Schedule> list = new ArrayList<Schedule>();
for (int i = 0; i < this.size(); i++)
{
list.add((Schedule)this.get(i));
}
return list;
}
///#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
5.EntityMyPK
package bp.ccoa;
import bp.da.*;
import bp.web.*;
import bp.en.*;
import bp.sys.*;
/**
任务
*/
public class Task extends EntityMyPK
{
///#region 基本属性
/**
组织编号
*/
public final String getOrgNo()
{
return this.GetValStrByKey(TaskAttr.OrgNo);
}
public final void setOrgNo(String value)
{
this.SetValByKey(TaskAttr.OrgNo, value);
}
public final String getRec()
{
return this.GetValStrByKey(TaskAttr.Rec);
}
public final void setRec(String value)
{
this.SetValByKey(TaskAttr.Rec, value);
}
public final String getRecName()
{
return this.GetValStrByKey(TaskAttr.RecName);
}
public final void setRecName(String value)
{
this.SetValByKey(TaskAttr.RecName, value);
}
public final String getRDT()
{
return this.GetValStrByKey(TaskAttr.RDT);
}
public final void setRDT(String value)
{
this.SetValByKey(TaskAttr.RDT, value);
}
/**
日期
*/
public final String getRiQi()
{
return this.GetValStrByKey(TaskAttr.RiQi);
}
public final void setRiQi(String value)
{
this.SetValByKey(TaskAttr.RiQi, value);
}
/**
年月
*/
public final String getDTFrom()
{
return this.GetValStrByKey(TaskAttr.DTFrom);
}
public final void setDTFrom(String value)
{
this.SetValByKey(TaskAttr.DTFrom, value);
}
public final String getDTTo()
{
return this.GetValStrByKey(TaskAttr.DTTo);
}
public final void setDTTo(String value)
{
this.SetValByKey(TaskAttr.DTTo, value);
}
/**
项目数
*/
public final int getRefEmpsNo()
{
return this.GetValIntByKey(TaskAttr.RefEmpsNo);
}
public final void setRefEmpsNo(int value)
{
this.SetValByKey(TaskAttr.RefEmpsNo, value);
}
/**
第几周?
*/
public final int getRefEmpsName()
{
return this.GetValIntByKey(TaskAttr.RefEmpsName);
}
public final void setRefEmpsName(int value)
{
this.SetValByKey(TaskAttr.RefEmpsName, value);
}
/**
负责人
*/
public final float getManager()
{
return this.GetValFloatByKey(TaskAttr.Manager);
}
public final void setManager(float value)
{
this.SetValByKey(TaskAttr.Manager, value);
}
///#endregion
///#region 构造方法
/**
权限控制
*/
@Override
public UAC getHisUAC() {
UAC uac = new UAC();
if (WebUser.getIsAdmin())
{
uac.IsUpdate = true;
return uac;
}
return super.getHisUAC();
}
/**
任务
*/
public Task() {
}
public Task(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_Task", "任务");
map.AddMyPK(true);
map.AddTBString(TaskAttr.Title, null, "标题", false, false, 0, 500, 10);
map.AddTBString(TaskAttr.Docs, null, "内容", false, false, 0, 4000, 10);
map.AddTBString(TaskAttr.ParentNo, null, "父节点ID", false, false, 0, 50, 10);
map.AddTBInt(TaskAttr.IsSubTask, 0, "是否是子任务", true, false);
map.AddDDLSysEnum(TaskAttr.TaskPRI, 0, "优先级", true, false, "TaskPRI", "@0=高@1=中@2=低");
map.AddDDLSysEnum(TaskAttr.TaskSta, 0, "状态", true, false, "TaskSta", "@0=未完成@1=已完成");
map.AddTBDateTime(TaskAttr.DTFrom, null, "日期从", false, false);
map.AddTBDateTime(TaskAttr.DTTo, null, "到", false, false);
map.AddTBString(TaskAttr.ManagerEmpNo, null, "负责人", false, false, 0, 30, 10);
map.AddTBString(TaskAttr.ManagerEmpName, null, "负责人名称", false, false, 0, 40, 10);
map.AddTBString(TaskAttr.RefEmpsNo, null, "参与人编号", false, false, 0, 3000, 10);
map.AddTBString(TaskAttr.RefEmpsName, null, "参与人名称", false, false, 0, 3000, 10);
map.AddTBString(TaskAttr.RefLabelNo, null, "标签标号", false, false, 0, 3000, 10);
map.AddTBString(TaskAttr.RefLabelName, null, "标签名称", false, false, 0, 3000, 10);
map.AddTBString(TaskAttr.OrgNo, null, "组织编号", false, false, 0, 100, 10);
map.AddTBString(TaskAttr.Rec, null, "记录人", false, false, 0, 100, 10);
map.AddTBString(TaskAttr.RecName, null, "记录人名称", false, false, 0, 100, 10, true);
map.AddTBDateTime(TaskAttr.RDT, null, "记录时间", false, false);
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.setRecName(WebUser.getName());
if (bp.difference.SystemConfig.getCCBPMRunModel() != CCBPMRunModel.Single)
{
this.setOrgNo(WebUser.getOrgNo());
}
this.SetValByKey("RDT", DataType.getCurrentDateTime());
return super.beforeInsert();
}
@Override
protected boolean beforeUpdate() throws Exception {
计算条数.
//this.RefEmpsNo = DBAccess.RunSQLReturnValInt("SELECT COUNT(*) AS N FROM OA_TaskDtl WHERE RefPK='" + this.MyPK + "'");
计算合计工作小时..
//this.Manager = DBAccess.RunSQLReturnValInt("SELECT SUM(Hour) + Sum(Minute)/60.00 AS N FROM OA_TaskDtl WHERE RefPK='" + this.MyPK + "'");
return super.beforeUpdate();
}
///#endregion 执行方法.
}
EntityMyPKAttr
package bp.ccoa;
import bp.en.*;
/**
任务 属性
*/
public class TaskAttr extends EntityMyPKAttr
{
/**
模式
*/
public static final String TaskPRI = "TaskPRI";
/**
内容1
*/
public static final String Docs = "Docs";
public static final String Title = "Title";
/**
内容2
*/
public static final String TaskSta = "TaskSta";
/**
内容3
*/
public static final String ManagerEmpNo = "ManagerEmpNo";
/**
负责人
*/
public static final String ManagerEmpName = "ManagerEmpName";
public static final String RefLabelNo = "RefLabelNo";
public static final String RefLabelName = "RefLabelName";
/**
组织编号
*/
public static final String OrgNo = "OrgNo";
/**
记录人
*/
public static final String Rec = "Rec";
/**
记录人名称
*/
public static final String RecName = "RecName";
/**
记录日期
*/
public static final String RDT = "RDT";
/**
隶属日期
*/
public static final String RiQi = "RiQi";
/**
年月
*/
public static final String DTFrom = "DTFrom";
/**
项目数
*/
public static final String RefEmpsNo = "RefEmpsNo";
/**
第几周
*/
public static final String RefEmpsName = "RefEmpsName";
/**
年度
*/
public static final String DTTo = "DTTo";
/**
负责人.
*/
public static final String Manager = "Manager";
public static final String ParentNo = "ParentNo";
public static final String IsSubTask = "IsSubTask";
}
EntitiesMyPK
package bp.ccoa;
import bp.da.*;
import bp.web.*;
import bp.en.*;
import bp.port.*;
import bp.sys.*;
import java.util.*;
/**
任务 s
*/
public class Tasks extends EntitiesMyPK
{
///#region 查询.
/**
所有的任务
@return
*/
public final String Task_AllTasks() throws Exception {
QueryObject qo = new QueryObject(this);
qo.addLeftBracket();
qo.AddWhere(TaskAttr.Rec, WebUser.getNo());
qo.addOr();
qo.AddWhere(TaskAttr.RefEmpsNo, " like ", "%," + WebUser.getNo() + ",%");
qo.addOr();
qo.AddWhere(TaskAttr.ManagerEmpNo, " like ", "%," + WebUser.getNo() + ",%");
qo.addRightBracket();
qo.addAnd();
qo.AddWhere(TaskAttr.IsSubTask, 0);
if (bp.difference.SystemConfig.getCCBPMRunModel() == CCBPMRunModel.SAAS)
{
qo.addAnd();
qo.AddWhere(TaskAttr.OrgNo, " = ", WebUser.getOrgNo());
}
qo.DoQuery();
return this.ToJson("dt");
}
public final String TextBox_EmpPinYin(String key)
{
String whereSQL = " AND OrgNo='" + WebUser.getOrgNo() + "'";
if (bp.difference.SystemConfig.getCCBPMRunModel() == CCBPMRunModel.Single)
{
whereSQL = "";
}
String sql = "";
sql = "SELECT No, Name FROM Port_Emp WHERE (No like '%" + key + "%' or Name like '%" + key + "%' or PinYin like '%" + key + "%' ) " + whereSQL;
DataTable dt = DBAccess.RunSQLReturnTable(sql);
return bp.tools.Json.ToJson(dt);
}
public final String Selecter_DeptEmps() throws Exception {
DataSet ds = new DataSet();
Depts depts = new Depts();
depts.RetrieveAll();
Emps emps = new Emps();
emps.RetrieveAll();
ds.Tables.add(depts.ToDataTableField("Depts"));
ds.Tables.add(emps.ToDataTableField("Emps"));
return bp.tools.Json.ToJson(ds);
}
///#endregion 重写.
///#region 重写.
/**
任务
*/
public Tasks() {
}
/**
得到它的 Entity
*/
@Override
public Entity getGetNewEntity() {
return new Task();
}
///#endregion 重写.
///#region 为了适应自动翻译成java的需要,把实体转换成List.
/**
转化成 java list,C#不能调用.
@return List
*/
public final java.util.List<Task> ToJavaList() {
return (java.util.List<Task>)(Object)this;
}
/**
转化成list
@return List
*/
public final ArrayList<Task> Tolist() {
ArrayList<Task> list = new ArrayList<Task>();
for (int i = 0; i < this.size(); i++)
{
list.add((Task)this.get(i));
}
return list;
}
///#endregion 为了适应自动翻译成java的需要,把实体转换成List.
}
WebContralBase
package bp.cloud.httphandler;
import bp.da.*;
import bp.difference.SystemConfig;
import bp.difference.handler.WebContralBase;
import bp.en.FieldTypeS;
import bp.en.QueryObject;
import bp.sys.MapAttr;
import bp.sys.MapAttrAttr;
import bp.sys.MapAttrs;
import bp.web.WebUser;
import bp.wf.Dev2Interface;
import bp.wf.WFState;
import bp.wf.data.MyJoinFlows;
import bp.wf.data.MyStartFlowAttr;
import bp.wf.data.MyStartFlows;
/**
页面功能实体
*/
public class App_OneFlow extends WebContralBase
{
/**
构造函数
*/
public App_OneFlow()
{
}
/**
获得菜单
@return
*/
public final String Default_Menu() throws Exception {
if (WebUser.getNo() == null)
{
return "err@/App/index.htm";
}
//类别.
DataTable dtSort = new DataTable("Sorts");
dtSort.Columns.Add("No");
dtSort.Columns.Add("Name");
dtSort.Columns.Add("ICON");
//菜单.
DataTable dtMenu = new DataTable("Menus");
dtMenu.Columns.Add("No");
dtMenu.Columns.Add("Name");
dtMenu.Columns.Add("SortNo");
dtMenu.Columns.Add("ICON");
dtMenu.Columns.Add("Url");
///#region 类别.
DataRow dr = dtSort.NewRow();
dr.setValue("No","01");
dr.setValue("Name","本流程操作");
dr.setValue("ICON","FlowCenter.png");
dtSort.Rows.add(dr);
dr = dtSort.NewRow();
dr.setValue("No","02");
dr.setValue("Name","本流程业务数据");
dr.setValue("ICON","FlowSearch.png");
dtSort.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","Todolist");
dr.setValue("Name","待办");
dr.setValue("SortNo","01");
dr.setValue("Url","/App/OneFlow/Todolist.htm");
dr.setValue("ICON","Todolist.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","Runing");
dr.setValue("Name","未完成");
dr.setValue("SortNo","01");
dr.setValue("Url","/App/OneFlow/Runing.htm");
dr.setValue("ICON","Runing.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","CC");
dr.setValue("Name","抄送");
dr.setValue("SortNo","01");
dr.setValue("Url","/App/OneFlow/CC.htm");
dr.setValue("ICON","CC.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","Draf");
dr.setValue("Name","草稿");
dr.setValue("SortNo","01");
dr.setValue("Url","/App/OneFlow/Draf.htm");
dr.setValue("ICON","Draft.png");
dtMenu.Rows.add(dr);
///#endregion 流程中心-菜单.
///#region 流程查询-菜单.
dr = dtMenu.NewRow();
dr.setValue("No","MyStartFlows");
dr.setValue("Name","我发起的");
dr.setValue("SortNo","02");
dr.setValue("Url","/App/OneFlow/RptSearch.htm?SearchType=My");
dr.setValue("ICON","SearchMy.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","MyJoinFlows");
dr.setValue("Name","我审批的");
dr.setValue("SortNo","02");
dr.setValue("Url","/App/OneFlow/RptSearch.htm?SearchType=MyJoin");
dr.setValue("ICON","SearchMyCheck.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","Org");
dr.setValue("Name","部门数据概况");
dr.setValue("SortNo","02");
dr.setValue("Url","/App/OneFlow/DataPanelDept.htm");
dr.setValue("ICON","Organization.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","Org");
dr.setValue("Name","组织数据概况");
dr.setValue("SortNo","02");
dr.setValue("Url","/App/OneFlow/DataPanelOrg.htm");
dr.setValue("ICON","Organization.png");
dtMenu.Rows.add(dr);
if (WebUser.getIsAdmin() == true)
{
dr = dtMenu.NewRow();
dr.setValue("No","MyDeptFlows");
dr.setValue("Name","我部门发起的");
dr.setValue("SortNo","02");
dr.setValue("Url","/App/OneFlow/RptSearch.htm?SearchType=MyDept");
dr.setValue("ICON","SearchMyDept.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","FX");
dr.setValue("Name","综合分析");
dr.setValue("SortNo","02");
dr.setValue("Url","/WF/Comm/Group.htm?EnsName=BP.Cloud.GWFAdmins");
dr.setValue("ICON","ZongHeFenXi.png");
dtMenu.Rows.add(dr);
dr = dtMenu.NewRow();
dr.setValue("No","FlowDatas");
dr.setValue("Name","数据运维");
dr.setValue("SortNo","02");
dr.setValue("Url","/WF/Comm/Search.htm?EnsName=BP.Cloud.GWFAdmins");
dr.setValue("ICON","YunWei.png");
dtMenu.Rows.add(dr);
}
///#endregion 流程查询-菜单.
///#endregion 系统管理-菜单.
//组装数据.
DataSet ds = new DataSet();
ds.Tables.add(dtSort);
ds.Tables.add(dtMenu);
//返回数据.
return bp.tools.Json.ToJson(ds);
}
/**
初始化Home
@return
*/
public final String Default_Init() throws Exception {
java.util.Hashtable ht = new java.util.Hashtable();
ht.put("UserNo", WebUser.getNo());
ht.put("UserName", WebUser.getName());
//系统名称.
ht.put("SysName", SystemConfig.getSysName());
ht.put("CustomerName", SystemConfig.getCustomerName());
ht.put("Todolist_EmpWorks", bp.wf.Dev2Interface.getTodolistEmpWorks());
ht.put("Todolist_Runing", bp.wf.Dev2Interface.getTodolistRuning());
ht.put("Todolist_Sharing", bp.wf.Dev2Interface.getTodolistSharing());
ht.put("Todolist_CCWorks", bp.wf.Dev2Interface.getTodolistCCWorks());
ht.put("Todolist_Apply", bp.wf.Dev2Interface.getTodolistApply()); //申请下来的任务个数.
ht.put("Todolist_Draft", bp.wf.Dev2Interface.getTodolistDraft()); //草稿数量.
ht.put("Todolist_Complete", bp.wf.Dev2Interface.getTodolistComplete()); //完成数量.
ht.put("UserDeptName", WebUser.getFK_DeptName());
//我发起
MyStartFlows myStartFlows = new MyStartFlows();
QueryObject obj = new QueryObject(myStartFlows);
obj.AddWhere(MyStartFlowAttr.Starter, WebUser.getNo());
obj.addAnd();
//运行中\已完成\挂起\退回\转发\加签\批处理\
obj.addLeftBracket();
obj.AddWhere("WFState=2 or WFState=3 or WFState=4 or WFState=5 or WFState=6 or WFState=8 or WFState=10");
obj.addRightBracket();
obj.DoQuery();
ht.put("Todolist_MyStartFlow", myStartFlows.size());
//我参与
MyJoinFlows myFlows = new MyJoinFlows();
obj = new QueryObject(myFlows);
obj.AddWhere("Emps like '%" + WebUser.getNo() + "%'");
obj.DoQuery();
ht.put("Todolist_MyFlow", myFlows.size());
return bp.tools.Json.ToJsonEntityModel(ht);
}
/**
初始化待办.
@return
*/
public final String Todolist_Init() throws Exception {
String fk_node = this.GetRequestVal("FK_Node");
String showWhat = this.GetRequestVal("ShowWhat");
DataTable dt = bp.wf.Dev2Interface.DB_GenerEmpWorksOfDataTable(WebUser.getNo(),this.getFK_Node(),showWhat,this.getDomain());
return bp.tools.Json.ToJson(dt);
}
/**
在途
@return 运行中的流程
*/
public final String Runing_Init() throws Exception {
DataTable dt = null;
boolean isContainFuture = this.GetRequestValBoolen("IsContainFuture");
dt = bp.wf.Dev2Interface.DB_GenerRuning(WebUser.getNo(),this.getFK_Flow(),false,this.getDomain(), isContainFuture); //获得指定域的在途.
return bp.tools.Json.ToJson(dt);
}
/**
抄送
@return
*/
public final String CC_Init() throws Exception {
String sta = this.GetRequestVal("Sta");
if (DataType.IsNullOrEmpty(sta))
{
sta = "-1";
}
DataTable dt = null;
if (sta.equals("-1"))
{
dt = Dev2Interface.DB_CCList("",this.getFK_Flow());
}
if (sta.equals("0"))
{
dt = bp.wf.Dev2Interface.DB_CCList_UnRead(WebUser.getNo(),null,this.getFK_Flow());
}
if (sta.equals("1"))
{
dt = bp.wf.Dev2Interface.DB_CCList_Read(null,this.getFK_Flow());
}
if (sta.equals("2"))
{
dt = bp.wf.Dev2Interface.DB_CCList_Delete(null,this.getFK_Flow());
}
return bp.tools.Json.ToJson(dt);
}
public final String Draf_Init()
{
DataTable dt = bp.wf.Dev2Interface.DB_GenerDraftDataTable(this.getFK_Flow());
return bp.tools.Json.ToJson(dt);
}
/**
获取本部门的数据统计
@return
*/
public final String DataPanelDept_GetGenerWorksByDept()
{
java.util.Hashtable ht = new java.util.Hashtable();
String dbStr = SystemConfig.getAppCenterDBVarStr();
Paras ps = new Paras();
ps.SQL = "SELECT COUNT(*) AS count,WFState FROM WF_GenerWorkFlow Where WFState >1 AND FID=0 AND FK_Flow=" + dbStr + "FK_Flow AND FK_Dept=" + dbStr + "FK_Dept GROUP BY WFState";
ps.Add("FK_Flow", this.getFK_Flow());
ps.Add("FK_Dept", WebUser.getFK_Dept());
DataTable dt = DBAccess.RunSQLReturnTable(ps);
int allCount = 0;
int count = 0;
int wfstate = 0;
for(DataRow dr : dt.Rows)
{
count = Integer.parseInt(dr.getValue(0).toString());
wfstate = Integer.parseInt(dr.getValue(1).toString());
allCount += count;
if(wfstate == WFState.Complete.getValue())
{
ht.put("Dept_GWF_CompleteCounts", count);
}
if (wfstate == WFState.ReturnSta.getValue())
{
ht.put("Dept_GWF_ReturnCounts", count);
}
if (wfstate == WFState.Delete.getValue())
{
ht.put("Dept_GWF_DeleteCounts", count);
}
}
//本部门的查询显示数量
ps.SQL = "Select Count(DISTINCT WorkID) From(" + "SELECT DISTINCT G.WorkID From WF_GenerWorkFlow G,WF_GenerWorkerlist L Where G.WorkID=L.WorkID AND G.WFState=2 AND G.FK_Flow=" + dbStr + "FK_Flow AND L.IsPass=0 AND L.FK_Dept=" + dbStr + "FK_Dept" +" UNION SELECT DISTINCT WorkID FROM WF_GenerWorkFlow Where WFState > 1 AND WFState!=3 AND FK_Flow =" + dbStr + "FK_Flow AND FK_Dept=" + dbStr + "FK_Dept) AS A";
ps.Add("FK_Flow", this.getFK_Flow());
ps.Add("FK_Dept", WebUser.getFK_Dept());
int runingCount = DBAccess.RunSQLReturnValInt(ps);
ht.put("Dept_GWF_RuningCounts", runingCount);
ht.put("Dept_GWF_Counts", allCount);
switch(SystemConfig.getAppCenterDBType()){
case MySQL:
case UX:
case PostgreSQL:
ht.put("Dept_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Flow='"+this.getFK_Flow()+"' AND FK_Dept='" +WebUser.getFK_Dept() + "' AND STR_TO_DATE(SDT,'%Y-%m-%d %H:%i') < NOW()"));
break;
case Oracle:
case KingBaseR3:
case KingBaseR6:
ht.put("Dept_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Flow='"+this.getFK_Flow()+"' AND FK_Dept='" +WebUser.getFK_Dept() + "' AND to_char(to_date(SDT,'yyyy-mm-dd,hh24:mi'),'yyyymmdd HH:mm') < to_char(sysdate ,'yyyymmdd HH:mm')"));
break;
case MSSQL:
ht.put("Dept_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Flow='"+this.getFK_Flow()+"' AND FK_Dept='" +WebUser.getFK_Dept() + "' AND convert(varchar(100),SDT,120) < CONVERT(varchar(100), GETDATE(), 120)"));
break;
default:
throw new RuntimeException(SystemConfig.getAppCenterDBType()+"还没增加该数据库类型的解析");
}
//个人的查询显示数量
ps.clear();
ps.SQL = "SELECT COUNT(DISTINCT WorkID) AS count,WFState FROM WF_GenerWorkFlow Where WFState >1 AND FK_Flow=" + dbStr + "FK_Flow AND (Emps like '%@"+WebUser.getNo()+",%'OR TodoEmps like '%"+WebUser.getNo()+",%') GROUP BY WFState ";
ps.Add("FK_Flow", this.getFK_Flow());
//ps.Add("FK_Dept", WebUser.getFK_Dept());
dt = DBAccess.RunSQLReturnTable(ps);
allCount = 0;
for (DataRow dr : dt.Rows)
{
count = Integer.parseInt(dr.getValue(0).toString());
wfstate = Integer.parseInt(dr.getValue(1).toString());
allCount += count;
if (wfstate ==WFState.Runing.getValue())
{
ht.put("My_GWF_RuningCounts", count);
}
if (wfstate ==WFState.Complete.getValue())
{
ht.put("My_GWF_CompleteCounts", count);
}
if (wfstate == WFState.ReturnSta.getValue())
{
ht.put("My_GWF_ReturnCounts", count);
}
if (wfstate ==WFState.Delete.getValue())
{
ht.put("My_GWF_DeleteCounts", count);
}
}
ht.put("My_GWF_Counts", allCount);
switch(SystemConfig.getAppCenterDBType()){
case MySQL:
case UX:
case PostgreSQL:
ht.put("My_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Emp='" + WebUser.getNo() + "' AND FK_Flow='" + this.getFK_Flow() + "' AND STR_TO_DATE(SDT,'%Y-%m-%d %H:%i') < NOW()"));
break;
case Oracle:
case KingBaseR3:
case KingBaseR6:
ht.put("My_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Emp='" + WebUser.getNo() + "' AND FK_Flow='" + this.getFK_Flow()+ "' AND convert(varchar(100),SDT,120) < CONVERT(varchar(100), GETDATE(), 120)"));
break;
case MSSQL:
ht.put("My_GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(*) FROM WF_GenerWorkerList WHERE IsPass=0 AND FK_Emp='" + WebUser.getNo() + "' AND FK_Flow='" + this.getFK_Flow() + "' AND convert(varchar(100),SDT,120) < CONVERT(varchar(100), GETDATE(), 120)"));
break;
default:
throw new RuntimeException(SystemConfig.getAppCenterDBType()+"还没增加该数据库类型的解析");
}
return bp.tools.Json.ToJson(ht);
}
/**
获取Rpt表的分析项
@return
*/
public final String DataPanelDept_GetAnalyseGroupByRpt() throws Exception {
//获取的是系统字段WFState和表单中Int类型的字段
MapAttrs mapattrs = new MapAttrs();
QueryObject qo = new QueryObject(mapattrs);
qo.AddWhere(MapAttrAttr.FK_MapData, "ND" + Integer.parseInt(this.getFK_Flow()) + "01");
qo.addAnd();
qo.AddWhereNotIn(MapAttrAttr.MyDataType, "1,4,6,7");
qo.addAnd();
qo.AddWhere(MapAttrAttr.UIVisible, true);
qo.addAnd();
qo.AddWhere(MapAttrAttr.LGType, "!=",FieldTypeS.Enum.getValue());
qo.addOrderBy(MapAttrAttr.GroupID, MapAttrAttr.Idx);
qo.DoQuery();
//增加系统表的状态
MapAttr attr = new MapAttr("ND" + Integer.parseInt(this.getFK_Flow()) + "Rpt_WFState");
mapattrs.AddEntity(attr);
return bp.tools.Json.ToJson(mapattrs.ToDataTableField());
}
public final String DataPanelDept_GetAnalyseBySpecifyField_DataSet() throws Exception {
DataSet ds = new DataSet();
String field = this.GetRequestVal("KeyOfEn");
String groupBy = this.GetRequestVal("FK_NY");
if (DataType.IsNullOrEmpty(field) || DataType.IsNullOrEmpty(groupBy))
{
throw new RuntimeException("分析条件,分析项不能为空");
}
DataTable dt;
//流程状态,只分析发起数量和完成数量
if (field.equals("WFState") == true)
{
String sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, WFState, count(OID) as Num FROM ND" + Integer.parseInt(this.getFK_Flow()) + "Rpt WHERE FK_Dept = 'ccs1' AND FK_NY> DateName(year, GetDate()) + '-00' GROUP BY FK_NY ,WFState";
dt = DBAccess.RunSQLReturnTable(sql);
}
else
{
//按照申请人的区分
String sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, FlowStarter, sum(" + field+") as Num FROM ND" + Integer.parseInt(this.getFK_Flow()) + "Rpt WHERE FK_Dept = 'ccs1' AND FK_NY> DateName(year, GetDate()) + '-00' GROUP BY FK_NY ,FlowStarter";
dt = DBAccess.RunSQLReturnTable(sql);
}
return bp.tools.Json.ToJson(ds);
}
/**
获取单个流程的本部门的数据分析
@return
*/
public final String DataPanelDept_GetAnalyseByFlowNoDept_DataSet() throws Exception {
DataSet ds = new DataSet();
//按照月份(统计的内容有发起数,完成数量,业务字段)
//发起数量
String dbSQL="";
String sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, count(WorkID) AS Num FROM WF_GenerWorkFlow WHERE WFState >1 AND FK_Dept='" + WebUser.getFK_Dept()+"' AND FK_Flow='"+this.getFK_Flow()+ "'";
switch(SystemConfig.getAppCenterDBType()){
case MySQL:
case PostgreSQL:
case UX:
dbSQL=" AND FK_NY>YEAR(CURDATE())+'-00' ";
break;
case Oracle:
case KingBaseR3:
case KingBaseR6:
dbSQL=" AND FK_NY>to_char(sysdate, 'yyyy' )+'-00' ";
break;
case MSSQL:
dbSQL=" AND FK_NY>DateName(year,GetDate())+'-00' ";
break;
default:
throw new RuntimeException(SystemConfig.getAppCenterDBType()+"还没增加该数据库类型的解析");
}
sql+=dbSQL+ " GROUP BY FK_NY ";
DataTable FlowStartByNY = DBAccess.RunSQLReturnTable(sql);
FlowStartByNY.TableName = "FlowStartByNY";
ds.Tables.add(FlowStartByNY);
//完成数量
sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState=3 AND FK_Dept='" + WebUser.getFK_Dept() + "' AND FK_Flow='" + this.getFK_Flow() + "'"+dbSQL+" GROUP BY FK_NY ";
DataTable FlowCompleteByNY = DBAccess.RunSQLReturnTable(sql);
FlowCompleteByNY.TableName = "FlowCompleteByNY";
ds.Tables.add(FlowCompleteByNY);
//按照人员
//发起数量
sql = "SELECT StarterName, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState >1 AND FK_Dept='" + WebUser.getFK_Dept() + "' AND FK_Flow='" + this.getFK_Flow() + "' GROUP BY StarterName ";
DataTable FlowStartByEmp = DBAccess.RunSQLReturnTable(sql);
FlowStartByEmp.TableName = "FlowStartByEmp";
ds.Tables.add(FlowStartByEmp);
//完成数量
sql = "SELECT StarterName, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState=3 AND FK_Dept='" + WebUser.getFK_Dept() + "' AND FK_Flow='" + this.getFK_Flow() + "' GROUP BY StarterName ";
DataTable FlowCompleteByEmp = DBAccess.RunSQLReturnTable(sql);
FlowCompleteByEmp.TableName = "FlowCompleteByEmp";
ds.Tables.add(FlowCompleteByEmp);
return bp.tools.Json.ToJson(ds);
}
/**
获取指定流程的数据统计
@return
*/
public final String DataPanelOrg_GetGenerWorksByFlowNo()
{
java.util.Hashtable ht = new java.util.Hashtable();
String dbStr = SystemConfig.getAppCenterDBVarStr();
Paras ps = new Paras();
ps.SQL = "SELECT COUNT(*) AS count,WFState FROM WF_GenerWorkFlow Where WFState >1 AND FID=0 AND FK_Flow=" + dbStr + "FK_Flow GROUP BY WFState";
ps.Add("FK_Flow", this.getFK_Flow());
DataTable dt = DBAccess.RunSQLReturnTable(ps);
int allCount = 0;
int count = 0;
int wfstate = 0;
int returnCount = 0;
for (DataRow dr : dt.Rows)
{
count = Integer.parseInt(dr.getValue(0).toString());
wfstate = Integer.parseInt(dr.getValue(1).toString());
allCount += count;
if (wfstate == WFState.Complete.getValue())
{
ht.put("GWF_CompleteCounts", count);
}
if (wfstate == WFState.ReturnSta.getValue())
{
returnCount = count;
ht.put("GWF_ReturnCounts", count);
}
if (wfstate == WFState.Delete.getValue())
{
ht.put("GWF_DeleteCounts", count);
}
}
//本部门的查询显示数量
ps.SQL = "SELECT Count(DISTINCT G.WorkID) From WF_GenerWorkFlow G,WF_GenerWorkerlist L Where G.WorkID=L.WorkID AND G.WFState=2 AND G.FK_Flow=" + dbStr + "FK_Flow AND L.IsPass=0";
ps.Add("FK_Flow", this.getFK_Flow());
int runingCount = DBAccess.RunSQLReturnValInt(ps);
ht.put("GWF_RuningCounts", runingCount + returnCount);
ht.put("GWF_Counts", allCount);
ht.put("GWF_OverCounts", DBAccess.RunSQLReturnValInt("SELECT COUNT(DISTINCT A.WorkID) FROM WF_GenerWorkFlow A,WF_GenerWorkerList B WHERE A.WorkID=B.WorkID AND A.WFState>1 AND B.IsPass=0 AND B.FK_Flow='" + this.getFK_Flow() + "' AND convert(varchar(100),B.SDT,120) < CONVERT(varchar(100), GETDATE(), 120)"));
return bp.tools.Json.ToJson(ht);
}
/**
获取单个流程的数据分析
@return
*/
public final String DataPanelOrg_GetAnalyseByFlowNo_DataSet() throws Exception {
DataSet ds = new DataSet();
//按照月份(统计的内容有发起数,完成数量,业务字段)
//发起数量
String sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, count(WorkID) AS Num FROM WF_GenerWorkFlow WHERE WFState >1 AND FK_Flow='" + this.getFK_Flow() + "' AND FK_NY>DateName(year,GetDate())+'-00' GROUP BY FK_NY ";
DataTable FlowStartByNY = DBAccess.RunSQLReturnTable(sql);
FlowStartByNY.TableName = "FlowStartByNY";
ds.Tables.add(FlowStartByNY);
//完成数量
sql = "SELECT SUBSTRING(FK_NY, 6, 2) AS FK_NY, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState=3 AND FK_Flow='" + this.getFK_Flow() + "' AND FK_NY>DateName(year,GetDate())+'-00' GROUP BY FK_NY ";
DataTable FlowCompleteByNY = DBAccess.RunSQLReturnTable(sql);
FlowCompleteByNY.TableName = "FlowCompleteByNY";
ds.Tables.add(FlowCompleteByNY);
//按照部门
//发起数量
sql = "SELECT DeptName, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState >1 AND FK_Flow='" + this.getFK_Flow() + "' GROUP BY DeptName ";
DataTable FlowStartByEmp = DBAccess.RunSQLReturnTable(sql);
FlowStartByEmp.TableName = "FlowStartByDept";
ds.Tables.add(FlowStartByEmp);
//完成数量
sql = "SELECT DeptName, count(WorkID) as Num FROM WF_GenerWorkFlow WHERE WFState=3 AND FK_Flow='" + this.getFK_Flow() + "' GROUP BY DeptName ";
DataTable FlowCompleteByEmp = DBAccess.RunSQLReturnTable(sql);
FlowCompleteByEmp.TableName = "FlowCompleteByDept";
ds.Tables.add(FlowCompleteByEmp);
return bp.tools.Json.ToJson(ds);
}
}
AtPara
package bp.da;
import java.io.Serializable;
import java.util.*;
public class AtPara implements Serializable
{
/**
工作
*/
public AtPara()throws Exception
{
}
/**
执行一个para
param para
*/
public AtPara(String para) {
if (para == null)
{
return;
}
String[] strs = para.split("[@]", -1);
for (String str : strs)
{
if (DataType.IsNullOrEmpty(str) == true)
{
continue;
}
String[] mystr = str.split("[=]", -1);
if (mystr.length == 2)
{
this.SetVal(mystr[0], mystr[1]);
}
else
{
String v = "";
for (int i = 1; i < mystr.length; i++)
{
if (i == 1)
{
v += mystr[i];
}
else
{
v += "=" + mystr[i];
}
}
this.SetVal(mystr[0], v);
}
}
}
public final void SetVal(String key, String val) {
try
{
this.getHisHT().put(key, val);
}
catch (java.lang.Exception e)
{
this.getHisHT().put(key, val);
}
}
public final String GetValStrByKey(String key) {
Object tempVar = this.getHisHT().get(key);
String str = tempVar instanceof String ? (String)tempVar : null;
if (str == null)
{
return "";
}
return str;
}
public final boolean GetValBoolenByKey(String key) {
if (this.GetValIntByKey(key) == 0)
{
return false;
}
return true;
}
public final boolean GetValBoolenByKey(String key, boolean isNullAsVal) {
String str = this.GetValStrByKey(key);
if (DataType.IsNullOrEmpty(str) == true)
{
return isNullAsVal;
}
if (str.equals("0") == true)
{
return false;
}
return true;
}
public final float GetValFloatByKey(String key)
{
return GetValFloatByKey(key, 0);
}
//ORIGINAL LINE: public float GetValFloatByKey(string key, float isNullAsVal = 0)
public final float GetValFloatByKey(String key, float isNullAsVal)
{
try
{
return Float.parseFloat(this.GetValStrByKey(key));
}
catch (java.lang.Exception e)
{
return isNullAsVal;
}
}
public final int GetValIntByKey(String key) {
return GetValIntByKey(key, 0);
}
public final int GetValIntByKey(String key, int isNullAsVal) {
String str = this.GetValStrByKey(key);
if (str.equals("undefined") || DataType.IsNullOrEmpty(str))
{
return isNullAsVal;
}
return Integer.parseInt(str);
}
public final long GetValInt64ByKey(String key)
{
try
{
return Long.parseLong(this.GetValStrByKey(key));
}
catch (java.lang.Exception e)
{
return 0;
}
}
private Hashtable _HisHT = null;
public final Hashtable<String, String> getHisHT()
{
if (_HisHT == null)
{
_HisHT = new Hashtable();
}
return _HisHT;
}
public final void setHisHT(Hashtable ht){
this._HisHT = ht;
}
public final String GenerAtParaStrs()
{
String s = "";
for (Object key : this.getHisHT().keySet())
{
s += "@" + key + "=" + this._HisHT.get(key).toString();
}
return s;
}
}
Cash
package bp.da;
import bp.difference.ContextHolderUtils;
import bp.difference.SystemConfig;
public class CashFrmTemplate {
///对实体的操作.
/**
* 放入表单
* <p>
* param frmID 表单ID
* param ds 表单模版
*
* @throws Exception
*/
public static void Put(String frmID, DataSet ds) throws Exception {
if (ds == null) return;
String json = bp.tools.Json.ToJson(ds);
ContextHolderUtils.getRedisUtils().set(false, SystemConfig.getRedisCacheKey(frmID), json);
}
/**
* 移除
* <p>
* param frmID 表单ID
*/
public static void Remove(String frmID) {
ContextHolderUtils.getRedisUtils().del(false, SystemConfig.getRedisCacheKey(frmID));
}
/**
* 获得表单DataSet模式的模版数据
* <p>
* param frmID 表单ID
*
* @return 表单模版
*/
public static DataSet GetFrmDataSetModel(String frmID) throws Exception {
Object result = ContextHolderUtils.getRedisUtils().get(false, SystemConfig.getRedisCacheKey(frmID));
if (result != null) {
DataSet ds = bp.tools.Json.ToDataSet(result.toString());
return ds;
}
return null;
}
/**
* 获得表单json模式的模版数据
* <p>
* param frmID 表单ID
*
* @return json
*/
/// 对实体的操作.
}
ChartType
package bp.da;
/**
图表类型
*/
public enum ChartType
{
/**
柱状图
*/
Histogram,
/**
丙状图
*/
Pie,
/**
折线图
*/
Line;
public static final int SIZE = java.lang.Integer.SIZE;
public int getValue()
{
return this.ordinal();
}
public static ChartType forValue(int value)
{
return values()[value];
}
}
参考资料和推荐阅读
- 暂无
欢迎阅读,各位老铁,如果对你有帮助,点个赞加个关注呗!~