修改经销商限制配置化
This commit is contained in:
parent
34ec065162
commit
e29dfb6c9f
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@page import="com.amarsoft.biz.workflow.ApplyManager"%>
|
||||
<%@page import="java.util.Date"%>
|
||||
<%@page import="com.amarsoft.awe.control.model.Parameter" %>
|
||||
@ -58,8 +59,10 @@
|
||||
}
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@page import="com.amarsoft.biz.workflow.FlowTask"%>
|
||||
<%@page import="com.amarsoft.dict.als.manage.CodeManager"%>
|
||||
<%@page import="com.amarsoft.app.lc.workflow.action.GetFlowAction"%>
|
||||
@ -33,8 +34,10 @@
|
||||
//control distributor(temporary)
|
||||
boolean flag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -15,8 +16,10 @@
|
||||
//control distributor(temporary)
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -18,8 +19,10 @@
|
||||
//control distributor(temporary)
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -15,8 +16,10 @@
|
||||
//control distributor(temporary)
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
|
||||
@ -15,8 +16,10 @@ String jboWhere=" FLOW_READER.isRead='1' and FLOW_READER.reader='"+custid+"' ";
|
||||
//control distributor(temporary)
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<%@page import="com.tenwa.httpclient.resources.QuartzPropertiesUtil"%>
|
||||
<%@page import="java.util.Date"%>
|
||||
<%@ page contentType="text/html; charset=GBK"%>
|
||||
<%@ include file="/Frame/resources/include/include_begin_list.jspf"%>
|
||||
@ -26,8 +27,10 @@
|
||||
//control distributor(temporary)
|
||||
boolean bFlag = false;
|
||||
List<String> roles = CurUser.getRoleTable();
|
||||
String distributorRole = QuartzPropertiesUtil.get("distributor_role");
|
||||
distributorRole = distributorRole == null ? "" : distributorRole;
|
||||
for(String role : roles) {
|
||||
if(role.startsWith("4") || "399".equals(role)) {
|
||||
if(distributorRole.indexOf(role) != -1) {
|
||||
bFlag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -37,4 +37,7 @@ org.quartz.jobStore.tablePrefix=QRTZ_
|
||||
org.quartz.jobStore.isClustered=false
|
||||
org.quartz.jobStore.clusterCheckinInterval=15000
|
||||
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||
org.quartz.dataSource.zhulhDS.maxConnections=50
|
||||
org.quartz.dataSource.zhulhDS.maxConnections=50
|
||||
|
||||
#control distributor(temporary)
|
||||
distributor_role = 401
|
||||
@ -0,0 +1,35 @@
|
||||
package com.tenwa.httpclient.resources;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
|
||||
public class QuartzPropertiesUtil {
|
||||
private static final Map<String, String> attributes;
|
||||
|
||||
static{
|
||||
attributes = new ConcurrentHashMap<String, String>();
|
||||
Properties prop = new Properties();
|
||||
try {
|
||||
prop.load(QuartzPropertiesUtil.class.getResourceAsStream("/quartz.properties"));
|
||||
for(Entry<Object, Object> entry : prop.entrySet()) {
|
||||
if(entry.getKey() == null || entry.getValue() == null) {
|
||||
continue;
|
||||
}
|
||||
attributes.put(entry.getKey().toString(), entry.getValue().toString());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
ARE.getLog().error("init QuartzPropertiesUtil info failed");
|
||||
}
|
||||
ARE.getLog().info("init QuartzPropertiesUtil info success");
|
||||
}
|
||||
|
||||
public static String get(String propName) {
|
||||
return attributes.get(propName);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user