package weaver.workflow.webservices;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import weaver.conn.RecordSet;
import weaver.cpt.capital.CapitalComInfo;
import weaver.crm.Maint.CustomerInfoComInfo;
import weaver.docs.category.SecCategoryComInfo;
import weaver.docs.docs.DocComInfo;
import weaver.docs.docs.DocImageManager;
import weaver.docs.senddoc.DocReceiveUnitComInfo;
import weaver.general.AttachFileUtil;
import weaver.general.BaseBean;
import weaver.general.StaticObj;
import weaver.general.TimeUtil;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo;
import weaver.hrm.report.schedulediff.HrmScheduleDiffUtil;
import weaver.hrm.resource.ResourceComInfo;
import weaver.interfaces.workflow.browser.Browser;
import weaver.interfaces.workflow.browser.BrowserBean;
import weaver.proj.Maint.ProjectInfoComInfo;
import weaver.share.ShareManager;
import weaver.soa.workflow.WorkFlowInit;
import weaver.soa.workflow.bill.BillBgOperation;
import weaver.soa.workflow.bill.BillManager;
import weaver.soa.workflow.request.Cell;
import weaver.soa.workflow.request.DetailTable;
import weaver.soa.workflow.request.DetailTableInfo;
import weaver.soa.workflow.request.Log;
import weaver.soa.workflow.request.MainTableInfo;
import weaver.soa.workflow.request.Property;
import weaver.soa.workflow.request.RequestInfo;
import weaver.soa.workflow.request.RequestService;
import weaver.soa.workflow.request.Row;
import weaver.workflow.field.BrowserComInfo;
import weaver.workflow.field.FieldComInfo;
import weaver.workflow.mode.FieldInfo;
import weaver.workflow.request.RequestCheckUser;
import weaver.workflow.request.RequestComInfo;
import weaver.workflow.request.RequestLogOperateName;
import weaver.workflow.request.WFCoadjutantManager;
import weaver.workflow.request.WFForwardManager;
import weaver.workflow.request.WFLinkInfo;
import weaver.workflow.request.WorkflowJspBean;
import weaver.workflow.workflow.WFNodeDtlFieldManager;
import weaver.workflow.workflow.WFNodeFieldMainManager;
import weaver.workflow.workflow.WFNodeFieldManager;
import weaver.workflow.workflow.WorkTypeComInfo;
import weaver.workflow.workflow.WorkflowBillComInfo;
import weaver.workflow.workflow.WorkflowComInfo;
import weaver.workflow.workflow.WorkflowRequestComInfo;
import weaver.systeminfo.SystemEnv;
public class WorkflowServiceImpl extends BaseBean implements WorkflowService {
private RequestService requestService = new RequestService();
/**
* 该方法为兼容老版本客户端,新版本请调用
* public WorkflowRequestInfo getWorkflowRequest(int requestid, int userid,int fromrequestid, int pagesize)
* 此方法推后两个版本后删除
*/
public WorkflowRequestInfo getWorkflowRequest(int requestid, int userid,int fromrequestid) {
try {
RequestInfo ri = requestService.getRequest(requestid);
if (ri != null) {
return getFromRequestInfo(ri, userid,fromrequestid, 10);
}
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
}
return null;
}
/**
* 删除流程
* @param requestid
* @return
*/
public boolean deleteRequest(int requestid,int userid) {
try {
return requestService.deleteRequest(requestid);
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
return false;
}
}
public WorkflowRequestInfo getWorkflowRequest4split(int requestid, int userid,int fromrequestid, int pagesize) {
try {
RequestInfo ri = requestService.getRequest(requestid, pagesize);
if (ri != null) {
return getFromRequestInfo(ri, userid,fromrequestid, pagesize);
}
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
}
return null;
}
public String doCreateWorkflowRequest(WorkflowRequestInfo wri, int userid) {
try {
RequestInfo ri = toRequestInfo(wri);
return requestService.createRequest(ri);
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
}
return null;
}
public String forwardWorkflowRequest(int requestid, String recipients, String remark, int userid, String clientip) {
try {
if (requestService.forwardFlow(requestid, userid, recipients, remark, clientip))
return "success";
else
return "failed";
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
}
return "error";
}
public String submitWorkflowRequest(WorkflowRequestInfo wri, int requestid, int userid, String type, String remark) {
// WorkflowDetailTableInfo[] WorkflowDetailTableInfos = wri.getWorkflowDetailTableInfos();
// System.out.println("明细表"+WorkflowDetailTableInfos.length+"张");
// for (int i = 0; i < WorkflowDetailTableInfos.length; i++) {
// WorkflowDetailTableInfo WorkflowDetailTableInfo = WorkflowDetailTableInfos[i];
// WorkflowRequestTableRecord[] WorkflowRequestTableRecords = WorkflowDetailTableInfo.getWorkflowRequestTableRecords();
// for (int j = 0; j < WorkflowRequestTableRecords.length; j++) {
// WorkflowRequestTableRecord WorkflowRequestTableRecord = WorkflowRequestTableRecords[i];
// WorkflowRequestTableField[] WorkflowRequestTableFields = WorkflowRequestTableRecord.getWorkflowRequestTableFields();
// for (int k = 0; k < WorkflowRequestTableFields.length; k++) {
// System.out.println(WorkflowRequestTableFields[i].getFieldName()+":"+WorkflowRequestTableFields[i].getFieldValue());
// }
// }
// }
String result = "error";
try {
wri.setRequestId(requestid+"");
RequestInfo ri = this.toRequestInfo(wri);
if (type.equals("submit")) {
if (requestService.nextNodeBySubmit(ri, requestid, userid, remark))
result = "success";
else
result = "failed";
} else if (type.equals("subnoback")) {
if (requestService.nextNodeBySubmit(ri, requestid, userid, remark, "0"))
result = "success";
else
result = "failed";
} else if (type.equals("subback")) {
if (requestService.nextNodeBySubmit(ri, requestid, userid, remark, "1"))
result = "success";
else
result = "failed";
} else if (type.equals("reject")) {
if (requestService.nextNodeByReject(requestid, userid, remark))
result = "success";
else
result = "failed";
}
if (!"success".equals(result)) {
String mobileSuffix = getMobileSuffix(remark);
if (mobileSuffix != null && !"".equals(mobileSuffix)) {
remark = remark.substring(0, remark.lastIndexOf(mobileSuffix));
int usertype = (getUser(userid).getLogintype()).equals("1") ? 0 : 1;
RecordSet rs = new RecordSet();
rs.executeSql("update workflow_requestlog set remark='"+remark+"' where requestid='"+requestid+"' and operator='"+userid+"' and operatortype='"+usertype+"' and logtype='1'");
}
}
} catch (Exception e) {
e.printStackTrace();
writeLog(e);
}
return result;
}
public int getHendledWorkflowRequestCount(int userid, String[] conditions) {
String select = " select distinct ";
String fields = " t1.createdate,t1.createtime,t1.creater,t1.currentnodeid,t1.currentnodetype,t1.lastoperator,t1.creatertype,t1.lastoperatortype,t1.lastoperatedate,t1.lastoperatetime,t1.requestid,t1.requestname,t1.requestlevel,t1.workflowid,t2.receivedate,t2.receivetime ";
String from = " from workflow_requestbase t1,workflow_currentoperator t2 ";
String where = " where t1.requestid=t2.requestid ";
where += " and t2.usertype = 0 and t2.userid = " + userid;
where += " and t2.isremark ='2' and t2.iscomplete=0 and t2.islasttimes=1 ";
if (condition
没有合适的资源?快使用搜索试试~ 我知道了~
泛微ecology 8的java action webservice、定时任务、jquery开发的demo,前端后端完整项目
共32个文件
jsp:19个
java:12个
chm:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 5 下载量 10 浏览量
2021-11-21
09:10:55
上传
评论 2
收藏 3.39MB RAR 举报
温馨提示
这是一个精品、经典项目,可以适用于快速二次开发,方便对接企业内部的ERP、HR、MES等平台,内容包括: 数据源 DataSource介绍建立 流程提交前执行自定义java action 计划任务 CronJob webservice建立和调用 前端控件说明 直接使用 eclipse或IDEA导入直接可使用 全开源、请放心下载
资源推荐
资源详情
资源评论
收起资源包目录
ecology_demoall.rar (32个子文件)
ecology_demoall
Ecology二次开发操作说明V0.4.chm 3.32MB
src
weaver
workflow
webservices
WorkflowService.java 12KB
WorkflowServiceUtil.java 73KB
WorkflowServiceImplXml.java 125KB
WorkflowServiceImpl.java 125KB
oatest
webservices
TestService.java 233B
TestServiceImpl.java 373B
LocalCall.java 547B
DemoUtil.java 2KB
interfaces
workflow
action
TestAction.java 2KB
TestAction.java 4KB
sms
TestSms.java 591B
schedule
TestSchedule.java 252B
demo
demo_treedata.jsp 1011B
demo_tree1.jsp 967B
demo_tab.jsp 2KB
demo_dialog.jsp 8KB
demo_tree_left1.jsp 6KB
demo_listds.jsp 5KB
demo_browser.jsp 2KB
demo_dialog1.jsp 4KB
demo_listot.jsp 5KB
demo_listall.jsp 8KB
demo_browser1.jsp 2KB
body.jsp 282B
demo_tree.jsp 1002B
demo_edittable.jsp 7KB
demo_edittableoperation.jsp 2KB
demo_listdb.jsp 5KB
demo_list.jsp 4KB
demo_layout.jsp 3KB
demo_tree_left.jsp 2KB
共 32 条
- 1
资源评论
- Tsunami.1822022-08-05感谢资源主的分享,这个资源对我来说很有用,内容描述详尽,值得借鉴。
- weixin_433109012023-09-28资源很好用,有较大的参考价值,资源不错,支持一下。
- weixin_381176512022-02-19用户下载后在一定时间内未进行评价,系统默认好评。
- my林2022-06-14用户下载后在一定时间内未进行评价,系统默认好评。
- WaterLike_Yang2022-09-02实在是宝藏资源、宝藏分享者!感谢大佬~
weijia3624
- 粉丝: 898
- 资源: 731
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功