#HTXC-1# 初始化开发环境
parent
595d93d5c8
commit
e91c46e7fb
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="lib" level="project" />
|
||||
<orderEntry type="library" name="classbean" level="project" />
|
||||
<orderEntry type="library" name="lib-new" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,36 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INNER_CLASS_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FIELD_OPTIONS">
|
||||
<value>
|
||||
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
|
||||
<option name="REQUIRED_TAGS" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE_DEPRECATED" value="false" />
|
||||
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
|
||||
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
|
||||
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
|
||||
<option name="myAdditionalJavadocTags" value="date" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ecology_htxc.iml" filepath="$PROJECT_DIR$/.idea/ecology_htxc.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.htsc.ecology</groupId>
|
||||
<artifactId>ecology-hr-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/dependency/classbean</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${basedir}/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>*.*</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<configuration>
|
||||
<compilerArgs>
|
||||
<arg>-verbose</arg>
|
||||
<arg>-bootclasspath</arg>
|
||||
<arg>${java.home}${file.separator}lib${file.separator}rt.jar${path.separator}${java.home}${file.separator}lib${file.separator}jce.jar</arg>
|
||||
<arg>-extdirs</arg>
|
||||
<arg>${basedir}${file.separator}dependency${file.separator}lib${path.separator}${basedir}${file.separator}dependency${file.separator}lib-new${path.separator}${basedir}${file.separator}dependency${file.separator}classbean${path.separator}${java.home}${file.separator}lib${path.separator}${java.home}${file.separator}lib${file.separator}ext</arg>
|
||||
</compilerArgs>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.12</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
|
||||
<finalName>ecology-hr-core</finalName>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,95 @@
|
||||
package com.customization.htsc.cus;
|
||||
|
||||
import com.engine.core.cfg.annotation.CommandDynamicProxy;
|
||||
import com.engine.core.interceptor.AbstractCommandProxy;
|
||||
import com.engine.core.interceptor.Command;
|
||||
import com.engine.htsc.trip.util.WeaverUtil;
|
||||
import com.engine.workflow.cmd.requestForm.RequestSubmitCmd;
|
||||
import com.engine.workflow.entity.requestForm.RequestOperationResultBean;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.htsc.comInfo.PropBean;
|
||||
import weaver.interfaces.htsc.cus.HTUtil;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by qlk
|
||||
*/
|
||||
@CommandDynamicProxy(target = RequestSubmitCmd.class, desc = "报销流程提交处理业务")
|
||||
public class ReiRequestSubCmd extends AbstractCommandProxy<Map<String, Object>> {
|
||||
@Override
|
||||
public Map<String, Object> execute(Command<Map<String, Object>> targetCommand) {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
//联合报销workflowid
|
||||
String unionReiWfid = Util.null2String(new PropBean().getPropName("unionReWfid"));
|
||||
String wfidstr = Util.null2String(new PropBean().getWorkflowIdsByUnNumber(unionReiWfid));
|
||||
List<String> lisWF = Arrays.asList(wfidstr.split(","));
|
||||
//获取代理对象
|
||||
RequestSubmitCmd requestSubmitCmd = (RequestSubmitCmd) targetCommand;
|
||||
HttpServletRequest request = requestSubmitCmd.getRequest();
|
||||
String requestid = Util.null2String(request.getParameter("requestid"));
|
||||
String workflowid = Util.null2String(request.getParameter("workflowid"));
|
||||
String nodetype = Util.null2String(request.getParameter("nodetype"));
|
||||
String src = Util.null2String(request.getParameter("src")); //状态
|
||||
//执行标准的业务处理
|
||||
Map<String, Object> result = nextExecute(targetCommand);
|
||||
RequestOperationResultBean resultBean = (RequestOperationResultBean) result.get("data");
|
||||
String type = Util.null2String(resultBean.getType()); //流程处理结果
|
||||
if (lisWF.contains(workflowid) && "0".equals(nodetype)) { // 联合报销创建节点
|
||||
if ("SUCCESS".equalsIgnoreCase(type)) { //成功
|
||||
if ("save".equalsIgnoreCase(src) || "dostopc".equalsIgnoreCase(src)) { //保存 终止
|
||||
Map<String, Object> paras = new HashMap<>(); //行程接口请求参数
|
||||
HTUtil htUtil = new HTUtil();
|
||||
baseBean.writeLog("unionReWfid====" + unionReiWfid);
|
||||
baseBean.writeLog("requestid====" + requestid);
|
||||
//状态
|
||||
if ("save".equalsIgnoreCase(src)) {
|
||||
paras.put("status", "DRAFT");
|
||||
} else {
|
||||
paras.put("status", "TERMINATION");
|
||||
}
|
||||
Map<String, Object> submitParams = resultBean.getSubmitParams();
|
||||
if ("-1".equals(requestid)) {
|
||||
requestid = Util.null2String(submitParams.get("requestid"));
|
||||
}
|
||||
//流程id
|
||||
paras.put("processId", requestid);
|
||||
String tableName = htUtil.getTableNameByWfid(Util.getIntValue(lisWF.get(0))); //获取表单名
|
||||
String sql = "select t3.requestname,lcbh,ngrgh,ngrq,glcclc,zfmxhj,lastname from " +tableName+" t1\n" +
|
||||
" left join hrmresource t2\n" +
|
||||
" on t1.ngr=t2.id\n" +
|
||||
" left join workflow_requestbase t3\n" +
|
||||
" on t1.requestid=t3.requestid\n" +
|
||||
" where t1.requestid="+requestid;
|
||||
RecordSet rs = new RecordSet();
|
||||
List<String> bizNos = new ArrayList<>();
|
||||
rs.execute(sql);
|
||||
String glcclc = "";
|
||||
if (rs.next()) {
|
||||
paras.put("draftTime", Util.null2String(rs.getString("ngrq")));
|
||||
paras.put("drafterId", Util.null2String(rs.getString("ngrgh")));
|
||||
paras.put("reimbursementBizNo", Util.null2String(rs.getString("lcbh")));
|
||||
paras.put("drafterName", Util.null2String(rs.getString("lastname")));
|
||||
paras.put("totalAmount", Util.null2String(rs.getString("zfmxhj")));
|
||||
paras.put("title", Util.null2String(rs.getString("requestname")));
|
||||
glcclc = WeaverUtil.getLcBhbyrequestId(rs.getString("glcclc"));
|
||||
if (!"".equals(glcclc)) {
|
||||
bizNos = Arrays.asList(glcclc.split(","));
|
||||
}
|
||||
|
||||
}
|
||||
// 关联出差流程
|
||||
paras.put("travelApplicationBizNo", bizNos);
|
||||
baseBean.writeLog("paras", "参数====" + paras);
|
||||
//调用updateReimbursement方法
|
||||
String res = htUtil.updateReimbursement(paras);
|
||||
baseBean.writeLog("res", "返回值:" + res);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -0,0 +1,227 @@
|
||||
package com.customization.htsc.integration;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.htsc.payment.util.HttpUtil;
|
||||
import com.engine.htsc.workflow.util.WorkflowUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.filter.WeaverRequest;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
import weaver.interfaces.htsc.comInfo.PropBean;
|
||||
import weaver.interfaces.htsc.util.HttpRequestUtil;
|
||||
import weaver.workflow.workflow.WorkflowComInfo;
|
||||
|
||||
import javax.ws.rs.HEAD;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class PushDataThread implements Runnable{
|
||||
|
||||
private WeaverRequest request;
|
||||
|
||||
public PushDataThread(WeaverRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* "title": "标题333444",
|
||||
* "todoid": "345678",
|
||||
* "userid": "zhangsan,suhf",
|
||||
* "qcuserid": "wangwu",
|
||||
* "qcusername": "王五",
|
||||
* "tododescribe": "用印申请123",
|
||||
* "createdate": "2016-05-26 12:23:23",
|
||||
* "receivedate": "2018-05-26 12:23:23",
|
||||
* "contenttype": "1",
|
||||
* "todostate": "0",
|
||||
* "flowstate": "已办结",
|
||||
* "links": "http://xxx.xxx.com.cn/xxxxxx",
|
||||
* "mlinks": "http://yyy.yyyy.com.cn/yyyyyy",
|
||||
* "qcuserdeptid": "445566",
|
||||
* "qcuserdeptname": "测试部门111",
|
||||
* "todocode": "XYZ111333",
|
||||
* "todotype": "我处理的"
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
PropBean pb = new PropBean();
|
||||
BaseBean bb = new BaseBean();
|
||||
WorkflowUtil workflowUtil = new WorkflowUtil();
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
String nodetype = this.request.getParameter("nodetype");
|
||||
String nodeid = this.request.getParameter("nodeid");
|
||||
String src = this.request.getParameter("src");
|
||||
String isremark = this.request.getParameter("isremark");
|
||||
|
||||
String title = this.request.getParameter("requestname");
|
||||
String todoid = this.request.getParameter("requestid");
|
||||
|
||||
String workflowid = this.request.getParameter("workflowid");
|
||||
WorkflowComInfo workflowComInfo = new WorkflowComInfo();
|
||||
String tododescribe = workflowComInfo.getWorkflowname(workflowid);
|
||||
|
||||
String userid = this.request.getParameter("f_weaver_belongto_userid");
|
||||
String usercode = resourceComInfo.getWorkcode(userid);
|
||||
|
||||
//给代理人创建已办信息
|
||||
bb.writeLog("PushDataThread getAgentInfo====="+todoid+" "+userid+" "+nodeid);
|
||||
String bagentCodes = workflowUtil.getAgentInfo(todoid,userid,nodeid);
|
||||
if(!"".equals(bagentCodes)){
|
||||
usercode += ","+bagentCodes;
|
||||
}
|
||||
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery(" select currentnodetype,creater,createdate,createtime,lastoperatedate,lastoperatetime,requestmark " +
|
||||
"from workflow_requestbase where requestid=? ",new Object[]{todoid});
|
||||
rs.next();
|
||||
String creater = Util.null2String(rs.getString("creater"));
|
||||
String createdate = Util.null2String(rs.getString("createdate"))+" "+Util.null2String(rs.getString("createtime"));;
|
||||
String receivedate = "";
|
||||
String contenttype = "1";
|
||||
String todostate = "0";
|
||||
|
||||
String qcuserid = Util.null2String(this.request.getParameter("creater"));
|
||||
if("".equals(qcuserid)){
|
||||
qcuserid = creater;
|
||||
}
|
||||
String qcusercode = resourceComInfo.getWorkcode(qcuserid);
|
||||
String qcusername = resourceComInfo.getLastname(qcuserid);
|
||||
|
||||
|
||||
String flowstate = "";
|
||||
String currentnodetype = Util.null2String(rs.getString("currentnodetype"));
|
||||
if("3".equals(currentnodetype)){
|
||||
flowstate = "已办结";
|
||||
receivedate = Util.null2String(rs.getString("lastoperatedate"))+" "+Util.null2String(rs.getString("lastoperatetime"));
|
||||
|
||||
}else {
|
||||
flowstate = "进行中";
|
||||
}
|
||||
|
||||
String oahost = pb.getPropName("OAHOST");
|
||||
String links = oahost+"workflow/request/ViewRequestForwardSPA.jsp?requestid="+todoid+"&_workflowid="+workflowid+"&f_weaver_belongto_userid="+userid;
|
||||
|
||||
String mobileHost = pb.getPropName("mobileHost");
|
||||
String mobileJumpUrl = pb.getPropName("mobileJumpUrl");
|
||||
String mlinks = mobileHost+mobileJumpUrl+"?requestid="+todoid+"&f_weaver_belongto_userid="+userid;
|
||||
|
||||
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||
String qcuserdeptid = resourceComInfo.getDepartmentID(qcuserid);
|
||||
String qcuserdeptcode = departmentComInfo.getDepartmentCode(qcuserdeptid);
|
||||
String qcuserdeptname = departmentComInfo.getDepartmentName(qcuserdeptid);
|
||||
|
||||
String todocode = Util.null2String(rs.getString("requestmark"));
|
||||
String todotype = "";
|
||||
if("submit".equals(src) || "reject".equals(src)){
|
||||
if("0".equals(nodetype)){
|
||||
todotype = "我发起的";
|
||||
}else{
|
||||
todotype = "我处理的";
|
||||
}
|
||||
|
||||
}else{
|
||||
if("1".equals(isremark)){
|
||||
todotype = "他人移交";
|
||||
}else if("8".equals(isremark) || "9".equals(isremark)){
|
||||
todotype = "通知阅读";
|
||||
}
|
||||
}
|
||||
String lstusername = workflowUtil.getUnoperators(todoid,userid);
|
||||
|
||||
Map<String,String> dataMap = new HashMap<>();
|
||||
dataMap.put("title",title);
|
||||
dataMap.put("todoid",todoid);
|
||||
dataMap.put("userid",usercode);
|
||||
dataMap.put("qcuserid",qcusercode);
|
||||
dataMap.put("qcusername",qcusername);
|
||||
dataMap.put("lstusername",lstusername);
|
||||
dataMap.put("tododescribe",tododescribe);
|
||||
dataMap.put("createdate",createdate);
|
||||
dataMap.put("receivedate",receivedate);
|
||||
dataMap.put("contenttype",contenttype);
|
||||
dataMap.put("todostate",todostate);
|
||||
dataMap.put("flowstate",flowstate);
|
||||
dataMap.put("links",links);
|
||||
dataMap.put("mlinks",mlinks);
|
||||
dataMap.put("qcuserdeptid",qcuserdeptcode);
|
||||
dataMap.put("qcuserdeptname",qcuserdeptname);
|
||||
dataMap.put("todocode",todocode);
|
||||
dataMap.put("todotype",todotype);
|
||||
|
||||
List<Map<String,String>> dataList = new ArrayList<>();
|
||||
dataList.add(dataMap);
|
||||
|
||||
Map<String,String> paramsMap = new HashMap<>();
|
||||
paramsMap.put("systemtype","HTOA");
|
||||
paramsMap.put("todojson", JSON.toJSONString(dataList));
|
||||
|
||||
String addUrl = Util.null2String(pb.getPropName("PortalAddDoneDataUrl"),"http://168.61.9.228:8080/wps/TodoRest/todo/addtodo");
|
||||
|
||||
bb.writeLog("PushDataThread addparams===="+JSON.toJSONString(paramsMap));
|
||||
bb.writeLog("PushDataThread addurl===="+addUrl);
|
||||
|
||||
String addResult = HttpUtil.postFormUrlEncode(addUrl,paramsMap);
|
||||
bb.writeLog("PushDataThread addResult===="+addResult);
|
||||
|
||||
//更新已办数据,
|
||||
dataList.clear();
|
||||
dataMap.remove("todotype");
|
||||
dataMap.remove("todostate");
|
||||
dataMap.remove("links");
|
||||
dataMap.remove("mlinks");
|
||||
dataMap.remove("receivedate");
|
||||
dataMap.remove("createdate");
|
||||
dataMap.remove("tododescribe");
|
||||
dataMap.put("userid","ALL");
|
||||
dataList.add(dataMap);
|
||||
paramsMap.put("todojson",JSON.toJSONString(dataList));
|
||||
bb.writeLog("PushDataThread updateparams===="+JSON.toJSONString(paramsMap));
|
||||
String updateUrl = Util.null2String(pb.getPropName("PortalUpdateDoneDataUrl"),"http://168.61.9.228:8080/wps/TodoRest/todo/updatetodo");
|
||||
String updateResult = HttpUtil.postFormUrlEncode(updateUrl,paramsMap);
|
||||
bb.writeLog("PushDataThread updateResult===="+updateResult);
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
HttpRequestUtil httpRequestUtil = new HttpRequestUtil();
|
||||
String url = "http://168.61.9.228:8080/wps/TodoRest/todo/addtodo";
|
||||
String params = "{\"todojson\":\"[{\\\"qcuserid\\\":\\\"011413\\\",\\\"qcusername\\\":\\\"蔡洋\\\",\\\"todostate\\\":\\\"0\\\",\\\"tododescribe\\\":\\\"总部重要事项\\\",\\\"createdate\\\":\\\"2021-03-18 17:34:24\\\",\\\"title\\\":\\\"测试门户已办\\\",\\\"userid\\\":\\\"011413\\\",\\\"contenttype\\\":\\\"1\\\",\\\"mlinks\\\":\\\"http://linkxt-test.htsc.com.cn:38080/htmoa/wxapi/wxclientmenu/7bfc8bd866a74b0788f6c205a8668877?requestid=4906903&f_weaver_belongto_userid=28302\\\",\\\"flowstate\\\":\\\"进行中\\\",\\\"qcuserdeptid\\\":\\\"ZZ001014\\\",\\\"todotype\\\":\\\"我发起的\\\",\\\"receivedate\\\":\\\"2021-03-18 17:34:59\\\",\\\"todocode\\\":\\\"申报单信20210318104848\\\",\\\"links\\\":\\\"http://168.61.8.169:8080/htoa/workflow/request/ViewRequestForwardSPA.jsp?requestid=4906903&_workflowid=24&f_weaver_belongto_userid=28302\\\",\\\"qcuserdeptname\\\":\\\"信息技术部\\\"}]\",\"systemtype\":\"oa\"}\n";
|
||||
JSONObject json = JSON.parseObject(params);
|
||||
String systemtype = json.getString("systemtype");
|
||||
String todojson = json.getString("todojson");
|
||||
Map<String,String> paramsMap = new HashMap<>();
|
||||
paramsMap.put("systemtype",systemtype);
|
||||
paramsMap.put("todojson", todojson);
|
||||
|
||||
Map<String,String> header = new HashMap<>();
|
||||
header.put("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
|
||||
System.out.println(todojson);
|
||||
String result = HttpUtil.postFormUrlEncode(url,paramsMap,header);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,207 @@
|
||||
package com.customization.htsc.integration;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.htsc.payment.util.HttpUtil;
|
||||
import com.engine.htsc.workflow.util.WorkflowUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.filter.WeaverRequest;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
import weaver.interfaces.htsc.comInfo.PropBean;
|
||||
import weaver.interfaces.htsc.util.HttpRequestUtil;
|
||||
import weaver.workflow.workflow.WorkflowComInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class PushForwardDataThread implements Runnable{
|
||||
|
||||
private WeaverRequest request;
|
||||
|
||||
public PushForwardDataThread(WeaverRequest request) {
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
/**
|
||||
* "title": "标题333444",
|
||||
* "todoid": "345678",
|
||||
* "userid": "zhangsan,suhf",
|
||||
* "qcuserid": "wangwu",
|
||||
* "qcusername": "王五",
|
||||
* "tododescribe": "用印申请123",
|
||||
* "createdate": "2016-05-26 12:23:23",
|
||||
* "receivedate": "2018-05-26 12:23:23",
|
||||
* "contenttype": "1",
|
||||
* "todostate": "0",
|
||||
* "flowstate": "已办结",
|
||||
* "links": "http://xxx.xxx.com.cn/xxxxxx",
|
||||
* "mlinks": "http://yyy.yyyy.com.cn/yyyyyy",
|
||||
* "qcuserdeptid": "445566",
|
||||
* "qcuserdeptname": "测试部门111",
|
||||
* "todocode": "XYZ111333",
|
||||
* "todotype": "我处理的"
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
PropBean pb = new PropBean();
|
||||
BaseBean bb = new BaseBean();
|
||||
WorkflowUtil workflowUtil = new WorkflowUtil();
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
String nodeid = this.request.getParameter("nodeid");
|
||||
String operate = this.request.getParameter("operate");
|
||||
|
||||
String todoid = this.request.getParameter("requestid");
|
||||
String workflowid = this.request.getParameter("workflowid");
|
||||
WorkflowComInfo workflowComInfo = new WorkflowComInfo();
|
||||
String tododescribe = workflowComInfo.getWorkflowname(workflowid);
|
||||
|
||||
String userid = this.request.getParameter("f_weaver_belongto_userid");
|
||||
String usercode = resourceComInfo.getWorkcode(userid);
|
||||
|
||||
//给代理人创建已办信息
|
||||
String bagentCodes = workflowUtil.getAgentInfo(todoid,userid,nodeid);
|
||||
if(!"".equals(bagentCodes)){
|
||||
usercode += ","+bagentCodes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery(" select requestname,creater,currentnodetype,createdate,createtime," +
|
||||
" lastoperatedate,lastoperatetime,requestmark " +
|
||||
" from workflow_requestbase where requestid=? ",new Object[]{todoid});
|
||||
rs.next();
|
||||
String title = Util.null2String(rs.getString("requestname"));
|
||||
String qcuserid = Util.null2String(rs.getString("creater"));
|
||||
String qcusercode = resourceComInfo.getWorkcode(qcuserid);
|
||||
String qcusername = resourceComInfo.getLastname(qcuserid);
|
||||
|
||||
String createdate = Util.null2String(rs.getString("createdate"))+" "+Util.null2String(rs.getString("createtime"));;
|
||||
//String receivedate = Util.null2String(rs.getString("lastoperatedate"))+" "+Util.null2String(rs.getString("lastoperatetime"));;
|
||||
String receivedate = "";
|
||||
|
||||
String contenttype = "1";
|
||||
String todostate = "0";
|
||||
|
||||
String flowstate = "";
|
||||
String currentnodetype = Util.null2String(rs.getString("currentnodetype"));
|
||||
if("3".equals(currentnodetype)){
|
||||
flowstate = "已办结";
|
||||
receivedate = Util.null2String(rs.getString("lastoperatedate"))+" "+Util.null2String(rs.getString("lastoperatetime"));;
|
||||
}else {
|
||||
flowstate = "进行中";
|
||||
}
|
||||
|
||||
String oahost = pb.getPropName("OAHOST");
|
||||
String links = oahost+"workflow/request/ViewRequestForwardSPA.jsp?requestid="+todoid+"&_workflowid="+workflowid+"&f_weaver_belongto_userid="+userid;
|
||||
|
||||
String mobileHost = pb.getPropName("mobileHost");
|
||||
String mobileJumpUrl = pb.getPropName("mobileJumpUrl");
|
||||
String mlinks = mobileHost+mobileJumpUrl+"?requestid="+todoid+"&f_weaver_belongto_userid="+userid;
|
||||
|
||||
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||
String qcuserdeptid = resourceComInfo.getDepartmentID(qcuserid);
|
||||
String qcuserdeptcode = departmentComInfo.getDepartmentCode(qcuserdeptid);
|
||||
String qcuserdeptname = departmentComInfo.getDepartmentName(qcuserdeptid);
|
||||
|
||||
String todocode = Util.null2String(rs.getString("requestmark"));
|
||||
String todotype = "我处理的";
|
||||
|
||||
|
||||
String lstusername = workflowUtil.getUnoperators(todoid,userid);
|
||||
|
||||
Map<String,String> dataMap = new HashMap<>();
|
||||
dataMap.put("title",title);
|
||||
dataMap.put("todoid",todoid);
|
||||
dataMap.put("userid",usercode);
|
||||
dataMap.put("qcuserid",qcusercode);
|
||||
dataMap.put("qcusername",qcusername);
|
||||
dataMap.put("lstusername",lstusername);
|
||||
dataMap.put("tododescribe",tododescribe);
|
||||
dataMap.put("createdate",createdate);
|
||||
dataMap.put("receivedate",receivedate);
|
||||
dataMap.put("contenttype",contenttype);
|
||||
dataMap.put("todostate",todostate);
|
||||
dataMap.put("flowstate",flowstate);
|
||||
dataMap.put("links",links);
|
||||
dataMap.put("mlinks",mlinks);
|
||||
dataMap.put("qcuserdeptid",qcuserdeptcode);
|
||||
dataMap.put("qcuserdeptname",qcuserdeptname);
|
||||
dataMap.put("todocode",todocode);
|
||||
dataMap.put("todotype",todotype);
|
||||
|
||||
List<Map<String,String>> dataList = new ArrayList<>();
|
||||
dataList.add(dataMap);
|
||||
|
||||
Map<String,String> paramsMap = new HashMap<>();
|
||||
paramsMap.put("systemtype","HTOA");
|
||||
paramsMap.put("todojson", JSON.toJSONString(dataList));
|
||||
|
||||
String addUrl = Util.null2String(pb.getPropName("PortalAddDoneDataUrl"),"http://168.61.9.228:8080/wps/TodoRest/todo/addtodo");
|
||||
|
||||
bb.writeLog("PushForwardDataThread addparams===="+JSON.toJSONString(paramsMap));
|
||||
bb.writeLog("PushForwardDataThread addurl===="+addUrl);
|
||||
|
||||
String addResult = HttpUtil.postFormUrlEncode(addUrl,paramsMap);
|
||||
bb.writeLog("PushForwardDataThread addResult===="+addResult);
|
||||
|
||||
//更新已办数据,
|
||||
dataList.clear();
|
||||
dataMap.remove("todotype");
|
||||
dataMap.remove("todostate");
|
||||
dataMap.remove("links");
|
||||
dataMap.remove("mlinks");
|
||||
dataMap.remove("receivedate");
|
||||
dataMap.remove("createdate");
|
||||
dataMap.remove("tododescribe");
|
||||
dataMap.put("userid","ALL");
|
||||
dataList.add(dataMap);
|
||||
paramsMap.put("todojson",JSON.toJSONString(dataList));
|
||||
String updateUrl = Util.null2String(pb.getPropName("PortalUpdateDoneDataUrl"),"http://168.61.9.228:8080/wps/TodoRest/todo/updatetodo");
|
||||
String updateResult = HttpUtil.postFormUrlEncode(updateUrl,paramsMap);
|
||||
bb.writeLog("PushForwardDataThread updateResult===="+updateResult);
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
HttpRequestUtil httpRequestUtil = new HttpRequestUtil();
|
||||
String url = "http://168.61.9.228:8080/wps/TodoRest/todo/addtodo";
|
||||
String params = "{\"todojson\":\"[{\\\"qcuserid\\\":\\\"011413\\\",\\\"qcusername\\\":\\\"蔡洋\\\",\\\"todostate\\\":\\\"0\\\",\\\"tododescribe\\\":\\\"总部重要事项\\\",\\\"createdate\\\":\\\"2021-03-18 17:34:24\\\",\\\"title\\\":\\\"测试门户已办\\\",\\\"userid\\\":\\\"011413\\\",\\\"contenttype\\\":\\\"1\\\",\\\"mlinks\\\":\\\"http://linkxt-test.htsc.com.cn:38080/htmoa/wxapi/wxclientmenu/7bfc8bd866a74b0788f6c205a8668877?requestid=4906903&f_weaver_belongto_userid=28302\\\",\\\"flowstate\\\":\\\"进行中\\\",\\\"qcuserdeptid\\\":\\\"ZZ001014\\\",\\\"todotype\\\":\\\"我发起的\\\",\\\"receivedate\\\":\\\"2021-03-18 17:34:59\\\",\\\"todocode\\\":\\\"申报单信20210318104848\\\",\\\"links\\\":\\\"http://168.61.8.169:8080/htoa/workflow/request/ViewRequestForwardSPA.jsp?requestid=4906903&_workflowid=24&f_weaver_belongto_userid=28302\\\",\\\"qcuserdeptname\\\":\\\"信息技术部\\\"}]\",\"systemtype\":\"oa\"}\n";
|
||||
JSONObject json = JSON.parseObject(params);
|
||||
String systemtype = json.getString("systemtype");
|
||||
String todojson = json.getString("todojson");
|
||||
Map<String,String> paramsMap = new HashMap<>();
|
||||
paramsMap.put("systemtype",systemtype);
|
||||
paramsMap.put("todojson", todojson);
|
||||
|
||||
Map<String,String> header = new HashMap<>();
|
||||
header.put("Content-Type","application/x-www-form-urlencoded;charset=utf-8");
|
||||
System.out.println(todojson);
|
||||
String result = HttpUtil.postFormUrlEncode(url,paramsMap,header);
|
||||
System.out.println(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.customization.htsc.payment;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.core.cfg.annotation.CommandDynamicProxy;
|
||||
import com.engine.core.interceptor.AbstractCommandProxy;
|
||||
import com.engine.core.interceptor.Command;
|
||||
import com.engine.htsc.payment.enums.ReiState;
|
||||
import com.engine.htsc.trip.util.WeaverUtil;
|
||||
import com.engine.workflow.cmd.requestForm.RequestSubmitCmd;
|
||||
import com.engine.workflow.entity.requestForm.RequestOperationResultBean;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.htsc.comInfo.PropBean;
|
||||
import weaver.interfaces.htsc.cus.HTUtil;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* k1810012
|
||||
* 总部差旅报销,保存或删除时行程时同步行程状态
|
||||
* DRAFT: 保存
|
||||
* TERMINATION: 终止
|
||||
*/
|
||||
@CommandDynamicProxy(target = RequestSubmitCmd.class, desc = "总部报销保存时提交行程信息")
|
||||
public class SaveTableSendTravelReiData2HT extends AbstractCommandProxy<Map<String, Object>> {
|
||||
|
||||
private final Log log = LogFactory.getLog(SaveTableSendTravelReiData2HT.class);
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(Command<Map<String, Object>> targetCommand) {
|
||||
RequestSubmitCmd requestSubmitCmd = (RequestSubmitCmd) targetCommand;
|
||||
HttpServletRequest request = requestSubmitCmd.getRequest();
|
||||
PropBean pp = new PropBean();
|
||||
//资金业务付款 workflowid
|
||||
String headTravelWorkflowId = pp.getPropName("HeadTravelWorkflowId");
|
||||
//获取代理对象
|
||||
String requestid = Util.null2String(request.getParameter("requestid"));
|
||||
String workflowid = Util.null2String(request.getParameter("workflowid"));
|
||||
String nodetype = Util.null2String(request.getParameter("nodetype"));
|
||||
String src = Util.null2String(request.getParameter("src")); //状态
|
||||
//执行标准的业务处理
|
||||
Map<String, Object> result = nextExecute(targetCommand);
|
||||
RequestOperationResultBean resultBean = (RequestOperationResultBean) result.get("data");
|
||||
//流程处理结果
|
||||
String type = Util.null2String(resultBean.getType());
|
||||
|
||||
if (StringUtils.isNotBlank(headTravelWorkflowId)
|
||||
&& workflowid.equals(headTravelWorkflowId)
|
||||
&& "0".equals(nodetype)) { // 总部报销创建节点
|
||||
if ("SUCCESS".equalsIgnoreCase(type)) { //成功
|
||||
if ("save".equalsIgnoreCase(src) || "dostopc".equalsIgnoreCase(src)) { //保存 终止
|
||||
String code = "";
|
||||
log.info(String.format("总部差旅拦截保存或删除事件:workflowid:%s;src:%s;nodetype:%s", workflowid, src, nodetype));
|
||||
//状态
|
||||
if ("save".equalsIgnoreCase(src)) {
|
||||
code = "DRAFT"; //保存
|
||||
} else {
|
||||
code = "TERMINATION"; //终止
|
||||
}
|
||||
//保存的requestid未生成
|
||||
Map<String, Object> submitParams = resultBean.getSubmitParams();
|
||||
if ("-1".equals(requestid)) {
|
||||
requestid = Util.null2String(submitParams.get("requestid"));
|
||||
}
|
||||
//流程id
|
||||
HTUtil ht = new HTUtil();
|
||||
String tableName = ht.getTableNameByWfid(Integer.parseInt(workflowid));
|
||||
Map<String, Object> reiReq = getDataToUpdate(tableName, requestid, code);
|
||||
log.info("总部差旅报销流程,同步给华泰差旅报销信息,入参" + JSONObject.toJSONString(reiReq));
|
||||
String resp = ht.updateReimbursement(reiReq);
|
||||
log.info("总部差旅报销流程,同步给华泰差旅报销信息,返回值" + resp);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成数据
|
||||
*
|
||||
* @return map
|
||||
*/
|
||||
private Map<String, Object> getDataToUpdate(String tableName, String requestId, String code) {
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
String sql = "select t1.lcbh,t1.ngrgh,t1.ngsj,t1.glcclc,t1.zfmxhj,t2.lastname,t3.REQUESTNAME\n" +
|
||||
"from " + tableName + " t1\n" +
|
||||
"left join hrmresource t2\n" +
|
||||
"on t1.ngr = t2.id\n" +
|
||||
"left join workflow_requestbase t3\n" +
|
||||
"on t1.REQUESTID=t3.REQUESTID\n" +
|
||||
"where t1.requestid =?";
|
||||
rs.executeQuery(sql, requestId);
|
||||
|
||||
Map<String, Object> para = new HashMap<>();
|
||||
if (rs.next()) {
|
||||
para.put("draftTime", Util.null2String(rs.getString("ngsj")));
|
||||
para.put("drafterId", Util.null2String(rs.getString("ngrgh")));
|
||||
para.put("reimbursementBizNo", Util.null2String(rs.getString("lcbh")));
|
||||
para.put("drafterName", Util.null2String(rs.getString("lastname")));
|
||||
para.put("totalAmount", Util.null2String(rs.getString("zfmxhj")));
|
||||
para.put("title", Util.null2String(rs.getString("REQUESTNAME")));
|
||||
para.put("processId", requestId);
|
||||
para.put("travelApplicationBizNo", splitTravelBizNo(rs.getString("glcclc")));
|
||||
para.put("status", code);
|
||||
}
|
||||
|
||||
return para;
|
||||
}
|
||||
|
||||
private List<String> splitTravelBizNo(String glcclc) {
|
||||
List<String> bizNos = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(glcclc)) {
|
||||
bizNos = Arrays.stream(glcclc.split(",")).map(
|
||||
i -> "出差申请" + i
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
return bizNos;
|
||||
}
|
||||
}
|
@ -0,0 +1,459 @@
|
||||
#
|
||||
# OWASP Enterprise Security API (ESAPI) Properties file -- PRODUCTION Version
|
||||
#
|
||||
# This file is part of the Open Web Application Security Project (OWASP)
|
||||
# Enterprise Security API (ESAPI) project. For details, please see
|
||||
# http://www.owasp.org/index.php/ESAPI.
|
||||
#
|
||||
# Copyright (c) 2008,2009 - The OWASP Foundation
|
||||
#
|
||||
# DISCUSS: This may cause a major backwards compatibility issue, etc. but
|
||||
# from a name space perspective, we probably should have prefaced
|
||||
# all the property names with ESAPI or at least OWASP. Otherwise
|
||||
# there could be problems is someone loads this properties file into
|
||||
# the System properties. We could also put this file into the
|
||||
# esapi.jar file (perhaps as a ResourceBundle) and then allow an external
|
||||
# ESAPI properties be defined that would overwrite these defaults.
|
||||
# That keeps the application's properties relatively simple as usually
|
||||
# they will only want to override a few properties. If looks like we
|
||||
# already support multiple override levels of this in the
|
||||
# DefaultSecurityConfiguration class, but I'm suggesting placing the
|
||||
# defaults in the esapi.jar itself. That way, if the jar is signed,
|
||||
# we could detect if those properties had been tampered with. (The
|
||||
# code to check the jar signatures is pretty simple... maybe 70-90 LOC,
|
||||
# but off course there is an execution penalty (similar to the way
|
||||
# that the separate sunjce.jar used to be when a class from it was
|
||||
# first loaded). Thoughts?
|
||||
###############################################################################
|
||||
#
|
||||
# WARNING: Operating system protection should be used to lock down the .esapi
|
||||
# resources directory and all the files inside and all the directories all the
|
||||
# way up to the root directory of the file system. Note that if you are using
|
||||
# file-based implementations, that some files may need to be read-write as they
|
||||
# get updated dynamically.
|
||||
#
|
||||
# Before using, be sure to update the MasterKey and MasterSalt as described below.
|
||||
# N.B.: If you had stored data that you have previously encrypted with ESAPI 1.4,
|
||||
# you *must* FIRST decrypt it using ESAPI 1.4 and then (if so desired)
|
||||
# re-encrypt it with ESAPI 2.0. If you fail to do this, you will NOT be
|
||||
# able to decrypt your data with ESAPI 2.0.
|
||||
#
|
||||
# YOU HAVE BEEN WARNED!!! More details are in the ESAPI 2.0 Release Notes.
|
||||
#
|
||||
#===========================================================================
|
||||
# ESAPI Configuration
|
||||
#
|
||||
# If true, then print all the ESAPI properties set here when they are loaded.
|
||||
# If false, they are not printed. Useful to reduce output when running JUnit tests.
|
||||
# If you need to troubleshoot a properties related problem, turning this on may help.
|
||||
# This is 'false' in the src/test/resources/.esapi version. It is 'true' by
|
||||
# default for reasons of backward compatibility with earlier ESAPI versions.
|
||||
ESAPI.printProperties=true
|
||||
|
||||
# ESAPI is designed to be easily extensible. You can use the reference implementation
|
||||
# or implement your own providers to take advantage of your enterprise's security
|
||||
# infrastructure. The functions in ESAPI are referenced using the ESAPI locator, like:
|
||||
#
|
||||
# String ciphertext =
|
||||
# ESAPI.encryptor().encrypt("Secret message"); // Deprecated in 2.0
|
||||
# CipherText cipherText =
|
||||
# ESAPI.encryptor().encrypt(new PlainText("Secret message")); // Preferred
|
||||
#
|
||||
# Below you can specify the classname for the provider that you wish to use in your
|
||||
# application. The only requirement is that it implement the appropriate ESAPI interface.
|
||||
# This allows you to switch security implementations in the future without rewriting the
|
||||
# entire application.
|
||||
#
|
||||
# ExperimentalAccessController requires ESAPI-AccessControlPolicy.xml in .esapi directory
|
||||
ESAPI.AccessControl=org.owasp.esapi.reference.DefaultAccessController
|
||||
# FileBasedAuthenticator requires users.txt file in .esapi directory
|
||||
ESAPI.Authenticator=org.owasp.esapi.reference.FileBasedAuthenticator
|
||||
ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder
|
||||
ESAPI.Encryptor=org.owasp.esapi.reference.crypto.JavaEncryptor
|
||||
|
||||
ESAPI.Executor=org.owasp.esapi.reference.DefaultExecutor
|
||||
ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities
|
||||
ESAPI.IntrusionDetector=org.owasp.esapi.reference.DefaultIntrusionDetector
|
||||
# Log4JFactory Requires log4j.xml or log4j.properties in classpath - http://www.laliluna.de/log4j-tutorial.html
|
||||
ESAPI.Logger=org.owasp.esapi.reference.Log4JLogFactory
|
||||
#ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory
|
||||
ESAPI.Randomizer=org.owasp.esapi.reference.DefaultRandomizer
|
||||
ESAPI.Validator=org.owasp.esapi.reference.DefaultValidator
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Authenticator
|
||||
#
|
||||
Authenticator.AllowedLoginAttempts=3
|
||||
Authenticator.MaxOldPasswordHashes=13
|
||||
Authenticator.UsernameParameterName=username
|
||||
Authenticator.PasswordParameterName=password
|
||||
# RememberTokenDuration (in days)
|
||||
Authenticator.RememberTokenDuration=14
|
||||
# Session Timeouts (in minutes)
|
||||
Authenticator.IdleTimeoutDuration=20
|
||||
Authenticator.AbsoluteTimeoutDuration=120
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Encoder
|
||||
#
|
||||
# ESAPI canonicalizes input before validation to prevent bypassing filters with encoded attacks.
|
||||
# Failure to canonicalize input is a very common mistake when implementing validation schemes.
|
||||
# Canonicalization is automatic when using the ESAPI Validator, but you can also use the
|
||||
# following code to canonicalize data.
|
||||
#
|
||||
# ESAPI.Encoder().canonicalize( "%22hello world"" );
|
||||
#
|
||||
# Multiple encoding is when a single encoding format is applied multiple times. Allowing
|
||||
# multiple encoding is strongly discouraged.
|
||||
Encoder.AllowMultipleEncoding=false
|
||||
|
||||
# Mixed encoding is when multiple different encoding formats are applied, or when
|
||||
# multiple formats are nested. Allowing multiple encoding is strongly discouraged.
|
||||
Encoder.AllowMixedEncoding=false
|
||||
|
||||
# The default list of codecs to apply when canonicalizing untrusted data. The list should include the codecs
|
||||
# for all downstream interpreters or decoders. For example, if the data is likely to end up in a URL, HTML, or
|
||||
# inside JavaScript, then the list of codecs below is appropriate. The order of the list is not terribly important.
|
||||
Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
|
||||
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Encryption
|
||||
#
|
||||
# The ESAPI Encryptor provides basic cryptographic functions with a simplified API.
|
||||
# To get started, generate a new key using java -classpath esapi.jar org.owasp.esapi.reference.crypto.JavaEncryptor
|
||||
# There is not currently any support for key rotation, so be careful when changing your key and salt as it
|
||||
# will invalidate all signed, encrypted, and hashed data.
|
||||
#
|
||||
# WARNING: Not all combinations of algorithms and key lengths are supported.
|
||||
# If you choose to use a key length greater than 128, you MUST download the
|
||||
# unlimited strength policy files and install in the lib directory of your JRE/JDK.
|
||||
# See http://java.sun.com/javase/downloads/index.jsp for more information.
|
||||
#
|
||||
# Backward compatibility with ESAPI Java 1.4 is supported by the two deprecated API
|
||||
# methods, Encryptor.encrypt(String) and Encryptor.decrypt(String). However, whenever
|
||||
# possible, these methods should be avoided as they use ECB cipher mode, which in almost
|
||||
# all circumstances a poor choice because of it's weakness. CBC cipher mode is the default
|
||||
# for the new Encryptor encrypt / decrypt methods for ESAPI Java 2.0. In general, you
|
||||
# should only use this compatibility setting if you have persistent data encrypted with
|
||||
# version 1.4 and even then, you should ONLY set this compatibility mode UNTIL
|
||||
# you have decrypted all of your old encrypted data and then re-encrypted it with
|
||||
# ESAPI 2.0 using CBC mode. If you have some reason to mix the deprecated 1.4 mode
|
||||
# with the new 2.0 methods, make sure that you use the same cipher algorithm for both
|
||||
# (256-bit AES was the default for 1.4; 128-bit is the default for 2.0; see below for
|
||||
# more details.) Otherwise, you will have to use the new 2.0 encrypt / decrypt methods
|
||||
# where you can specify a SecretKey. (Note that if you are using the 256-bit AES,
|
||||
# that requires downloading the special jurisdiction policy files mentioned above.)
|
||||
#
|
||||
# ***** IMPORTANT: Do NOT forget to replace these with your own values! *****
|
||||
# To calculate these values, you can run:
|
||||
# java -classpath esapi.jar org.owasp.esapi.reference.crypto.JavaEncryptor
|
||||
#
|
||||
#Encryptor.MasterKey=
|
||||
#Encryptor.MasterSalt=
|
||||
|
||||
# Provides the default JCE provider that ESAPI will "prefer" for its symmetric
|
||||
# encryption and hashing. (That is it will look to this provider first, but it
|
||||
# will defer to other providers if the requested algorithm is not implemented
|
||||
# by this provider.) If left unset, ESAPI will just use your Java VM's current
|
||||
# preferred JCE provider, which is generally set in the file
|
||||
# "$JAVA_HOME/jre/lib/security/java.security".
|
||||
#
|
||||
# The main intent of this is to allow ESAPI symmetric encryption to be
|
||||
# used with a FIPS 140-2 compliant crypto-module. For details, see the section
|
||||
# "Using ESAPI Symmetric Encryption with FIPS 140-2 Cryptographic Modules" in
|
||||
# the ESAPI 2.0 Symmetric Encryption User Guide, at:
|
||||
# http://owasp-esapi-java.googlecode.com/svn/trunk/documentation/esapi4java-core-2.0-symmetric-crypto-user-guide.html
|
||||
# However, this property also allows you to easily use an alternate JCE provider
|
||||
# such as "Bouncy Castle" without having to make changes to "java.security".
|
||||
# See Javadoc for SecurityProviderLoader for further details. If you wish to use
|
||||
# a provider that is not known to SecurityProviderLoader, you may specify the
|
||||
# fully-qualified class name of the JCE provider class that implements
|
||||
# java.security.Provider. If the name contains a '.', this is interpreted as
|
||||
# a fully-qualified class name that implements java.security.Provider.
|
||||
#
|
||||
# NOTE: Setting this property has the side-effect of changing it in your application
|
||||
# as well, so if you are using JCE in your application directly rather than
|
||||
# through ESAPI (you wouldn't do that, would you? ;-), it will change the
|
||||
# preferred JCE provider there as well.
|
||||
#
|
||||
# Default: Keeps the JCE provider set to whatever JVM sets it to.
|
||||
Encryptor.PreferredJCEProvider=
|
||||
|
||||
# AES is the most widely used and strongest encryption algorithm. This
|
||||
# should agree with your Encryptor.CipherTransformation property.
|
||||
# By default, ESAPI Java 1.4 uses "PBEWithMD5AndDES" and which is
|
||||
# very weak. It is essentially a password-based encryption key, hashed
|
||||
# with MD5 around 1K times and then encrypted with the weak DES algorithm
|
||||
# (56-bits) using ECB mode and an unspecified padding (it is
|
||||
# JCE provider specific, but most likely "NoPadding"). However, 2.0 uses
|
||||
# "AES/CBC/PKCSPadding". If you want to change these, change them here.
|
||||
# Warning: This property does not control the default reference implementation for
|
||||
# ESAPI 2.0 using JavaEncryptor. Also, this property will be dropped
|
||||
# in the future.
|
||||
# @deprecated
|
||||
Encryptor.EncryptionAlgorithm=AES
|
||||
# For ESAPI Java 2.0 - New encrypt / decrypt methods use this.
|
||||
Encryptor.CipherTransformation=AES/CBC/PKCS5Padding
|
||||
|
||||
# Applies to ESAPI 2.0 and later only!
|
||||
# Comma-separated list of cipher modes that provide *BOTH*
|
||||
# confidentiality *AND* message authenticity. (NIST refers to such cipher
|
||||
# modes as "combined modes" so that's what we shall call them.) If any of these
|
||||
# cipher modes are used then no MAC is calculated and stored
|
||||
# in the CipherText upon encryption. Likewise, if one of these
|
||||
# cipher modes is used with decryption, no attempt will be made
|
||||
# to validate the MAC contained in the CipherText object regardless
|
||||
# of whether it contains one or not. Since the expectation is that
|
||||
# these cipher modes support support message authenticity already,
|
||||
# injecting a MAC in the CipherText object would be at best redundant.
|
||||
#
|
||||
# Note that as of JDK 1.5, the SunJCE provider does not support *any*
|
||||
# of these cipher modes. Of these listed, only GCM and CCM are currently
|
||||
# NIST approved. YMMV for other JCE providers. E.g., Bouncy Castle supports
|
||||
# GCM and CCM with "NoPadding" mode, but not with "PKCS5Padding" or other
|
||||
# padding modes.
|
||||
Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC
|
||||
|
||||
# Applies to ESAPI 2.0 and later only!
|
||||
# Additional cipher modes allowed for ESAPI 2.0 encryption. These
|
||||
# cipher modes are in _addition_ to those specified by the property
|
||||
# 'Encryptor.cipher_modes.combined_modes'.
|
||||
# Note: We will add support for streaming modes like CFB & OFB once
|
||||
# we add support for 'specified' to the property 'Encryptor.ChooseIVMethod'
|
||||
# (probably in ESAPI 2.1).
|
||||
# DISCUSS: Better name?
|
||||
Encryptor.cipher_modes.additional_allowed=CBC
|
||||
|
||||
# 128-bit is almost always sufficient and appears to be more resistant to
|
||||
# related key attacks than is 256-bit AES. Use '_' to use default key size
|
||||
# for cipher algorithms (where it makes sense because the algorithm supports
|
||||
# a variable key size). Key length must agree to what's provided as the
|
||||
# cipher transformation, otherwise this will be ignored after logging a
|
||||
# warning.
|
||||
#
|
||||
# NOTE: This is what applies BOTH ESAPI 1.4 and 2.0. See warning above about mixing!
|
||||
Encryptor.EncryptionKeyLength=128
|
||||
|
||||
# Because 2.0 uses CBC mode by default, it requires an initialization vector (IV).
|
||||
# (All cipher modes except ECB require an IV.) There are two choices: we can either
|
||||
# use a fixed IV known to both parties or allow ESAPI to choose a random IV. While
|
||||
# the IV does not need to be hidden from adversaries, it is important that the
|
||||
# adversary not be allowed to choose it. Also, random IVs are generally much more
|
||||
# secure than fixed IVs. (In fact, it is essential that feed-back cipher modes
|
||||
# such as CFB and OFB use a different IV for each encryption with a given key so
|
||||
# in such cases, random IVs are much preferred. By default, ESAPI 2.0 uses random
|
||||
# IVs. If you wish to use 'fixed' IVs, set 'Encryptor.ChooseIVMethod=fixed' and
|
||||
# uncomment the Encryptor.fixedIV.
|
||||
#
|
||||
# Valid values: random|fixed|specified 'specified' not yet implemented; planned for 2.1
|
||||
Encryptor.ChooseIVMethod=random
|
||||
# If you choose to use a fixed IV, then you must place a fixed IV here that
|
||||
# is known to all others who are sharing your secret key. The format should
|
||||
# be a hex string that is the same length as the cipher block size for the
|
||||
# cipher algorithm that you are using. The following is an *example* for AES
|
||||
# from an AES test vector for AES-128/CBC as described in:
|
||||
# NIST Special Publication 800-38A (2001 Edition)
|
||||
# "Recommendation for Block Cipher Modes of Operation".
|
||||
# (Note that the block size for AES is 16 bytes == 128 bits.)
|
||||
#
|
||||
Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f
|
||||
|
||||
# Whether or not CipherText should use a message authentication code (MAC) with it.
|
||||
# This prevents an adversary from altering the IV as well as allowing a more
|
||||
# fool-proof way of determining the decryption failed because of an incorrect
|
||||
# key being supplied. This refers to the "separate" MAC calculated and stored
|
||||
# in CipherText, not part of any MAC that is calculated as a result of a
|
||||
# "combined mode" cipher mode.
|
||||
#
|
||||
# If you are using ESAPI with a FIPS 140-2 cryptographic module, you *must* also
|
||||
# set this property to false.
|
||||
Encryptor.CipherText.useMAC=true
|
||||
|
||||
# Whether or not the PlainText object may be overwritten and then marked
|
||||
# eligible for garbage collection. If not set, this is still treated as 'true'.
|
||||
Encryptor.PlainText.overwrite=true
|
||||
|
||||
# Do not use DES except in a legacy situations. 56-bit is way too small key size.
|
||||
#Encryptor.EncryptionKeyLength=56
|
||||
#Encryptor.EncryptionAlgorithm=DES
|
||||
|
||||
# TripleDES is considered strong enough for most purposes.
|
||||
# Note: There is also a 112-bit version of DESede. Using the 168-bit version
|
||||
# requires downloading the special jurisdiction policy from Sun.
|
||||
#Encryptor.EncryptionKeyLength=168
|
||||
#Encryptor.EncryptionAlgorithm=DESede
|
||||
|
||||
Encryptor.HashAlgorithm=SHA-512
|
||||
Encryptor.HashIterations=1024
|
||||
Encryptor.DigitalSignatureAlgorithm=SHA1withDSA
|
||||
Encryptor.DigitalSignatureKeyLength=1024
|
||||
Encryptor.RandomAlgorithm=SHA1PRNG
|
||||
Encryptor.CharacterEncoding=UTF-8
|
||||
|
||||
# This is the Pseudo Random Function (PRF) that ESAPI's Key Derivation Function
|
||||
# (KDF) normally uses. Note this is *only* the PRF used for ESAPI's KDF and
|
||||
# *not* what is used for ESAPI's MAC. (Currently, HmacSHA1 is always used for
|
||||
# the MAC, mostly to keep the overall size at a minimum.)
|
||||
#
|
||||
# Currently supported choices for JDK 1.5 and 1.6 are:
|
||||
# HmacSHA1 (160 bits), HmacSHA256 (256 bits), HmacSHA384 (384 bits), and
|
||||
# HmacSHA512 (512 bits).
|
||||
# Note that HmacMD5 is *not* supported for the PRF used by the KDF even though
|
||||
# the JDKs support it. See the ESAPI 2.0 Symmetric Encryption User Guide
|
||||
# further details.
|
||||
Encryptor.KDF.PRF=HmacSHA256
|
||||
#===========================================================================
|
||||
# ESAPI HttpUtilties
|
||||
#
|
||||
# The HttpUtilities provide basic protections to HTTP requests and responses. Primarily these methods
|
||||
# protect against malicious data from attackers, such as unprintable characters, escaped characters,
|
||||
# and other simple attacks. The HttpUtilities also provides utility methods for dealing with cookies,
|
||||
# headers, and CSRF tokens.
|
||||
#
|
||||
# Default file upload location (remember to escape backslashes with \\)
|
||||
HttpUtilities.UploadDir=C:\\ESAPI\\testUpload
|
||||
HttpUtilities.UploadTempDir=C:\\temp
|
||||
# Force flags on cookies, if you use HttpUtilities to set cookies
|
||||
HttpUtilities.ForceHttpOnlySession=false
|
||||
HttpUtilities.ForceSecureSession=false
|
||||
HttpUtilities.ForceHttpOnlyCookies=true
|
||||
HttpUtilities.ForceSecureCookies=true
|
||||
# Maximum size of HTTP headers
|
||||
HttpUtilities.MaxHeaderSize=4096
|
||||
# File upload configuration
|
||||
HttpUtilities.ApprovedUploadExtensions=.zip,.pdf,.doc,.docx,.ppt,.pptx,.tar,.gz,.tgz,.rar,.war,.jar,.ear,.xls,.rtf,.properties,.java,.class,.txt,.xml,.jsp,.jsf,.exe,.dll
|
||||
HttpUtilities.MaxUploadFileBytes=500000000
|
||||
# Using UTF-8 throughout your stack is highly recommended. That includes your database driver,
|
||||
# container, and any other technologies you may be using. Failure to do this may expose you
|
||||
# to Unicode transcoding injection attacks. Use of UTF-8 does not hinder internationalization.
|
||||
HttpUtilities.ResponseContentType=text/html; charset=UTF-8
|
||||
# This is the name of the cookie used to represent the HTTP session
|
||||
# Typically this will be the default "JSESSIONID"
|
||||
HttpUtilities.HttpSessionIdName=JSESSIONID
|
||||
|
||||
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Executor
|
||||
# CHECKME - This should be made OS independent. Don't use unsafe defaults.
|
||||
# # Examples only -- do NOT blindly copy!
|
||||
# For Windows:
|
||||
# Executor.WorkingDirectory=C:\\Windows\\Temp
|
||||
# Executor.ApprovedExecutables=C:\\Windows\\System32\\cmd.exe,C:\\Windows\\System32\\runas.exe
|
||||
# For *nux, MacOS:
|
||||
# Executor.WorkingDirectory=/tmp
|
||||
# Executor.ApprovedExecutables=/bin/bash
|
||||
Executor.WorkingDirectory=
|
||||
Executor.ApprovedExecutables=
|
||||
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Logging
|
||||
# Set the application name if these logs are combined with other applications
|
||||
Logger.ApplicationName=ExampleApplication
|
||||
# If you use an HTML log viewer that does not properly HTML escape log data, you can set LogEncodingRequired to true
|
||||
Logger.LogEncodingRequired=false
|
||||
# Determines whether ESAPI should log the application name. This might be clutter in some single-server/single-app environments.
|
||||
Logger.LogApplicationName=true
|
||||
# Determines whether ESAPI should log the server IP and port. This might be clutter in some single-server environments.
|
||||
Logger.LogServerIP=true
|
||||
# LogFileName, the name of the logging file. Provide a full directory path (e.g., C:\\ESAPI\\ESAPI_logging_file) if you
|
||||
# want to place it in a specific directory.
|
||||
Logger.LogFileName=ESAPI_logging_file
|
||||
# MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)
|
||||
Logger.MaxLogFileSize=10000000
|
||||
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Intrusion Detection
|
||||
#
|
||||
# Each event has a base to which .count, .interval, and .action are added
|
||||
# The IntrusionException will fire if we receive "count" events within "interval" seconds
|
||||
# The IntrusionDetector is configurable to take the following actions: log, logout, and disable
|
||||
# (multiple actions separated by commas are allowed e.g. event.test.actions=log,disable
|
||||
#
|
||||
# Custom Events
|
||||
# Names must start with "event." as the base
|
||||
# Use IntrusionDetector.addEvent( "test" ) in your code to trigger "event.test" here
|
||||
# You can also disable intrusion detection completely by changing
|
||||
# the following parameter to true
|
||||
#
|
||||
IntrusionDetector.Disable=false
|
||||
#
|
||||
IntrusionDetector.event.test.count=2
|
||||
IntrusionDetector.event.test.interval=10
|
||||
IntrusionDetector.event.test.actions=disable,log
|
||||
|
||||
# Exception Events
|
||||
# All EnterpriseSecurityExceptions are registered automatically
|
||||
# Call IntrusionDetector.getInstance().addException(e) for Exceptions that do not extend EnterpriseSecurityException
|
||||
# Use the fully qualified classname of the exception as the base
|
||||
|
||||
# any intrusion is an attack
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.count=1
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.interval=1
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.actions=log,disable,logout
|
||||
|
||||
# for test purposes
|
||||
# CHECKME: Shouldn't there be something in the property name itself that designates
|
||||
# that these are for testing???
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.count=10
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.interval=5
|
||||
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.actions=log,disable,logout
|
||||
|
||||
# rapid validation errors indicate scans or attacks in progress
|
||||
# org.owasp.esapi.errors.ValidationException.count=10
|
||||
# org.owasp.esapi.errors.ValidationException.interval=10
|
||||
# org.owasp.esapi.errors.ValidationException.actions=log,logout
|
||||
|
||||
# sessions jumping between hosts indicates session hijacking
|
||||
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.count=2
|
||||
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.interval=10
|
||||
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log,logout
|
||||
|
||||
|
||||
#===========================================================================
|
||||
# ESAPI Validation
|
||||
#
|
||||
# The ESAPI Validator works on regular expressions with defined names. You can define names
|
||||
# either here, or you may define application specific patterns in a separate file defined below.
|
||||
# This allows enterprises to specify both organizational standards as well as application specific
|
||||
# validation rules.
|
||||
#
|
||||
Validator.ConfigurationFile=validation.properties
|
||||
|
||||
# Validators used by ESAPI
|
||||
Validator.AccountName=^[a-zA-Z0-9]{3,20}$
|
||||
Validator.SystemCommand=^[a-zA-Z\\-\\/]{1,64}$
|
||||
Validator.RoleName=^[a-z]{1,20}$
|
||||
|
||||
#the word TEST below should be changed to your application
|
||||
#name - only relative URL's are supported
|
||||
Validator.Redirect=^\\/test.*$
|
||||
|
||||
# Global HTTP Validation Rules
|
||||
# Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=]
|
||||
Validator.HTTPScheme=^(http|https)$
|
||||
Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$
|
||||
Validator.HTTPParameterName=^[a-zA-Z0-9_]{1,32}$
|
||||
Validator.HTTPParameterValue=^[a-zA-Z0-9.\\-\\/+=@_ ]*$
|
||||
Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{1,32}$
|
||||
Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]*$
|
||||
Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{1,32}$
|
||||
Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
|
||||
Validator.HTTPContextPath=^\\/?[a-zA-Z0-9.\\-\\/_]*$
|
||||
Validator.HTTPServletPath=^[a-zA-Z0-9.\\-\\/_]*$
|
||||
Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$
|
||||
Validator.HTTPQueryString=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ %]*$
|
||||
Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
|
||||
Validator.HTTPURL=^.*$
|
||||
Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$
|
||||
|
||||
# Validation of file related input
|
||||
Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$
|
||||
Validator.DirectoryName=^[a-zA-Z0-9:/\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$
|
||||
|
||||
# Validation of dates. Controls whether or not 'lenient' dates are accepted.
|
||||
# See DataFormat.setLenient(boolean flag) for further details.
|
||||
Validator.AcceptLenientDates=false
|
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<function-configuration>
|
||||
<!-- 系统函数默认配置 -->
|
||||
<bean class="org.wltea.expression.function.SystemFunctions">
|
||||
<function name="CONTAINS" method="contains">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="STARTSWITH" method="startsWith">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="ENDSWITH" method="endsWith">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="CALCDATE" method="calcDate">
|
||||
<parameter-type>java.util.Date</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
<parameter-type>int</parameter-type>
|
||||
</function>
|
||||
<function name="SYSDATE" method="sysDate" />
|
||||
<function name="DAYEQUALS" method="dayEquals">
|
||||
<parameter-type>java.util.Date</parameter-type>
|
||||
<parameter-type>java.util.Date</parameter-type>
|
||||
</function>
|
||||
</bean>
|
||||
|
||||
<!-- 用户函数配置 请在这里定制您自己的函数-->
|
||||
<bean class="weaver.workflow.ruleDesign.WeaverFunctions">
|
||||
<function name="NOTCONTAINS" method="doesNotContains">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="BELONG" method="belong">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="NOTBELONG" method="doesNotBelong">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="HRMLEVEL" method="hrmLevel">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="BROWSERCONTAINS" method="browserContains">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="NOTBROWSERCONTAINS" method="notBrowserContains">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="BROWSERINCLUDINGLOWER" method="browserIncludingLower">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="NOTBROWSERINCLUDINGLOWER" method="notBrowserIncludingLower">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="INLOCATION" method="inLocation">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="NOTINLOCATION" method="notInLocation">
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
<parameter-type>java.lang.Object</parameter-type>
|
||||
</function>
|
||||
<function name="NOTSTARTSWITH" method="notStartsWith">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="NOTENDSWITH" method="notEndsWith">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="ISEMPTY" method="isEmpty">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
<function name="ISNOTEMPTY" method="isNotEmpty">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
</bean>
|
||||
<!--
|
||||
<bean class="org.wltea.expression.test.TestFunctions">
|
||||
<constructor-args>
|
||||
<constructor-arg type="java.lang.Integer">123</constructor-arg>
|
||||
<constructor-arg type="java.lang.String">aa</constructor-arg>
|
||||
</constructor-args>
|
||||
<function name="问好" method="sayHello">
|
||||
<parameter-type>java.lang.String</parameter-type>
|
||||
</function>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
|
||||
</function-configuration>
|
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap"
|
||||
xmlns:types="http://www.weaver.com.cn/ws/workflow/request"
|
||||
xmlns:tns="http://www.weaver.com.cn/ws/workflow/request/wsdl"
|
||||
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
||||
targetNamespace="http://www.weaver.com.cn/ws/workflow/request/wsdl">
|
||||
<wsdl:types>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.weaver.com.cn/ws/workflow/request"
|
||||
targetNamespace="http://www.weaver.com.cn/ws/workflow/request" elementFormDefault="qualified">
|
||||
<xs:element name="createRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="RequestInfo"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="createRequestResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="createRequestReturn" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="getRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="requestId" type="xs:int"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="getRequestResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="RequestInfo"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RequestInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="MainTableInfo"/>
|
||||
<xs:element ref="DetailTableInfo" minOccurs="0"/>
|
||||
<xs:element ref="RequestLog" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="workflowid" use="required" type="xs:string"/>
|
||||
<xs:attribute name="requestid" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="creatorid" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="description" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="requestlevel" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="remindtype" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="hostid" use="optional" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Cell">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" use="required" type="xs:string"/>
|
||||
<xs:attribute name="type" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="value" use="required" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="DetailTable">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="Row" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" use="required" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="DetailTableInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="DetailTable" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="MainTableInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="Property" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Property">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="name" use="required" type="xs:string"/>
|
||||
<xs:attribute name="type" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="value" use="required" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Row">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="Cell" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="id" use="required" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="RequestLog">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="Log" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Log">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" use="required" type="xs:string"/>
|
||||
<xs:attribute name="node" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="comment" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="operator" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="opdate" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="optime" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="optype" use="optional" type="xs:string"/>
|
||||
<xs:attribute name="receiver" use="optional" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="createRequestResponse">
|
||||
<wsdl:part name="parameters" element="types:createRequestResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="createRequestRequest">
|
||||
<wsdl:part name="parameters" element="types:createRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getRequestResponse">
|
||||
<wsdl:part name="parameters" element="types:getRequestResponse"/>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="getRequestRequest">
|
||||
<wsdl:part name="parameters" element="types:getRequest"/>
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="RequestService">
|
||||
<wsdl:operation name="createRequest">
|
||||
<wsdl:input name="createRequestRequest" message="tns:createRequestRequest"/>
|
||||
<wsdl:output name="createRequestResponse" message="tns:createRequestResponse"/>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getRequest">
|
||||
<wsdl:input name="getRequestRequest" message="tns:getRequestRequest"/>
|
||||
<wsdl:output name="getRequestResponse" message="tns:getRequestResponse"/>
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="RequestServiceSoapBinding" type="tns:RequestService">
|
||||
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||
<wsdl:operation name="createRequest">
|
||||
<wsdlsoap:operation/>
|
||||
<wsdl:input>
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="getRequest">
|
||||
<wsdlsoap:operation/>
|
||||
<wsdl:input>
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<wsdlsoap:body use="literal"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="RequestServiceService">
|
||||
<wsdl:port name="RequestService" binding="tns:RequestServiceSoapBinding">
|
||||
<wsdlsoap:address location="http://localhost/ws/RequestService"/>
|
||||
</wsdl:port>
|
||||
</wsdl:service>
|
||||
</wsdl:definitions>
|
@ -0,0 +1,12 @@
|
||||
log4j.rootLogger = DEBUG,A1
|
||||
|
||||
#if you want to open the trace from open source,just add # ahead of line
|
||||
log4j.logger.org = ERROR
|
||||
log4j.logger.uk = ERROR
|
||||
|
||||
log4j.appender.A1 = org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.A1.layout = org.apache.log4j.PatternLayout
|
||||
log4j.appender.A1.layout.ConversionPattern =- %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5p] [%t] [%c.%M(%F:%L)] - %msg%n
|
||||
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
|
||||
#values are "system-env" or "this";
|
||||
#if value is "this" , using the paoding.dic.home as dicHome if configed!
|
||||
paoding.dic.home.config-fisrt=this
|
||||
|
||||
#dictionary home (directory)
|
||||
#"classpath:xxx" means dictionary home is in classpath.
|
||||
#e.g "classpath:dic" means dictionaries are in "classes/dic" directory or any other classpath directory
|
||||
paoding.dic.home=D:/Workspace/paoding/dic
|
||||
|
||||
#seconds for dic modification detection
|
||||
#paoding.dic.detector.interval=60
|
@ -0,0 +1,49 @@
|
||||
# Default Properties file for use by StdSchedulerFactory
|
||||
# to create a Quartz Scheduler Instance, if a different
|
||||
# properties file is not explicitly specified.
|
||||
#
|
||||
|
||||
org.quartz.scheduler.rmi.export=false
|
||||
org.quartz.scheduler.rmi.proxy=false
|
||||
org.quartz.scheduler.wrapJobExecutionInUserTransaction=false
|
||||
#============================================================================
|
||||
# Configure Main Scheduler Properties
|
||||
#============================================================================
|
||||
|
||||
org.quartz.scheduler.instanceName=MyClusteredScheduler
|
||||
org.quartz.scheduler.instanceId=AUTO
|
||||
#============================================================================
|
||||
# Configure ThreadPool
|
||||
#============================================================================
|
||||
|
||||
org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
|
||||
org.quartz.threadPool.threadCount=100
|
||||
org.quartz.threadPool.threadPriority=5
|
||||
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
|
||||
#============================================================================
|
||||
# Configure JobStore
|
||||
#============================================================================
|
||||
|
||||
org.quartz.jobStore.misfireThreshold=60000
|
||||
#org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore
|
||||
|
||||
org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
|
||||
#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
|
||||
|
||||
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.MSSQLDelegate
|
||||
org.quartz.jobStore.useProperties=false
|
||||
org.quartz.jobStore.dataSource=myDS
|
||||
org.quartz.jobStore.tablePrefix=QRTZ_
|
||||
org.quartz.jobStore.isClustered=true
|
||||
org.quartz.jobStore.clusterCheckinInterval=20000
|
||||
#============================================================================
|
||||
# Configure Datasources
|
||||
#============================================================================
|
||||
|
||||
org.quartz.dataSource.myDS.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
org.quartz.dataSource.myDS.URL=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=E9test
|
||||
org.quartz.dataSource.myDS.user=sa
|
||||
|
||||
org.quartz.scheduler.batchTriggerAcquisitionFireAheadTimeWindow=60000
|
||||
|
||||
org.quartz.scheduler.batchTriggerAcquisitionMaxCount=100
|
Loading…
Reference in New Issue