ic_excellent 2023-07-27 12:47:32 +08:00
commit ef4d57f1d0
84 changed files with 16339 additions and 192 deletions

View File

@ -0,0 +1,48 @@
const detailTable = "detail_1";
// 多选字段
const detailMultiFieldId = ModeForm.convertFieldNameToId("model_field", detailTable);
// 单选字段
const detailRadioFieldId = ModeForm.convertFieldNameToId("model_field_ass", detailTable);
// 表单字段名字段
const detailFieldNameId = ModeForm.convertFieldNameToId("model_field_name", detailTable);
// 所属表
const detailFieldTableNameId = ModeForm.convertFieldNameToId("table_name", detailTable);
// 主表还是明细
const detailMainOrDetailId = ModeForm.convertFieldNameToId("main_or_detail", detailTable);
$(()=>{
let chose = {};
ModeForm.bindDetailFieldChangeEvent(detailMultiFieldId, (id, index, val)=>{
console.log('id : ', id);
console.log('index : ', index);
console.log('val : ', val);
if(!val){
return;
}
let fieldMameArr = [];
let tableNameArr = [];
let mainOrDetailArr = [];
val.split(',').forEach(id=>{
ModeForm.changeFieldValue(`${detailRadioFieldId}_${index}`, {
value: id,
specialobj:[
{id:id, name:"field"}
]
})
setTimeout(()=>{
let detailFieldNameIdValue = ModeForm.getFieldValue(`${detailFieldNameId}_${index}`)
let detailFieldTableNameValue = ModeForm.getFieldValue(`${detailFieldTableNameId}_${index}`)
let detailMainOrDetailValue = ModeForm.getFieldValue(`${detailMainOrDetailId}_${index}`);
fieldMameArr.push(detailFieldNameIdValue);
tableNameArr.push(detailFieldTableNameValue);
mainOrDetailArr.push(detailMainOrDetailValue);
},0);
})
console.log('fieldMameArr : ', fieldMameArr)
console.log('tableNameArr : ', tableNameArr)
console.log('mainOrDetailArr : ', mainOrDetailArr)
ModeForm.changeFieldValue(`${detailFieldNameId}_${index}`,{value:fieldMameArr.join(',')})
ModeForm.changeFieldValue(`${detailFieldTableNameId}_${index}`,{value:tableNameArr.join(',')})
ModeForm.changeFieldValue(`${detailMainOrDetailId}_${index}`,{value:mainOrDetailArr.join(',')})
})
})

View File

@ -1029,7 +1029,9 @@ $(() => {
targetDetail: {
tableName: '',
testQuestionField: ''
}
},
// 橘色id
roleId: 88,
}

View File

@ -4,8 +4,17 @@ import aiyh.utils.annotation.ActionDefaultTestValue;
import aiyh.utils.annotation.ActionDesc;
import aiyh.utils.annotation.ActionOptionalParam;
import aiyh.utils.annotation.RequiredMark;
import aiyh.utils.annotation.webdoc.Api;
import aiyh.utils.annotation.webdoc.ApiModelProperty;
import aiyh.utils.annotation.webdoc.ApiOperation;
import aiyh.utils.annotation.webdoc.ApiParam;
import aiyh.utils.entity.ActionTemplate;
import aiyh.utils.excention.CustomerException;
import aiyh.utils.tool.cn.hutool.core.bean.BeanUtil;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.apache.log4j.Logger;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
@ -14,12 +23,11 @@ import org.apache.velocity.app.VelocityEngine;
import weaver.interfaces.schedule.BaseCronJob;
import weaver.interfaces.workflow.action.Action;
import javax.ws.rs.*;
import java.io.*;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.lang.reflect.Method;
import java.util.*;
/**
* <h1></h1>
@ -221,5 +229,201 @@ public class GenerateFileUtil {
throw new CustomerException("创建模版文件失败!", e);
}
}
public static void createApiDoc(Class<?>... classes) {
if (Objects.isNull(classes)) {
return;
}
List<Map<String, Object>> docInfoList = new ArrayList<>();
for (Class<?> aClass : classes) {
if (Objects.isNull(aClass)) {
continue;
}
Map<String, Object> apiDocMap = createApiDocMap(aClass);
docInfoList.add(apiDocMap);
}
System.out.println(JSON.toJSONString(docInfoList));
}
private static Map<String, Object> createApiDocMap(Class<?> aClass) {
Map<String, Object> result = new HashMap<>(8);
List<Map<String, Object>> apiList = new ArrayList<>();
result.put("apiList", apiList);
if (aClass.isAnnotationPresent(Api.class) && aClass.isAnnotationPresent(Path.class)) {
Api api = aClass.getAnnotation(Api.class);
Path path = aClass.getAnnotation(Path.class);
String urlPath = path.value();
if (!urlPath.endsWith("/")) {
urlPath = urlPath + "/";
}
if (!urlPath.startsWith("/")) {
urlPath = "/" + urlPath;
}
String description = api.description();
String tag = api.tag();
result.put("description", description);
result.put("tag", tag);
Method[] declaredMethods = aClass.getDeclaredMethods();
for (Method method : declaredMethods) {
if (method.isAnnotationPresent(ApiOperation.class) && method.isAnnotationPresent(Path.class)) {
Map<String, Object> methodMap = new HashMap<>(8);
Path methodPath = method.getAnnotation(Path.class);
String methodUrlPath = methodPath.value();
String requestUrl = "";
if (!methodUrlPath.startsWith("/")) {
requestUrl = "/api" + urlPath + methodUrlPath;
} else {
requestUrl = "/api" + urlPath + methodUrlPath.substring(1);
}
ApiOperation apiOperation = method.getAnnotation(ApiOperation.class);
String desc = apiOperation.desc();
String methodType = getMethodType(method);
methodMap.put("description", desc);
methodMap.put("methodType", methodType);
methodMap.put("url", requestUrl);
getMethodParams(methodMap, apiOperation);
apiList.add(methodMap);
}
}
}
return result;
}
private static void getMethodParams(Map<String, Object> methodMap, ApiOperation apiOperation) {
ApiParam[] apiParams = apiOperation.value();
JSONObject json = new JSONObject();
List<Map<String, Object>> params = new ArrayList<>();
methodMap.put("params", params);
for (ApiParam apiParam : apiParams) {
Map<String, Object> apiParamMap = new HashMap<>(8);
String description = apiParam.description();
String example = apiParam.example();
String name = apiParam.name();
Class<?> type = apiParam.type();
Class<?> itemType = apiParam.itemType();
boolean required = apiParam.required();
apiParamMap.put("description", description);
apiParamMap.put("example", example);
apiParamMap.put("name", name);
apiParamMap.put("required", required);
putJsonExample(json, type, itemType, example, name, apiParam);
apiParamMap.put("type", type.getSimpleName());
if (Collection.class.isAssignableFrom(type)) {
apiParamMap.put("type", "List");
}
if (Map.class.isAssignableFrom(type) || BeanUtil.isBean(type)) {
apiParamMap.put("type", "Object");
}
params.add(apiParamMap);
}
methodMap.put("jsonCode", JSON.toJSONString(json, SerializerFeature.PrettyFormat));
}
private static void putJsonExample(JSONObject json,
Class<?> type,
Class<?> itemType,
String example,
String name,
ApiParam apiParam) {
if (Number.class.isAssignableFrom(type) || double.class.equals(type)
|| float.class.equals(type) || int.class.equals(type)) {
if (StrUtil.isNotBlank(example)) {
if (example.contains(".")) {
json.put(name, Double.parseDouble(example));
} else {
json.put(name, Integer.parseInt(example));
}
} else {
if (Double.class.isAssignableFrom(type) || Float.class.isAssignableFrom(type) ||
double.class.equals(type) || float.class.equals(type)) {
json.put(name, Double.parseDouble(example));
} else {
json.put(name, Integer.parseInt(example));
}
}
return;
}
if (Boolean.class.isAssignableFrom(type) || boolean.class.equals(type)) {
if (StrUtil.isBlank(example)) {
example = "false";
}
json.put(name, Boolean.parseBoolean(example));
return;
}
if (Collection.class.isAssignableFrom(type)) {
List<Object> examList = new ArrayList<>();
if (Map.class.isAssignableFrom(itemType)) {
JSONObject itemJson = new JSONObject();
ApiModelProperty[] apiModelProperties = apiParam.apiProperties();
for (ApiModelProperty apiModelProperty : apiModelProperties) {
itemJson.put(apiModelProperty.name(), getExamTypeValue(apiModelProperty.type(), apiModelProperty.example()));
}
examList.add(itemJson);
}
json.put(name, examList);
}
if (Map.class.isAssignableFrom(type)) {
JSONObject itemJson = new JSONObject();
ApiModelProperty[] apiModelProperties = apiParam.apiProperties();
for (ApiModelProperty apiModelProperty : apiModelProperties) {
itemJson.put(apiModelProperty.name(), getExamTypeValue(apiModelProperty.type(), apiModelProperty.example()));
}
json.put(name, itemJson);
}
if (String.class.equals(type)) {
json.put(name, StrUtil.isBlank(example) ? "string" : example);
}
}
private static Object getExamTypeValue(Class<?> type, String example) {
if (Number.class.isAssignableFrom(type) || double.class.equals(type)
|| float.class.equals(type) || int.class.equals(type)) {
if (StrUtil.isNotBlank(example)) {
if (example.contains(".")) {
return Double.parseDouble(example);
} else {
return Integer.parseInt(example);
}
} else {
if (Double.class.isAssignableFrom(type) || Float.class.isAssignableFrom(type) ||
double.class.equals(type) || float.class.equals(type)) {
return Double.parseDouble(example);
} else {
return Integer.parseInt(example);
}
}
}
if (Boolean.class.isAssignableFrom(type) || boolean.class.equals(type)) {
if (StrUtil.isBlank(example)) {
example = "false";
}
return Boolean.parseBoolean(example);
}
return example;
}
private static String getMethodType(Method method) {
if (method.isAnnotationPresent(GET.class)) {
return "GET";
}
if (method.isAnnotationPresent(POST.class)) {
return "POST";
}
if (method.isAnnotationPresent(PUT.class)) {
return "PUT";
}
if (method.isAnnotationPresent(DELETE.class)) {
return "DELETE";
}
return "Unknown";
}
}

View File

@ -1,5 +1,6 @@
package aiyh.utils;
import aiyh.utils.interfaces.script_util.CusScriptFunInterface;
import aiyh.utils.tool.org.apache.commons.jexl3.*;
import java.util.Map;
@ -13,9 +14,16 @@ import java.util.Map;
*/
public class ScriptUtil {
private static final JexlEngine JEXL = new JexlBuilder().create();
public static Object invokeScript(String script, Map<String, Object> params) {
return invokeScript(script, params, null);
}
public static Object invokeScript(String script, Map<String, Object> params, CusScriptFunInterface scriptFunInterface) {
JexlContext jc = new MapContext();
if(null != scriptFunInterface){
jc.set(scriptFunInterface.getClass().getSimpleName(), scriptFunInterface);
}
for (Map.Entry<String, Object> entry : params.entrySet()) {
jc.set(entry.getKey(), entry.getValue());
}

View File

@ -0,0 +1,22 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1>controller</h1>
*
* <p>create: 2023/7/20 19:12</p>
*
* @author youHong.ai
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Api {
/** 标签 */
String tag();
/** 描述 */
String description();
}

View File

@ -0,0 +1,24 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1></h1>
*
* <p>create: 2023/7/20 19:17</p>
*
* @author youHong.ai
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
public @interface ApiModel {
/** 名称 */
String value();
/** 描述 */
String description();
/** 字段描述 */
ApiModelProperty[] properties() default {};
}

View File

@ -0,0 +1,30 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1>map</h1>
*
* <p>create: 2023/7/20 19:21</p>
*
* @author youHong.ai
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD})
@Documented
public @interface ApiModelProperty {
/** 参数描述 */
String description();
/** 参数名 */
String name();
/** 参数类型 */
Class<?> type() default String.class;
/** 是否必填 */
boolean required() default true;
/** 示例值 */
String example() default "";
}

View File

@ -0,0 +1,21 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1></h1>
*
* <p>create: 2023/7/20 19:15</p>
*
* @author youHong.ai
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ApiOperation {
/** 接口描述 */
String desc();
/** 接口参数 */
ApiParam[] value() default {};
}

View File

@ -0,0 +1,37 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1></h1>
*
* <p>create: 2023/7/20 19:17</p>
*
* @author youHong.ai
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
@Documented
public @interface ApiParam {
/** 参数名 */
String name();
/** 参数类型 */
Class<?> type();
Class<?> itemType() default String.class;
/** 参数描述 */
String description();
/** 是否必填 */
boolean required() default false;
/** 示例值 */
String example() default "";
ApiModelProperty[] apiProperties() default {};
}

View File

@ -0,0 +1,18 @@
package aiyh.utils.annotation.webdoc;
import java.lang.annotation.*;
/**
* <h1></h1>
*
* <p>create: 2023/7/20 19:38</p>
*
* @author youHong.ai
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Documented
public @interface ApiParams {
ApiParam[] value();
}

View File

@ -0,0 +1,10 @@
package aiyh.utils.interfaces.script_util;
/**
* <h1>script util </h1>
*
* @author xuanran.wang
* @date 2023/7/25 16:41
*/
public interface CusScriptFunInterface {
}

View File

@ -17,12 +17,13 @@ import java.io.IOException;
*
* @author youHong.ai
*/
@WebServlet("/test/servlet/v1")
@WebServlet("/cusapi/*")
public class TestServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {
String success = ApiResult.success("成功!");
String success = ApiResult.success("成功!" + req.getRequestURI());
res.setContentType(MediaType.APPLICATION_JSON + ";charset=utf-8");
res.getWriter().write(success);
}

View File

@ -1,6 +1,9 @@
package com.api.youhong.ai.guojun.sso.controller;
import aiyh.utils.Util;
import aiyh.utils.annotation.webdoc.Api;
import aiyh.utils.annotation.webdoc.ApiOperation;
import aiyh.utils.annotation.webdoc.ApiParam;
import com.sun.jersey.api.view.Viewable;
import org.apache.log4j.Logger;
import weaver.integration.util.SessionUtil;
@ -20,11 +23,16 @@ import javax.ws.rs.core.Context;
* @author youHong.ai
*/
@Path("aiyh/guojun/sso")
@Api(description = "国君集成", tag = "国君集成")
public class SsoLoginAuthController {
private final Logger log = Util.getLogger();
@GET
@Path("/auth")
@ApiOperation(desc = "国君小程序免密接口", value = {
@ApiParam(name = "account", description = "国小君账号", type = String.class, required = true, example = "login_account"),
@ApiParam(name = "redirectChannel", description = "国小君小程序配置的认证成功后的跳转地址", type = String.class, required = true, example = "/wui/index.html")
})
public Viewable authSso(@Context HttpServletRequest request, @Context HttpServletResponse response,
@QueryParam("account") String account,
@QueryParam("redirectChannel") String redirectChannel) {

View File

@ -1,8 +1,11 @@
package com.api.youhong.ai.guojun.todolist.controller;
import aiyh.utils.ApiResult;
import aiyh.utils.Util;
import aiyh.utils.annotation.webdoc.Api;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import com.api.youhong.ai.guojun.todolist.service.WorkflowTaskService;
import weaver.hrm.HrmUserVarify;
import org.apache.log4j.Logger;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
@ -21,9 +24,11 @@ import javax.ws.rs.core.MediaType;
*
* @author youHong.ai
*/
@Api(tag = "统一待办", description = "国君小程序调用免密登录接口")
@Path("/aiyh/guojun/workflow-task")
public class WorkflowTaskController {
private final Logger log = Util.getLogger();
private final WorkflowTaskService service = new WorkflowTaskService();
@Path("/todo-list")
@ -33,10 +38,61 @@ public class WorkflowTaskController {
public String getTodoList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
try {
User user = HrmUserVarify.getUser(request, response);
// User user = HrmUserVarify.getUser(request, response);
String authorization = request.getHeader("Authorization");
log.info("Authorization " + authorization);
String userId = Util.getCusConfigValue(authorization);
if (StrUtil.isBlank(userId)) {
return ApiResult.error(-1, "can not find user by Authorization [" + authorization + "]");
}
User user = new User(Integer.parseInt(userId));
return ApiResult.success(service.getTodoList(user), 0, "成功");
} catch (Exception e) {
return ApiResult.error(-1, "system error");
}
}
@Path("draft-list")
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public String getDraftList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
try {
// User user = HrmUserVarify.getUser(request, response);
String authorization = request.getHeader("Authorization");
log.info("Authorization " + authorization);
String userId = Util.getCusConfigValue(authorization);
if (StrUtil.isBlank(userId)) {
return ApiResult.error(-1, "can not find user by Authorization [" + authorization + "]");
}
User user = new User(Integer.parseInt(userId));
return ApiResult.success(service.getDraftList(user), 0, "成功");
} catch (Exception e) {
return ApiResult.error(-1, "system error");
}
}
@Path("create-list")
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public String getCreateList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
try {
// User user = HrmUserVarify.getUser(request, response);
String authorization = request.getHeader("Authorization");
log.info("Authorization " + authorization);
String userId = Util.getCusConfigValue(authorization);
if (StrUtil.isBlank(userId)) {
return ApiResult.error(-1, "can not find user by Authorization [" + authorization + "]");
}
User user = new User(Integer.parseInt(userId));
return ApiResult.success(service.getCreateList(user), 0, "成功");
} catch (Exception e) {
return ApiResult.error(-1, "system error");
}
}
}

View File

@ -1,5 +1,6 @@
package com.api.youhong.ai.guojun.todolist.mapper;
import aiyh.utils.annotation.recordset.Select;
import aiyh.utils.annotation.recordset.SqlMapper;
import java.util.List;
@ -16,5 +17,113 @@ import java.util.Map;
public interface WorkflowTaskMapper {
List<Map<String, Object>> selectTodoList();
@Select("select distinct\n" +
" wbs.WORKFLOWNAME workflow_name,\n" +
" wrb.requestname request_name,wrb.workflowid workflow_id,wrb.requestid request_id,wrb.creater,\n" +
" wrb.createdate create_date,\n" +
" wrb.CREATETIME create_time,\n" +
" (\n" +
" case creater\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wrb.creater)\n" +
" end\n" +
" )creater_name,\n" +
" (\n" +
" case wrb.requestlevel\n" +
" when 0 then '正常'\n" +
" when 1 then '重要'\n" +
" else '紧急'\n" +
" end\n" +
" )request_level_desc,\n" +
" wcp.receivedate receive_date,wcp.nodeid node_id,wnb.nodeName node_name,wrb.status,wrb.requestlevel request_level,wcp.userid user_id,\n" +
" (\n" +
" case wcp.userid\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wcp.userid)\n" +
" end\n" +
" )user_name\n" +
"from workflow_requestbase wrb\n" +
" inner join workflow_currentoperator wcp on wrb.requestid = wcp.requestid\n" +
" inner join workflow_nodebase wnb on wcp.nodeid = wnb.id\n" +
" inner join workflow_base wbs on wbs.id = wrb.WORKFLOWID\n" +
"where ((isremark='0'and (takisremark is null or takisremark=0)) or isremark in ('1','5','7','8','9','11'))\n" +
" and islasttimes=1\n" +
" and (wrb.deleted<>1 or wrb.deleted is null or wrb.deleted='')\n" +
" and (wcp.isprocessing = '' or wcp.isprocessing is null)\n" +
" and usertype in (0,1)\n" +
" and ((wcp.isremark not in('1','8','9','11') or (wcp.isremark='1' and wcp.takisremark='2'))) " +
" and wcp.userid = #{userId} ")
List<Map<String, Object>> selectTodoList(Integer userId);
@Select("select distinct\n" +
" wbs.WORKFLOWNAME workflow_name,\n" +
" wrb.requestname request_name,wrb.workflowid workflow_id,wrb.requestid request_id,wrb.creater,\n" +
" wrb.createdate create_date,\n" +
" wrb.CREATETIME create_time,\n" +
" (\n" +
" case creater\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wrb.creater)\n" +
" end\n" +
" )creater_name,\n" +
" (\n" +
" case wrb.requestlevel\n" +
" when 0 then '正常'\n" +
" when 1 then '重要'\n" +
" else '紧急'\n" +
" end\n" +
" )request_level_desc,\n" +
" wcp.receivedate receive_date,wcp.nodeid node_id,wnb.nodeName node_name,wrb.status,wrb.requestlevel request_level,wcp.userid user_id,\n" +
" (\n" +
" case wcp.userid\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wcp.userid)\n" +
" end\n" +
" )user_name\n" +
"from workflow_requestbase wrb\n" +
" inner join workflow_currentoperator wcp on wrb.requestid = wcp.requestid\n" +
" inner join workflow_nodebase wnb on wcp.nodeid = wnb.id\n" +
" inner join workflow_base wbs on wbs.id = wrb.WORKFLOWID\n" +
"where " +
" (wrb.deleted<>1 or wrb.deleted is null or wrb.deleted='')\n" +
" and usertype in (0,1)\n" +
" and wcp.userid = #{userId} and wrb.CURRENTNODETYPE = 0")
List<Map<String, Object>> selectDraftList(Integer userId);
@Select("select distinct\n" +
" wbs.WORKFLOWNAME workflow_name,\n" +
" wrb.requestname request_name,wrb.workflowid workflow_id,wrb.requestid request_id,wrb.creater,\n" +
" wrb.createdate create_date,\n" +
" wrb.CREATETIME create_time,\n" +
" (\n" +
" case creater\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wrb.creater)\n" +
" end\n" +
" )creater_name,\n" +
" (\n" +
" case wrb.requestlevel\n" +
" when 0 then '正常'\n" +
" when 1 then '重要'\n" +
" else '紧急'\n" +
" end\n" +
" )request_level_desc,\n" +
" wcp.receivedate receive_date,wcp.nodeid node_id,wnb.nodeName node_name,wrb.status,wrb.requestlevel request_level,wcp.userid user_id,\n" +
" (\n" +
" case wcp.userid\n" +
" when 1 then '系统管理员'\n" +
" else (select lastname from hrmresource where id = wcp.userid)\n" +
" end\n" +
" )user_name\n" +
"from workflow_requestbase wrb\n" +
" inner join workflow_currentoperator wcp on wrb.requestid = wcp.requestid\n" +
" inner join workflow_nodebase wnb on wcp.nodeid = wnb.id\n" +
" inner join workflow_base wbs on wbs.id = wrb.WORKFLOWID\n" +
"where " +
" (wrb.deleted<>1 or wrb.deleted is null or wrb.deleted='')\n" +
" and usertype in (0,1)\n" +
" and wcp.CREATER = #{userId}")
List<Map<String, Object>> selectCreateList(Integer userId);
}

View File

@ -1,9 +1,18 @@
package com.api.youhong.ai.guojun.todolist.service;
import aiyh.utils.Util;
import aiyh.utils.tool.cn.hutool.core.collection.CollectionUtil;
import com.api.youhong.ai.guojun.todolist.mapper.WorkflowTaskMapper;
import com.api.youhong.ai.guojun.todolist.vo.CreateItemVo;
import com.api.youhong.ai.guojun.todolist.vo.DraftItemVo;
import com.api.youhong.ai.guojun.todolist.vo.TodoItemVo;
import weaver.hrm.User;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* <h1></h1>
*
@ -17,7 +26,101 @@ public class WorkflowTaskService {
private final WorkflowTaskMapper mapper = Util.getMapper(WorkflowTaskMapper.class);
public Object getTodoList(User user) {
return null;
List<Map<String, Object>> todoList = mapper.selectTodoList(user.getUID());
if (CollectionUtil.isEmpty(todoList)) {
return Collections.emptyList();
}
List<TodoItemVo> result = new ArrayList<>();
String ecHost = Util.getCusConfigValue("ECOLOGY_HOST_URL");
for (Map<String, Object> map : todoList) {
TodoItemVo todoItemVo = new TodoItemVo();
todoItemVo.setGroup("ITA");
todoItemVo.setTitle(Util.null2String(map.get("requestName")));
todoItemVo.setTaskId(Util.null2String(map.get("requestId")));
todoItemVo.setNodeKey(Util.null2String(map.get("nodeId")));
todoItemVo.setNodeName(Util.null2String(map.get("nodeName")));
todoItemVo.setArrivalTime(Util.null2String(map.get("receiveDate")));
todoItemVo.setInstId(Util.null2String(map.get("requestId")));
todoItemVo.setBizKey(Util.null2String(map.get("requestId")));
todoItemVo.setBizName(Util.null2String(map.get("workflowName")));
todoItemVo.setDrafterId(Util.null2String("10024473"));
todoItemVo.setStartUserId(Util.null2String("10024473"));
todoItemVo.setStartTime(Util.null2String(map.get("createDate")) + " " + Util.null2String(map.get("createTime")));
todoItemVo.setPriority(Integer.parseInt(Util.null2String(map.get("requestLevel"))));
todoItemVo.setProgress(20);
todoItemVo.setClaimState(Util.null2String("10024473"));
todoItemVo.setDepartmentCode("FF05");
todoItemVo.set_claim_do("/do/2850.22?id=107750");
todoItemVo.set_unclaim_do("/do/2850.23?id=107750");
todoItemVo.set_detail_url(ecHost + "/spa/workflow/static4mobileform/index.html#/req?requestid=" + map.get("requestId"));
result.add(todoItemVo);
}
return result;
}
public Object getDraftList(User user) {
List<Map<String, Object>> draftList = mapper.selectDraftList(user.getUID());
if (CollectionUtil.isEmpty(draftList)) {
return Collections.emptyList();
}
List<DraftItemVo> result = new ArrayList<>();
String ecHost = Util.getCusConfigValue("ECOLOGY_HOST_URL");
for (Map<String, Object> map : draftList) {
DraftItemVo draftItemVo = new DraftItemVo();
draftItemVo.setGroup("ITA");
draftItemVo.setAccess(true);
draftItemVo.setTitle(Util.null2String(map.get("requestName")));
draftItemVo.setTaskId(Util.null2String(map.get("requestId")));
draftItemVo.setNodeKey(Util.null2String(map.get("nodeId")));
draftItemVo.setNodeName(Util.null2String(map.get("nodeName")));
draftItemVo.setArrivalTime(Util.null2String(map.get("receiveDate")));
draftItemVo.setInstId(Util.null2String(map.get("requestId")));
draftItemVo.setBizKey(Util.null2String(map.get("requestId")));
draftItemVo.setBizName(Util.null2String(map.get("workflowName")));
draftItemVo.setDrafterId(Util.null2String("10024473"));
draftItemVo.setStartUserId(Util.null2String("10024473"));
draftItemVo.setStartTime(Util.null2String(map.get("createDate")) + " " + Util.null2String(map.get("createTime")));
draftItemVo.setPriority(Integer.parseInt(Util.null2String(map.get("requestLevel"))));
draftItemVo.setProgress(20);
draftItemVo.setDepartmentCode("FF05");
draftItemVo.set_stop_do("/do/2850.29?id=107688");
draftItemVo.set_detail_url(ecHost + "/spa/workflow/static4mobileform/index.html#/req?requestid=" + map.get("requestId"));
result.add(draftItemVo);
}
return result;
}
public Object getCreateList(User user) {
List<Map<String, Object>> createList = mapper.selectCreateList(user.getUID());
if (CollectionUtil.isEmpty(createList)) {
return Collections.emptyList();
}
List<CreateItemVo> result = new ArrayList<>();
String ecHost = Util.getCusConfigValue("ECOLOGY_HOST_URL");
for (Map<String, Object> map : createList) {
CreateItemVo createItemVo = new CreateItemVo();
createItemVo.setGroup("ITA");
createItemVo.setTitle(Util.null2String(map.get("requestName")));
createItemVo.setTaskId(Util.null2String(map.get("requestId")));
createItemVo.setNodeKey(Util.null2String(map.get("nodeId")));
createItemVo.setRuNodeKeys(Util.null2String(map.get("nodeId")));
createItemVo.setNodeName(Util.null2String(map.get("nodeName")));
createItemVo.setRuNodeNames(Util.null2String(map.get("nodeName")));
createItemVo.setArrivalTime(Util.null2String(map.get("receiveDate")));
createItemVo.setInstId(Util.null2String(map.get("requestId")));
createItemVo.setBizKey(Util.null2String(map.get("requestId")));
createItemVo.setBizName(Util.null2String(map.get("workflowName")));
createItemVo.setDrafterId(Util.null2String("10024473"));
createItemVo.setStartUserId(Util.null2String("10024473"));
createItemVo.setStartTime(Util.null2String(map.get("createDate")) + " " + Util.null2String(map.get("createTime")));
createItemVo.setPriority(Integer.parseInt(Util.null2String(map.get("requestLevel"))));
createItemVo.setProgress(20);
createItemVo.setDepartmentCode("FF05");
createItemVo.set_stop_do("/do/2850.29?id=107688");
createItemVo.set_detail_url(ecHost + "/spa/workflow/static4mobileform/index.html#/req?requestid=" + map.get("requestId"));
result.add(createItemVo);
}
return result;
}
}

View File

@ -0,0 +1,50 @@
package com.api.youhong.ai.guojun.todolist.vo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
/**
* <h1>vo</h1>
*
* <p>create: 2023/7/18 14:08</p>
*
* @author youHong.ai
*/
@Getter
@Setter
@ToString
public class CreateItemVo {
private String Group;
private String Title;
private String TaskId;
private String NodeKey;
private String NodeName;
private String ArrivalTime;
private String LastSaverId;
private String LastSaveTime;
private String InstId;
private String BizKey;
private String BizName;
private String DrafterId;
private String StartUserId;
private String StartTime;
private String FinishTime;
private String Finale;
private String StopReason;
private String RuNodeNames;
private String RuNodeKeys;
private Long InstDuration;
private Integer Priority;
private Integer Progress;
private List<ExtendInfoVo> ExtendInfo;
private String DepartmentCode;
private String _stop_do;
private String _detail_url;
}

View File

@ -0,0 +1,43 @@
package com.api.youhong.ai.guojun.todolist.vo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
/**
* <h1>vo</h1>
*
* <p>create: 2023/7/18 14:08</p>
*
* @author youHong.ai
*/
@Getter
@Setter
@ToString
public class DraftItemVo {
private String Group;
private boolean Access;
private String Title;
private String TaskId;
private String NodeKey;
private String NodeName;
private String ArrivalTime;
private String LastSaverId;
private String LastSaveTime;
private String InstId;
private String BizKey;
private String BizName;
private String DrafterId;
private String StartUserId;
private String StartTime;
private Integer Priority;
private Integer Progress;
private List<ExtendInfoVo> ExtendInfo;
private String DepartmentCode;
private String _stop_do;
private String _detail_url;
}

View File

@ -0,0 +1,20 @@
package com.api.youhong.ai.guojun.todolist.vo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* <h1></h1>
*
* <p>create: 2023/7/18 14:13</p>
*
* @author youHong.ai
*/
@Getter
@Setter
@ToString
public class ExtendInfoVo {
private String label;
private String value;
}

View File

@ -0,0 +1,49 @@
package com.api.youhong.ai.guojun.todolist.vo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List;
/**
* <h1>vo</h1>
*
* <p>create: 2023/7/18 14:08</p>
*
* @author youHong.ai
*/
@Getter
@Setter
@ToString
public class TodoItemVo {
private String Group;
private String Title;
private String TaskId;
private String NodeKey;
private String NodeName;
private String ArrivalTime;
private String FirstReaderId;
private String FirstReadTime;
private String LastSaverId;
private String LastSaveTime;
private String InstId;
private String BizKey;
private String BizName;
private String DrafterId;
private String StartUserId;
private String StartTime;
private Integer Priority;
private Integer Progress;
private String ClaimState;
private boolean CanClaim;
private boolean CanUnclaim;
private List<ExtendInfoVo> ExtendInfo;
private String DepartmentCode;
private String _claim_do;
private String _unclaim_do;
private String _flow_detail_do;
private String _detail_url;
}

View File

@ -2,6 +2,7 @@ package com.customization.youhong.guoxiaojun.sso.impl;
import aiyh.utils.Util;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.weaverboot.frame.ioc.anno.classAnno.WeaSsoIocComponent;
import com.weaverboot.frame.ioc.anno.methodAnno.WeaSsoIoc;
import com.weaverboot.frame.ioc.handler.replace.weaReplaceParam.impl.WeaSsoParam;
@ -28,6 +29,7 @@ public class SsoGuoXiaoJunPocImpl {
public static final String API_SSO_URL = "/api/aiyh/guoxiaojun/sso";
public static final String API_CHECK_OUT_URI = "/api/hrm/login/checkLogout";
public static final String LOGIN_OALOGIN_JSP = "/login/OALogin.jsp";
private final Logger log = Util.getLogger();
/**
@ -40,12 +42,21 @@ public class SsoGuoXiaoJunPocImpl {
try {
HttpServletRequest request = weaSsoParam.getRequest();
String requestURI = request.getRequestURI();
log.info("请求地址: " + requestURI);
boolean login = requestURI.contains("login") && requestURI.endsWith(".jsp");
if (LOGIN_OALOGIN_JSP.equalsIgnoreCase(requestURI) || login) {
return;
}
HttpServletResponse response = weaSsoParam.getResponse();
HttpSession session = request.getSession(true);
Object weaverUser = session.getAttribute("weaver_user@bean");
log.info("用户信息:" + JSON.toJSONString(weaverUser));
if (Objects.isNull(weaverUser)) {
session.removeAttribute("outUserId");
} else {
return;
}
if (requestURI.equals(API_SSO_URL)) {
// 登录oa系统
loginOa(request, response);
@ -56,6 +67,10 @@ public class SsoGuoXiaoJunPocImpl {
session.removeAttribute("outUserId");
return;
}
boolean htmlOrJsp = !requestURI.endsWith(".html") && !requestURI.endsWith(".jsp");
if (requestURI.contains("/api") || htmlOrJsp) {
return;
}
// sso 认证
if (session.getAttribute("outUserId") == null) {
authorSso(response);
@ -75,10 +90,13 @@ public class SsoGuoXiaoJunPocImpl {
private void loginOa(HttpServletRequest request, HttpServletResponse response) throws IOException {
HttpSession session;
String outUserId = request.getHeader("X-Credential-Identifier");
log.info("获取的用户id:" + outUserId);
// 登录处理
// String userId = Util.getCusConfigValueNullOrEmpty(outUserId,"1");
String userId = Util.getCusConfigValue(outUserId);
log.info("查询到的配置oa用户id:" + userId);
if (StrUtil.isBlank(userId)) {
response.setStatus(500);
return;
}
SessionUtil.createSession(userId, request, response);

View File

@ -95,7 +95,7 @@ public class MultilingualUtil {
return null;
}
// 构建正则表达式模式
String pattern = Pattern.quote(startPattern) + "(.*?)" + Pattern.quote(endPattern);
String pattern = Pattern.quote(startPattern) + "([\\s\\S]*?)" + Pattern.quote(endPattern);
Pattern regex = Pattern.compile(pattern);
Matcher matcher = regex.matcher(input);
if (matcher.find()) {

View File

@ -0,0 +1,34 @@
package com.customization.youhong.pcn.datasmultilingual.impl;
import com.weaverboot.frame.ioc.anno.classAnno.WeaSsoIocComponent;
import com.weaverboot.frame.ioc.anno.methodAnno.WeaSsoIoc;
import com.weaverboot.frame.ioc.handler.replace.weaReplaceParam.impl.WeaSsoParam;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
/**
* <h1></h1>
*
* <p>create: 2023/7/18 16:51</p>
*
* @author youHong.ai
*/
@WeaSsoIocComponent("RequestFormServiceAddUserIdService")
public class RequestFormServiceAddUserIdImpl {
public static final String API_WORKFLOW_REQFORM_DETAIL_DATA = "/api/workflow/reqform/detailData";
public static final ThreadLocal<User> USER_THREAD_LOCAL = new ThreadLocal<>();
@WeaSsoIoc(order = 1, description = "放入用户信息到指定地方")
public void setUserToLocal(WeaSsoParam weaSsoParam) {
HttpServletRequest request = weaSsoParam.getRequest();
String requestURI = request.getRequestURI();
if (API_WORKFLOW_REQFORM_DETAIL_DATA.equals(requestURI)) {
User user = HrmUserVarify.getUser(request, weaSsoParam.getResponse());
USER_THREAD_LOCAL.set(user);
}
}
}

View File

@ -6,8 +6,8 @@ import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.customization.youhong.pcn.datasmultilingual.MultilingualUtil;
import com.engine.common.constant.ParamConstant;
import com.engine.core.cfg.annotation.ServiceDynamicProxy;
import com.engine.core.cfg.annotation.ServiceMethodDynamicProxy;
import com.engine.core.impl.aop.AbstractServiceProxy;
import com.engine.workflow.entity.requestForm.AutoApproveEntity;
import com.engine.workflow.entity.requestForm.FieldValueBean;
@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -40,8 +39,6 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
private final Logger log = Util.getLogger();
private final Map<String, Integer> ipLanguageMap = new ConcurrentHashMap<>();
private final String startPattern = "~`~`";
private final String endPattern = "`~`~";
@ -51,13 +48,11 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
}
@Override
@ServiceMethodDynamicProxy(desc = "流程加载主表信息")
public String loadForm(HttpServletRequest request) {
String o = (String) executeMethod(request);
log.info("加载主表数据信息:" + JSON.toJSONString(o));
try {
User user = HrmUserVarify.getUser(request, null);
String ipAddr = Util.getIpAddr(request);
ipLanguageMap.put(ipAddr, user.getUID());
JSONObject jsonObject = JSON.parseObject(o);
Object mainData = jsonObject.get("maindata");
if (Objects.isNull(mainData)) {
@ -66,7 +61,7 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
String mainDataStr = JSON.toJSONString(mainData);
// 构建正则表达式模式
String pattern = Pattern.quote(startPattern) + "(.*?)" + Pattern.quote(endPattern);
String pattern = Pattern.quote(startPattern) + "([\\s\\S]*?)" + Pattern.quote(endPattern);
Pattern regex = Pattern.compile(pattern);
Matcher matcher = regex.matcher(mainDataStr);
List<String> valueList = new ArrayList<>();
@ -82,7 +77,7 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
for (String value : valueList) {
mainDataStr = mainDataStr.replaceFirst(pattern, value);
}
jsonObject.put("maindata", mainDataStr);
jsonObject.put("maindata", JSON.parseObject(mainDataStr));
return jsonObject.toJSONString();
} catch (Exception e) {
log.error("解析转换失败:" + Util.getErrString(e));
@ -96,37 +91,28 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
}
@Override
@ServiceMethodDynamicProxy(desc = "流程加载明细数据")
public Map<String, Object> loadDetailData(Map<String, Object> map) {
Map<String, Object> o = (Map<String, Object>) executeMethod(map);
log.info("加载明细数据信息:" + JSON.toJSONString(o));
try {
String ip = Util.null2String(o.get(ParamConstant.PARAM_IP));
Integer languageId = ipLanguageMap.get(ip);
Integer languageId = 7;
User user = RequestFormServiceAddUserIdImpl.USER_THREAD_LOCAL.get();
if (Objects.nonNull(user)) {
languageId = user.getLanguage();
}
for (Map.Entry<String, Object> entry : o.entrySet()) {
Object value = entry.getValue();
if (value instanceof Map) {
Map<Object, Object> valueMap = (Map<Object, Object>) value;
for (Map.Entry<Object, Object> valueEntry : valueMap.entrySet()) {
Object filed = valueEntry.getValue();
if (filed instanceof FieldValueBean) {
FieldValueBean filedValueBean = (FieldValueBean) filed;
String filedValue = filedValueBean.getValue();
String multilingualStr = MultilingualUtil.findString(filedValue, startPattern, endPattern);
if (StrUtil.isNotBlank(multilingualStr)) {
Map<Integer, String> languageMap = MultilingualUtil.getLanguageMap(multilingualStr);
String parseValue = languageMap.get(languageId);
filedValueBean.setValue(parseValue);
}
}
}
}
findFieldValueBean(value, languageId);
}
} catch (Exception e) {
log.error("解析转换明细失败:" + Util.getErrString(e));
} finally {
RequestFormServiceAddUserIdImpl.USER_THREAD_LOCAL.remove();
}
return o;
}
@Override
public Map<String, Object> saveDetailPaging(Map<String, Object> params) {
return null;
@ -143,8 +129,44 @@ public class RequestFormServiceMultilingualImpl extends AbstractServiceProxy imp
}
@Override
@ServiceMethodDynamicProxy(desc = "字段联动多语言处理")
public Map<String, Object> getLinkageResult(HttpServletRequest request, String type) {
return null;
Map<String, Object> result = (Map<String, Object>) executeMethod(request, type);
try {
User user = HrmUserVarify.getUser(request, null);
for (Map.Entry<String, Object> entry : result.entrySet()) {
findFieldValueBean(entry.getValue(), user.getLanguage());
}
} catch (Exception e) {
log.error("解析转换字段联动失败:" + Util.getErrString(e));
}
return result;
}
private void findFieldValueBean(Object obj, Integer languageId) {
if (obj instanceof Map) {
Map<Object, Object> map = (Map<Object, Object>) obj;
for (Map.Entry<Object, Object> entry : map.entrySet()) {
findFieldValueBean(entry.getValue(), languageId);
}
}
if (obj instanceof List) {
List<Object> list = (List<Object>) obj;
for (Object item : list) {
findFieldValueBean(item, languageId);
}
}
if (obj instanceof FieldValueBean) {
FieldValueBean filedValueBean = (FieldValueBean) obj;
String filedValue = filedValueBean.getValue();
String multilingualStr = MultilingualUtil.findString(filedValue, startPattern, endPattern);
if (StrUtil.isNotBlank(multilingualStr)) {
Map<Integer, String> languageMap = MultilingualUtil.getLanguageMap(multilingualStr);
String parseValue = languageMap.get(languageId);
filedValueBean.setValue(parseValue);
}
}
}
@Override

View File

@ -0,0 +1,45 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package weaver.general;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import weaver.file.LogMan;
import weaver.file.Prop;
import java.util.Properties;
public class BaseBean {
private static final Prop prop = Prop.getInstance();
private static final LogMan log = LogMan.getInstance();
public BaseBean() {
}
public String getPropValue(String var1, String var2) {
Prop var10000 = prop;
return Prop.getPropValue(var1, var2);
}
public Properties LoadTemplateProp(String var1) {
Prop var10000 = prop;
return Prop.loadTemplateProp(var1);
}
public void writeLog(Object var1) {
this.writeLog(this.getClass().getName(), var1);
}
public void writeLog(String var1, Object var2) {
Log var3 = LogFactory.getLog(var1);
if (var2 instanceof Exception) {
var3.error(var1, (Exception) var2);
} else {
var3.error(var2);
}
}
}

View File

@ -0,0 +1,180 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package weaver.search;
import weaver.general.BaseBean;
import java.io.Serializable;
public class SearchClause extends BaseBean implements Serializable {
private static final long serialVersionUID = -8607280947214957731L;
private String whereclause = "";
private String whereclause2 = "";
private String orderclause = "";
private String orderclause2 = "";
private String workflowid = "";
private String nodetype = "";
private String fromdate = "";
private String todate = "";
private String creatertype = "";
private String createrid = "";
private String requestlevel = "";
private String requestname = "";
private String fromdate2 = "";
private String todate2 = "";
private String departmentid = "";
private String requestmark = "";
public SearchClause() {
}
public void resetClause() {
this.whereclause = "";
this.whereclause2 = "";
this.orderclause = "";
this.orderclause2 = "";
this.workflowid = "";
this.nodetype = "";
this.fromdate = "";
this.todate = "";
this.creatertype = "";
this.createrid = "";
this.requestlevel = "";
this.requestname = "";
this.fromdate2 = "";
this.todate2 = "";
this.departmentid = "";
this.requestmark = "";
}
public void setWhereClause(String var1) {
this.whereclause = var1;
}
public void setOrderClause(String var1) {
this.orderclause = var1;
}
public void setOrderClause2(String var1) {
this.orderclause2 = var1;
}
public void setWorkflowId(String var1) {
this.workflowid = var1;
}
public void setNodeType(String var1) {
this.nodetype = var1;
}
public void setFromDate(String var1) {
this.fromdate = var1;
}
public void setToDate(String var1) {
this.todate = var1;
}
public void setCreaterType(String var1) {
this.creatertype = var1;
}
public void setCreaterId(String var1) {
this.createrid = var1;
}
public void setRequestLevel(String var1) {
this.requestlevel = var1;
}
public void setRequestName(String var1) {
this.requestname = var1;
}
public void setFromDate2(String var1) {
this.fromdate2 = var1;
}
public void setToDate2(String var1) {
this.todate2 = var1;
}
public String getWhereclause2() {
return this.whereclause2;
}
public void setWhereclause2(String var1) {
this.whereclause2 = var1;
}
public String getDepartmentid() {
return this.departmentid;
}
public void setDepartmentid(String var1) {
this.departmentid = var1;
}
public String getWhereClause() {
return this.whereclause;
}
public String getOrderClause() {
return this.orderclause;
}
public String getOrderClause2() {
return this.orderclause2;
}
public String getWorkflowId() {
return this.workflowid;
}
public String getNodeType() {
return this.nodetype;
}
public String getFromDate() {
return this.fromdate;
}
public String getToDate() {
return this.todate;
}
public String getCreaterType() {
return this.creatertype;
}
public String getCreaterId() {
return this.createrid;
}
public String getRequestLevel() {
return this.requestlevel;
}
public String getRequestName() {
return this.requestname;
}
public String getFromDate2() {
return this.fromdate2;
}
public String getToDate2() {
return this.todate2;
}
public String getRequestmark() {
return this.requestmark;
}
public void setRequestmark(String var1) {
this.requestmark = var1;
}
}

View File

@ -0,0 +1,25 @@
package weaver.xuanran.wang.xk_hospital.model_check.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/25 15:08
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CheckErrorInfo {
private String tableName;
private String dataId;
private String errorFieldName;
private String errorMsg;
private Object currentValue;
private String mainId;
}

View File

@ -0,0 +1,16 @@
package weaver.xuanran.wang.xk_hospital.model_check.entity;
import lombok.Data;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/26 14:37
*/
@Data
public class ModelFieldInfo {
private String fieldName;
private String tableName;
private int viewType;
}

View File

@ -0,0 +1,21 @@
package weaver.xuanran.wang.xk_hospital.model_check.entity;
import lombok.Data;
import java.util.List;
/**
* <h1> </h1>
*
* @author xuanran.wang
* @date 2023/7/24 15:00
*/
@Data
public class XkModelCusCheckConfig {
private int modelTable;
private String modelTableName;
private String onlyMark;
private String cusText;
private List<XkModelCusCheckFiledConfig> filedConfigList;
private List<XkModelCusCheckFiledGroupConfig> filedGroupConfigList;
}

View File

@ -0,0 +1,27 @@
package weaver.xuanran.wang.xk_hospital.model_check.entity;
import lombok.Data;
import java.util.List;
/**
* <h1> 1 </h1>
*
* @author xuanran.wang
* @date 2023/7/24 15:00
*/
@Data
public class XkModelCusCheckFiledConfig {
private String mainId;
private String modelField;
private int checkRule;
private String customerValue;
private String checkExpression;
private String errorMsg;
private int controlLevel;
private String fieldDbType;
private String modelTable;
private String modelTableName;
private List<ModelFieldInfo> modelFieldNameList;
private String cusWhere;
}

View File

@ -0,0 +1,16 @@
package weaver.xuanran.wang.xk_hospital.model_check.entity;
import lombok.Data;
/**
* <h1> 2 </h1>
*
* @author xuanran.wang
* @date 2023/7/24 15:00
*/
@Data
public class XkModelCusCheckFiledGroupConfig {
private int conditionName;
private int conditionRule;
private String customerValue;
}

View File

@ -0,0 +1,26 @@
package weaver.xuanran.wang.xk_hospital.model_check.job;
import aiyh.utils.action.CusBaseCronJob;
import aiyh.utils.annotation.PrintParamMark;
import aiyh.utils.annotation.RequiredMark;
import java.io.IOException;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/24 16:02
*/
public class XkModelCusCheckJob extends CusBaseCronJob {
@RequiredMark
@PrintParamMark
private String onlyMark;
@Override
public void runCode() throws IOException {
}
}

View File

@ -0,0 +1,79 @@
package weaver.xuanran.wang.xk_hospital.model_check.mapper;
import aiyh.utils.annotation.recordset.*;
import weaver.xuanran.wang.xk_hospital.model_check.entity.ModelFieldInfo;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckConfig;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledConfig;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledGroupConfig;
import java.util.List;
import java.util.Map;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/24 15:18
*/
@SqlMapper
public interface XkModelCusCheckMapper {
/**
* <h2>1</h2>
*/
@Select("select a.*, a.mainid main_id, b.tablename model_table_name " +
"from $t{modelTableName}_dt2 a " +
"left join workflow_mode_table_view b " +
"on a.model_table = b.id " +
"where enable = 0")
@Associations( @Association(property = "modelFieldNameList", column = "model_field", id = @Id(value = String.class,methodId = 1)))
List<XkModelCusCheckFiledConfig> queryConditionList(@ParamMapper("modelTableName")String modelTableName);
/**
* <h2></h2>
* @param fieldIds
*/
@AssociationMethod(value = 1)
@Select("select a.fieldname field_name, a.tablename table_name, b.viewtype view_type " +
"from workflow_field_table_view a " +
"left join workflow_billfield b " +
"on a.id = b.id " +
"where a.id in ( $t{fieldIds} )")
List<ModelFieldInfo> queryFieldName(@ParamMapper("fieldIds") String fieldIds);
/**
* <h2>2</h2>
* @param mainId id
*/
@Select("select * from uf_xk_model_data_cus_check_dt2 where mainid = #{mainId} and enable = 0")
@CollectionMethod(2)
List<XkModelCusCheckFiledGroupConfig> queryAssignmentList(@ParamMapper("mainId")int mainId);
@Select("select * from $t{tableName} $t{where}")
List<Map<String, Object>> queryModelMain(@ParamMapper("tableName") String tableName,
@ParamMapper("where") String where);
@Select("select detail.* " +
"from $t{detailTableName} detail " +
"right join $t{mainTableName} main " +
"on detail.mainid = main.id " +
"$t{where} ")
List<Map<String, Object>> queryModelDetail(@ParamMapper("detailTableName") String detailTableName,
@ParamMapper("mainTableName") String mainTableName,
@ParamMapper("where") String where);
@Select(custom = true)
int queryCusSqlCount(@SqlString String sql,
@ParamMapper("mainMap") Map<String, Object> mainMap,
@ParamMapper("detailMap") Map<String, Object> detailMap);
@Select(custom = true)
Map<String, Object> queryCusSqlMap(@SqlString String sql,
@ParamMapper("mainMap") Map<String, Object> mainMap,
@ParamMapper("detailMap") Map<String, Object> detailMap);
@Select(custom = true)
String queryCusSqlDate(@SqlString String sql,
@ParamMapper("mainMap") Map<String, Object> mainMap,
@ParamMapper("detailMap") Map<String, Object> detailMap);
}

View File

@ -0,0 +1,136 @@
package weaver.xuanran.wang.xk_hospital.model_check.service;
import aiyh.utils.Util;
import aiyh.utils.function.Bi4Function;
import aiyh.utils.tool.Assert;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import aiyh.utils.zwl.common.ToolUtil;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.xuanran.wang.xk_hospital.model_check.entity.*;
import weaver.xuanran.wang.xk_hospital.model_check.mapper.XkModelCusCheckMapper;
import weaver.xuanran.wang.xk_hospital.model_check.util.CheckRuleMethodUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <h1> </h1>
*
* @author xuanran.wang
* @date 2023/7/24 16:07
*/
public class XkModelCusCheckService {
private final XkModelCusCheckMapper mapper = Util.getMapper(XkModelCusCheckMapper.class);
private final ToolUtil toolUtil = new ToolUtil();
public List<XkModelCusCheckFiledConfig> getFieldCheckRuleConfigList(){
String configTableName = Util.null2DefaultStr(toolUtil.getSystemParamValue("checkRuleConfigTableName"), "uf_yyhcfxgz");
return mapper.queryConditionList(configTableName);
}
public void checkModelData(List<XkModelCusCheckFiledConfig> configList){
// 根据建模表名进行分组 查找出每个表对应有哪些校验规则事项
Map<String, List<XkModelCusCheckFiledConfig>> map = configList.stream().collect(Collectors.groupingBy(XkModelCusCheckFiledConfig::getModelTableName));
List<CheckErrorInfo> result = new ArrayList<>();
for (Map.Entry<String, List<XkModelCusCheckFiledConfig>> entry : map.entrySet()) {
// 在对每个表的第一个字段做分组 找出主表和明细表
List<XkModelCusCheckFiledConfig> filedConfigs = entry.getValue();
Map<String, List<XkModelCusCheckFiledConfig>> configMap = filedConfigs.stream()
.collect(Collectors.groupingBy(item->item.getModelFieldNameList().get(0).getTableName()));
System.out.println("configMap : \n" + JSONObject.toJSONString(configMap));
// 主表表名
String mainTableName = entry.getKey();
// 主表数据
List<Map<String, Object>> modelList = mapper.queryModelMain(mainTableName,"");
// 主表校验规则配置
List<XkModelCusCheckFiledConfig> mainTableConfig = configMap.remove(mainTableName);
// 先处理主表数据
checkModel(mainTableName, new HashMap<>(), modelList, mainTableConfig, result);
// 明细数据
for (Map.Entry<String, List<XkModelCusCheckFiledConfig>> detailEntry : configMap.entrySet()) {
String detailTable = detailEntry.getKey();
List<Map<String, Object>> detailModel = mapper.queryModelDetail(detailTable, mainTableName, "");
if(CollectionUtils.isEmpty(detailModel)){
continue;
}
// 主表的mainId
String detailMainId = Util.null2DefaultStr(detailModel.get(0).get("mainid"), "");
if(StrUtil.isBlank(detailMainId)){
continue;
}
List<Map<String, Object>> mainList = modelList.stream().filter(item -> {
String id = Util.null2DefaultStr(item.get("id"), "");
return StrUtil.isNotBlank(id) && detailMainId.equals(id);
}).collect(Collectors.toList());
if(CollectionUtils.isEmpty(mainList)){
Util.getLogger()
.error(Util.logStr("当前明细表: {}, detailMainId: {} 在主表数据集合中没找到对应的主表数据! 当前主表数据集合: {}", detailTable, detailMainId, JSONObject.toJSONString(modelList)));
continue;
}
List<XkModelCusCheckFiledConfig> detailConfig = detailEntry.getValue();
checkModel(detailTable, mainList.get(0), detailModel, detailConfig, result);
}
}
System.out.println("result : \n" + JSONObject.toJSONString(result));
}
public String buildWhereSql(String modelWhereSql, boolean joinQuery){
StringBuilder sb = new StringBuilder();
modelWhereSql = Util.sbc2dbcCase(modelWhereSql);
if(StrUtil.isNotBlank(modelWhereSql)){
sb.append(modelWhereSql);
}
if(joinQuery && StrUtil.isNotBlank(modelWhereSql)){
sb.append(" detail.").append(modelWhereSql).append(" and ").append(" main.").append(modelWhereSql);
}
if(sb.length() > 0){
sb.insert(0, " where ");
}
return sb.toString();
}
public void checkModel(String tableName,
Map<String, Object> mainMap,
List<Map<String, Object>> modelList,
List<XkModelCusCheckFiledConfig> configs,
List<CheckErrorInfo> result){
if(CollectionUtils.isEmpty(configs) || CollectionUtils.isEmpty(modelList)){
return;
}
Map<String, Object> tempMainMap;
for (Map<String, Object> map : modelList) {
for (XkModelCusCheckFiledConfig config : configs) {
int viewType = config.getModelFieldNameList().get(0).getViewType();
boolean isMain = viewType == 0;
tempMainMap = isMain ? map : mainMap;
Bi4Function<XkModelCusCheckFiledConfig, XkModelCusCheckFiledGroupConfig, Map<String, Object>, Map<String, Object>, Boolean> function = CheckRuleMethodUtil.CHECK_RULE_MAP.get(config.getCheckRule());
if(function == null){
continue;
}
Boolean check = function.apply(config, null, tempMainMap, map);
if(!check){
String fieldName = config.getModelFieldNameList().get(0).getFieldName();
String mainId = Util.null2DefaultStr(tempMainMap.get("id"), "");
String itemId = Util.null2DefaultStr(map.get("id"), "");
CheckErrorInfo errorInfo = CheckErrorInfo.builder()
.errorMsg(config.getErrorMsg())
.errorFieldName(fieldName)
.tableName(tableName)
.dataId(isMain ? mainId : itemId)
.currentValue(map.get(fieldName))
.mainId(mainId)
.build();
result.add(errorInfo);
}
}
}
}
}

View File

@ -0,0 +1,301 @@
package weaver.xuanran.wang.xk_hospital.model_check.util;
import aiyh.utils.ScriptUtil;
import aiyh.utils.Util;
import aiyh.utils.annotation.MethodRuleNo;
import aiyh.utils.excention.CustomerException;
import aiyh.utils.function.Bi4Function;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.log4j.Logger;
import weaver.general.TimeUtil;
import weaver.xuanran.wang.xk_hospital.model_check.entity.ModelFieldInfo;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledConfig;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledGroupConfig;
import weaver.xuanran.wang.xk_hospital.model_check.mapper.XkModelCusCheckMapper;
import java.lang.reflect.Method;
import java.util.*;
/**
* <h1></h1>
*
* <p>create: 2023/6/14 18:30</p>
*
* @author youHong.ai
*/
public class CheckRuleMethodUtil {
private static final Logger log = Util.getLogger();
private static final XkModelCusCheckMapper mapper = Util.getMapper(XkModelCusCheckMapper.class);
public static final Map<Integer,
Bi4Function<XkModelCusCheckFiledConfig, XkModelCusCheckFiledGroupConfig, Map<String, Object>, Map<String, Object>, Boolean>
> CHECK_RULE_MAP = new HashMap<>(8);
private static final CusJexlFunctions CUS_SCRIPT_FUN = new CusJexlFunctions();
static {
try {
Class<CheckRuleMethodUtil> checkRuleMethodUtilClass = CheckRuleMethodUtil.class;
Method[] methods = checkRuleMethodUtilClass.getDeclaredMethods();
for (Method method : methods) {
if (method.isAnnotationPresent(MethodRuleNo.class)) {
MethodRuleNo annotation = method.getAnnotation(MethodRuleNo.class);
int value = annotation.value();
CHECK_RULE_MAP.put(value, (filedConfig, groupConfig, mainMap, detailMap) -> {
try {
return (Boolean) method.invoke(null, filedConfig, groupConfig, mainMap,detailMap);
} catch (Exception e) {
log.error("调用CheckRuleMethodUtil类中注解方法失败" + Util.getErrString(e));
throw new RuntimeException(e);
}
});
}
}
} catch (Exception e) {
log.error("初始化CheckRuleMethodUtil失败" + Util.getErrString(e));
}
}
@MethodRuleNo(value = 0, desc = "不为空")
private static boolean noNull(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
boolean check = true;
for (ModelFieldInfo fieldInfo : filedConfig.getModelFieldNameList()) {
int mainOrDetail = fieldInfo.getViewType();
if(mainOrDetail == 0){
check = StrUtil.isNotBlank(Util.null2DefaultStr(mainMap.get(fieldInfo.getFieldName()),""));
}else {
check = StrUtil.isNotBlank(Util.null2DefaultStr(detailMap.get(fieldInfo.getFieldName()),""));
}
}
return check;
}
// @MethodRuleNo(value = 0, desc = "整数类型")
private static boolean isNumber(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
try {
for (ModelFieldInfo fieldInfo : filedConfig.getModelFieldNameList()) {
int mainOrDetail = fieldInfo.getViewType();
if(mainOrDetail == 0) {
Integer.parseInt(Util.null2DefaultStr(mainMap.get(fieldInfo.getFieldName()), ""));
}else {
Integer.parseInt(Util.null2DefaultStr(detailMap.get(fieldInfo.getFieldName()), ""));
}
}
return true;
} catch (Exception e) {
return false;
}
}
// @MethodRuleNo(value = 2, desc = "小数类型")
private static boolean isDouble(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
try {
for (ModelFieldInfo fieldInfo : filedConfig.getModelFieldNameList()) {
int mainOrDetail = fieldInfo.getViewType();
if (mainOrDetail == 0) {
Double.parseDouble(Util.null2DefaultStr(mainMap.get(fieldInfo.getFieldName()), ""));
} else {
Double.parseDouble(Util.null2DefaultStr(detailMap.get(fieldInfo.getFieldName()), ""));
}
}
return true;
} catch (Exception e) {
return false;
}
}
@MethodRuleNo(value = 1, desc = "字段长度")
private static boolean isEnumerate(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
boolean check = true;
for (ModelFieldInfo fieldInfo : filedConfig.getModelFieldNameList()) {
if (fieldInfo.getViewType() == 0) {
check = (boolean) ScriptUtil.invokeScript(fieldInfo.getFieldName() + ".length() " + filedConfig.getCheckExpression(), mainMap);
}else {
check = (boolean) ScriptUtil.invokeScript(fieldInfo.getFieldName() + ".length() " + filedConfig.getCheckExpression(), detailMap);
}
}
return check;
}
@MethodRuleNo(value = 2, desc = "自定义sql存在值")
private static boolean customerSqlHasValue(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
String sql = sqlHandle(filedConfig.getCustomerValue());
if(StrUtil.isBlank(sql)){
return true;
}
return mapper.queryCusSqlCount(sql, mainMap, detailMap) > 0;
}
@MethodRuleNo(value = 3, desc = "自定义sql校验表达式")
private static boolean customerSqlCheck(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
String expression = filedConfig.getCheckExpression();
if(StrUtil.isBlank(expression)){
return true;
}
String sql = sqlHandle(filedConfig.getCustomerValue());
if(StrUtil.isBlank(sql)){
return true;
}
Map<String, Object> valueMap = mapper.queryCusSqlMap(sql, mainMap, detailMap);
try {
return (Boolean) ScriptUtil.invokeScript(expression, valueMap, CUS_SCRIPT_FUN);
}catch (Exception e){
log.error("自定义表达式执行失败! " + e.getMessage());
Util.logErrorStr(e);
return false;
}
}
// @MethodRuleNo(value = 6, desc = "自定义表达式")
private static boolean checkCustomerExpression(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
// String expression = Util.sbc2dbcCase(filedConfig.getCheckExpression());
// if(StrUtil.isBlank(expression)){
// return true;
// }
// try {
// if(filedConfig.getMainOrDetail() == 0){
// return (Boolean)ScriptUtil.invokeScript(expression, mainMap, CUS_SCRIPT_FUN);
// } else {
// return (Boolean)ScriptUtil.invokeScript(expression, detailMap, CUS_SCRIPT_FUN);
// }
// }catch (Exception e){
// log.error("自定义表达式执行失败! " + e.getMessage());
// Util.logErrorStr(e);
// return false;
// }
return true;
}
@MethodRuleNo(value = 4, desc = "两个日期相差月数")
private static boolean twoDateSubMonth(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
List<ModelFieldInfo> fieldNameList = filedConfig.getModelFieldNameList();
if(!checkFieldConf(fieldNameList)){
return false;
}
Map<String, Object> dateMap = parse2DateMap(filedConfig, fieldNameList, mainMap, detailMap);
String scriptStr = "CusJexlFunctions.twoDateSubNoFormat(beginDate,endDate, 1) " + filedConfig.getCheckExpression();
return (boolean) ScriptUtil.invokeScript(scriptStr, dateMap);
}
@MethodRuleNo(value = 5, desc = "自定义校验")
private static boolean checkCustomerInterface(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
String customerValue = filedConfig.getCustomerValue();
if (StrUtil.isBlank(customerValue)) {
return true;
}
Map<String, String> pathMap = Util.parseCusInterfacePathParam(customerValue);
String classPath = pathMap.remove("_ClassPath");
CusCheckRuleInterface instance = Util.getClassInstance(classPath, CusCheckRuleInterface.class);
try {
return instance.checkRule(filedConfig, groupConfig, mainMap, detailMap, pathMap);
} catch (Exception e){
log.error("自定义接口校验error! : " + e.getMessage());
Util.logErrorStr(e);
return false;
}
}
@MethodRuleNo(value = 6, desc = "第一个日期字段是否早于第二个日期字段")
private static boolean compare2Date(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap) {
List<ModelFieldInfo> fieldNameList = filedConfig.getModelFieldNameList();
if(!checkFieldConf(fieldNameList)){
return false;
}
Map<String, Object> dateMap = parse2DateMap(filedConfig, fieldNameList, mainMap, detailMap);
String scriptStr = "CusJexlFunctions.compare2Date(beginDate,endDate) " + filedConfig.getCheckExpression();
return (boolean) ScriptUtil.invokeScript(scriptStr, dateMap);
}
public static String sqlHandle(String cusSql){
String customerValue = Util.sbc2dbcCase(cusSql);
if(StrUtil.isBlank(customerValue)){
return "";
}
if(!customerValue.startsWith("select ")){
return "";
}
return customerValue;
}
public static boolean checkFieldConf(List<ModelFieldInfo> fieldNameList) {
if (CollectionUtils.isEmpty(fieldNameList) || fieldNameList.size() > 2) {
Util.getLogger().error("校验规则选择日期相差月数时, 表单字段不能超过2个!");
return false;
}
return true;
}
public static Map<String, Object> parse2DateMap(XkModelCusCheckFiledConfig filedConfig,
List<ModelFieldInfo> fieldNameList,
Map<String, Object> mainMap,
Map<String, Object> detailMap){
String beginDate = "";
String endDate = "";
Map<String, Object> dateMap = new HashMap<>();
// 如果只勾选了一个字段
if(fieldNameList.size() == 1){
String cusWhere = filedConfig.getCusWhere();
if(StrUtil.isNotBlank(cusWhere)){
String sql = sqlHandle(cusWhere);
endDate = mapper.queryCusSqlDate(sql, mainMap, detailMap);
if(StrUtil.isBlank(endDate)){
endDate = TimeUtil.getCurrentDateString();
}
}else {
endDate = TimeUtil.getCurrentDateString();
}
}else {
for (int i = 0; i < fieldNameList.size(); i++) {
ModelFieldInfo fieldInfo = fieldNameList.get(i);
String date;
if (fieldInfo.getViewType() == 0) {
date = Util.null2DefaultStr(mainMap.get(fieldInfo.getFieldName()),"");
}else {
date = Util.null2DefaultStr(detailMap.get(fieldInfo.getFieldName()),"");
}
if(i == 0){
beginDate = date;
}else {
endDate = date;
}
}
}
dateMap.put("endDate", endDate);
dateMap.put("beginDate", beginDate);
return dateMap;
}
}

View File

@ -0,0 +1,20 @@
package weaver.xuanran.wang.xk_hospital.model_check.util;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledConfig;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledGroupConfig;
import java.util.Map;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/25 13:16
*/
public interface CusCheckRuleInterface {
boolean checkRule(XkModelCusCheckFiledConfig filedConfig,
XkModelCusCheckFiledGroupConfig groupConfig,
Map<String, Object> mainMap,
Map<String, Object> detailMap,
Map<String, String> pathMap);
}

View File

@ -0,0 +1,239 @@
package weaver.xuanran.wang.xk_hospital.model_check.util;
import aiyh.utils.Util;
import aiyh.utils.interfaces.script_util.CusScriptFunInterface;
import aiyh.utils.tool.cn.hutool.core.util.StrUtil;
import aiyh.utils.tool.org.apache.commons.jexl3.JexlException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/25 16:23
*/
public class CusJexlFunctions implements CusScriptFunInterface {
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:15
* @param str
* @return
**/
public BigDecimal parseDecimal(String str) {
try {
if(StrUtil.isBlank(str)){
return new BigDecimal("0");
}
return new BigDecimal(str);
} catch (NumberFormatException e) {
throw new JexlException(null, "Invalid number format: " + str);
}
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:15
* @param dateStr yyyy-MM-dd
* @return
**/
public int parsNormalDateMonth(String dateStr){
return parseDateMonth(dateStr, "yyyy-MM-dd");
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:16
* @param dateStr
* @param format
* @return
**/
public int parseDateMonth(String dateStr, String format) {
try {
LocalDate currentDate = LocalDate.now();
if(StrUtil.isBlank(dateStr)){
return currentDate.getMonthValue();
}
currentDate = parseDateStr2LocalDate(dateStr, format);
return currentDate.getMonthValue();
} catch (Exception e) {
throw new JexlException(null, "Invalid date format error! dateStr : " + dateStr + " ,format : " + format);
}
}
/**
* <h1>yyyy-MM-dd</h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:17
* @param dateStr
* @return -
**/
public int normalDateStrSubCurrentMonth(String dateStr){
int dateMonth = parseDateMonth(dateStr, "yyyy-MM-dd");
return LocalDate.now().getMonthValue() - dateMonth;
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:19
* @param dateStr
* @param format
* @return -
**/
public int dateStrSubCurrentMonth(String dateStr, String format){
int dateMonth = parseDateMonth(dateStr, format);
return LocalDate.now().getMonthValue() - dateMonth;
}
/**
* <h1>yyyy-MM-dd</h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:17
* @param dateStr
* @return -
**/
public int normalDateStrSubCurrentMonthAbs(String dateStr){
return Math.abs(normalDateStrSubCurrentMonth(dateStr));
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:19
* @param dateStr
* @param format
* @return -
**/
public int dateStrSubCurrentMonthAbs(String dateStr, String format){
return Math.abs(dateStrSubCurrentMonth(dateStr, format));
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:20
* @param dateStr
* @param format
* @return LocalDate
**/
public LocalDate parseDateStr2LocalDate(String dateStr, String format){
try {
if(StrUtil.isBlank(format)){
format = "yyyy-MM-dd";
}
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
return LocalDate.parse(dateStr, formatter);
}catch (Exception e){
Util.getLogger().error("解析LocalDate error!" + e.getMessage());
return LocalDate.now();
}
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:21
* @param firstDate
* @param secondDate
* @return
**/
public boolean compare2Date(String firstDate, String secondDate){
try {
LocalDate firstLocalDate = parseDateStr2LocalDate(firstDate, "");
LocalDate secondLocalDate = parseDateStr2LocalDate(secondDate, "");
return firstLocalDate.isBefore(secondLocalDate);
}catch (Exception e){
Util.getLogger().error("解析LocalDate error!" + e.getMessage());
return true;
}
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:21
* @param firstDate
* @param firstDateFormat
* @param secondDate
* @param secondDateFormat
* @return
**/
public boolean compare2Date(String firstDate,
String firstDateFormat,
String secondDate,
String secondDateFormat){
try {
LocalDate firstLocalDate = parseDateStr2LocalDate(firstDate, firstDateFormat);
LocalDate secondLocalDate = parseDateStr2LocalDate(secondDate, secondDateFormat);
return firstLocalDate.isBefore(secondLocalDate);
}catch (Exception e){
Util.getLogger().error("解析LocalDate error!" + e.getMessage());
return true;
}
}
/**
* <h1>yyyy-MM-dd</h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:49
* @param firstDate
* @param secondDate
* @param type
* @return
**/
public long twoDateSubNoFormat(String firstDate, String secondDate, int type){
return twoDateSub(firstDate,"", secondDate, "", type);
}
/**
* <h1></h1>
* @author xuanran.wang
* @dateTime 2023/7/26 10:51
* @param firstDate
* @param firstDateFormat
* @param secondDate
* @param secondDateFormat
* @param type 0: , 1: , 2: , 3: , 4: , 5:
* @return
**/
public long twoDateSub(String firstDate,
String firstDateFormat,
String secondDate,
String secondDateFormat,
int type){
LocalDate firstLocalDate = parseDateStr2LocalDate(firstDate, firstDateFormat);
LocalDate secondLocalDate = parseDateStr2LocalDate(secondDate, secondDateFormat);
switch (type){
case 0:{
return ChronoUnit.YEARS.between(firstLocalDate, secondLocalDate);
}
case 1:{
return ChronoUnit.MONTHS.between(firstLocalDate, secondLocalDate);
}
case 2:{
return ChronoUnit.DAYS.between(firstLocalDate, secondLocalDate);
}
case 3:{
return ChronoUnit.HOURS.between(firstLocalDate, secondLocalDate);
}
case 4:{
return ChronoUnit.MINUTES.between(firstLocalDate, secondLocalDate);
}
case 5:{
return ChronoUnit.SECONDS.between(firstLocalDate, secondLocalDate);
}
default: {
return 0;
}
}
}
}

View File

@ -4,15 +4,15 @@ import aiyh.utils.Util;
import aiyh.utils.mapUtil.ParaMap;
import aiyh.utils.sqlUtil.sqlResult.impl.PrepSqlResultImpl;
import aiyh.utils.zwl.common.ToolUtil;
import com.alibaba.fastjson.JSON;
import com.api.aiyh_pcn.copy_attachment.dao.ConfigTableData;
import com.api.aiyh_pcn.copy_attachment.model.ConfigEmpty;
import org.apache.log4j.Logger;
import weaver.conn.RecordSet;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @author EBU7-dev1-ayh
@ -22,111 +22,121 @@ import java.util.Map;
public class CopyAttachmentAction extends ToolUtil implements Action {
//当前类名称
private final String className = "AddCustomer_Action";
private String overrideField;
@Override
public String execute(RequestInfo requestInfo) {
this.writeDebuggerLog(className + "======>" + overrideField);
try {
String workflowid = requestInfo.getWorkflowid();
//流程请求ID
String requestid = Util.null2String(requestInfo.getRequestid());
//流程表单名称
String tableName = requestInfo.getRequestManager().getBillTableName();
ConfigEmpty config = ConfigTableData.getConfig(workflowid);
/** 覆盖附件的字段id */
private String overrideField;
private final Logger log = Util.getLogger();
@Override
public String execute(RequestInfo requestInfo) {
try {
String workflowid = requestInfo.getWorkflowid();
// 流程请求ID
String requestid = Util.null2String(requestInfo.getRequestid());
// 流程表单名称
String tableName = requestInfo.getRequestManager().getBillTableName();
ConfigEmpty config = ConfigTableData.getConfig(workflowid);
// 查询是流程数据
String query = "select * from " + tableName + " where requestid = ?";
RecordSet rs = new RecordSet();
rs.executeQuery(query, requestid);
Map<String, Object> requestMap = Util.recordSet2Map(rs);
if (requestMap == null || config == null) {
return Action.SUCCESS;
}
if (!requestMap.get(config.getShowField()).equals(config.getShowValue())) {
return Action.SUCCESS;
}
String query = "select * from " + tableName + " where requestid = ?";
RecordSet rs = new RecordSet();
rs.executeQuery(query, requestid);
Map<String, Object> requestMap = Util.recordSet2Map(rs);
if (requestMap == null || config == null) {
return Action.SUCCESS;
}
if (!requestMap.get(config.getShowField()).equals(config.getShowValue())) {
return Action.SUCCESS;
}
// 需要模板覆盖
String attachmentValue = String.valueOf(requestMap.get(config.getAttachmentField()));
String overrideValue = String.valueOf(requestMap.get(overrideField));
this.writeDebuggerLog(requestMap.toString());
String attachmentValue = String.valueOf(requestMap.get(config.getAttachmentField()));
String overrideValue = String.valueOf(requestMap.get(overrideField));
log.info(JSON.toJSONString(requestMap));
// 查询这些文件的相关信息
query = "select distinct docid,imagefilename from docimagefile where docid in (" + attachmentValue + ")";
this.writeDebuggerLog("查询附件信息说sql:" + query);
rs.executeQuery(query);
List<AttachmentIdName> attachmentList = Util.recordeSet2Array(rs, AttachmentIdName.class);
query = "select distinct docid,imagefilename from docimagefile where docid in (" + overrideValue + ")";
rs.executeQuery(query);
this.writeDebuggerLog("查询覆盖文件信息:" + query);
List<AttachmentIdName> overrideList = Util.recordeSet2Array(rs, AttachmentIdName.class);
this.writeDebuggerLog(attachmentList.toString());
this.writeDebuggerLog(overrideList.toString());
if (attachmentList.size() != overrideList.size()) {
requestInfo.getRequestManager().setMessagecontent("合同模板与上传模板数量不一致");
requestInfo.getRequestManager().setMessageid("合同模板与上传模板数量不一致");
return Action.FAILURE_AND_CONTINUE;
}
query = "select distinct docid,imagefilename from docimagefile where docid in (" + attachmentValue + ")";
rs.executeQuery(query);
List<AttachmentIdName> attachmentList = Util.recordeSet2Array(rs, AttachmentIdName.class);
query = "select distinct docid,imagefilename from docimagefile where docid in (" + overrideValue + ")";
rs.executeQuery(query);
List<AttachmentIdName> overrideList = Util.recordeSet2Array(rs, AttachmentIdName.class);
Set<String> docSet = new HashSet<>();
Set<String> overridSet = new HashSet<>();
for (AttachmentIdName attachmentIdName : attachmentList) {
docSet.add(attachmentIdName.getDocid());
}
for (AttachmentIdName attachmentIdName : overrideList) {
overridSet.add(attachmentIdName.getDocid());
}
if (docSet.size() != overridSet.size()) {
requestInfo.getRequestManager().setMessagecontent("合同模板与上传模板数量不一致");
requestInfo.getRequestManager().setMessageid("合同模板与上传模板数量不一致");
return Action.FAILURE_AND_CONTINUE;
}
// 需要移除的文件
List<AttachmentIdName> removeFile = new ArrayList<>();
List<AttachmentIdName> removeFile = new ArrayList<>();
// 移除所有的pdf文件
for (AttachmentIdName overrideIdName : overrideList) {
String fileName = overrideIdName.getImagefilename();
String extension = "";
this.writeDebuggerLog(overrideIdName.toString());
int index = fileName.lastIndexOf('.');
if (index > 0) {
extension = fileName.substring(index + 1);
}
this.writeDebuggerLog(extension);
if ("pdf".equalsIgnoreCase(extension)) {
removeFile.add(overrideIdName);
}
}
for (AttachmentIdName overrideIdName : overrideList) {
String fileName = overrideIdName.getImagefilename();
String extension = "";
log.info(overrideIdName.toString());
int index = fileName.lastIndexOf('.');
if (index > 0) {
extension = fileName.substring(index + 1);
}
if ("pdf".equalsIgnoreCase(extension)) {
removeFile.add(overrideIdName);
}
}
// 删除文件
for (AttachmentIdName overrideIdName : removeFile) {
overrideList.remove(overrideIdName);
}
for (AttachmentIdName overrideIdName : removeFile) {
overrideList.remove(overrideIdName);
}
// 添加pdf文件
for (AttachmentIdName attachmentIdName : attachmentList) {
String fileName = attachmentIdName.getImagefilename();
String extension = "";
this.writeDebuggerLog(attachmentIdName.toString());
int index = fileName.lastIndexOf('.');
if (index > 0) {
extension = fileName.substring(index + 1);
}
this.writeDebuggerLog(extension);
if ("pdf".equalsIgnoreCase(extension)) {
overrideList.add(attachmentIdName);
}
}
if (attachmentList.size() != overrideList.size()) {
requestInfo.getRequestManager().setMessagecontent("合同模板与上传模板数量不一致");
requestInfo.getRequestManager().setMessageid("合同模板与上传模板数量不一致");
return Action.FAILURE_AND_CONTINUE;
}
StringBuilder overrideBuilder = new StringBuilder();
for (AttachmentIdName overrideIdName : overrideList) {
overrideBuilder.append(",").append(overrideIdName.getDocid());
}
String overrideResult = Util.removeSeparator(overrideBuilder);
this.writeDebuggerLog(overrideResult);
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(tableName, ParaMap.create().put(this.overrideField, overrideResult),
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestid));
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
} catch (Exception e) {
this.writeErrorLog(e.getMessage());
}
return Action.SUCCESS;
}
public String getOverrideField() {
return overrideField;
}
public void setOverrideField(String overrideField) {
this.overrideField = overrideField;
}
for (AttachmentIdName attachmentIdName : attachmentList) {
String fileName = attachmentIdName.getImagefilename();
String extension = "";
int index = fileName.lastIndexOf('.');
if (index > 0) {
extension = fileName.substring(index + 1);
}
if ("pdf".equalsIgnoreCase(extension)) {
overrideList.add(attachmentIdName);
}
}
docSet.clear();
overridSet.clear();
for (AttachmentIdName attachmentIdName : attachmentList) {
docSet.add(attachmentIdName.getDocid());
}
for (AttachmentIdName attachmentIdName : overrideList) {
overridSet.add(attachmentIdName.getDocid());
}
if (docSet.size() != overridSet.size()) {
requestInfo.getRequestManager().setMessagecontent("合同模板与上传模板数量不一致");
requestInfo.getRequestManager().setMessageid("合同模板与上传模板数量不一致");
return Action.FAILURE_AND_CONTINUE;
}
StringBuilder overrideBuilder = new StringBuilder();
for (AttachmentIdName overrideIdName : overrideList) {
overrideBuilder.append(",").append(overrideIdName.getDocid());
}
String overrideResult = Util.removeSeparator(overrideBuilder);
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(tableName, ParaMap.create().put(this.overrideField, overrideResult),
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestid));
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
} catch (Exception e) {
this.log.error(e.getMessage());
}
return Action.SUCCESS;
}
public String getOverrideField() {
return overrideField;
}
public void setOverrideField(String overrideField) {
this.overrideField = overrideField;
}
}

View File

@ -0,0 +1,66 @@
package xuanran.wang.xk_hospital.test;
import aiyh.utils.ScriptUtil;
import aiyh.utils.tool.org.apache.commons.jexl3.*;
import basetest.BaseTest;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections.CollectionUtils;
import org.junit.Test;
import weaver.general.TimeUtil;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckConfig;
import weaver.xuanran.wang.xk_hospital.model_check.entity.XkModelCusCheckFiledConfig;
import weaver.xuanran.wang.xk_hospital.model_check.service.XkModelCusCheckService;
import weaver.xuanran.wang.xk_hospital.model_check.util.CusJexlFunctions;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <h1></h1>
*
* @author xuanran.wang
* @date 2023/7/24 14:28
*/
public class XkHospitalCheckModelTest extends BaseTest {
private final XkModelCusCheckService service = new XkModelCusCheckService();
private static final CusJexlFunctions FUN = new CusJexlFunctions();
@Test
public void testA(){
HashMap<String, Object> map = new HashMap<>();
map.put("a","测试");
map.put("b", "112094.28");
System.out.println(map);
boolean res = (boolean) ScriptUtil.invokeScript("a.length() > 3", map, FUN);
System.out.println(res);
HashMap<String, Object> map2 = new HashMap<>();
map2.put("str", "数据卡健身卡净空法师大法师");
map2.put("currentDate", new Date());
map2.put("month", 3);
boolean res2 = (boolean)ScriptUtil.invokeScript("currentDate.getMonth() - month > 1", map2);
System.out.println(res2);
}
@Test
public void testB(){
List<XkModelCusCheckFiledConfig> configList = service.getFieldCheckRuleConfigList();
System.out.println(JSONObject.toJSONString(configList));
service.checkModelData(configList);
// service.checkModelData(config);
}
@Test
public void testC(){
System.out.println(FUN.compare2Date("2023-07-26", "2023-07-27"));
System.out.println(FUN.normalDateStrSubCurrentMonthAbs("2023-08-01"));
System.out.println(FUN.twoDateSubNoFormat("2023-08-01", "2023-09-01", 2));
}
}

View File

@ -117,4 +117,12 @@ public class XkHospitalTest extends BaseTest {
Util.null2DefaultStr(null,"");
service.async("4bce0693734d","common", map);
}
@Test
public void testD(){
String json = "{\"data\":[{\"ID\":\"2\",\"GroupID\":\"test_yl_01\",\"Wards\":[]},{\"ID\":\"1\",\"GroupID\":\"test_yl_01\",\"Wards\":[{\"ID\":\"1\",\"WardCode\":\"bq_01\",\"WardName\":\"病区名称01_1\"},{\"ID\":\"2\",\"WardCode\":\"bq_02\",\"WardName\":\"病区名称01_2\"},{\"ID\":\"3\",\"WardCode\":\"bq_03\",\"WardName\":\"病区名称0_2_3\"},{\"ID\":\"4\",\"WardCode\":\"bq_04\",\"WardName\":\"病区名称02_1_3\"}]}]}\n";
System.out.println(json);
Map map = JSONObject.parseObject(json, Map.class);
service.async("testarr","common", map);
}
}

View File

@ -1,6 +1,8 @@
package youhong.ai.pcn;
import aiyh.utils.GenerateFileUtil;
import basetest.BaseTest;
import com.api.youhong.ai.guojun.sso.controller.SsoLoginAuthController;
import com.api.youhong.ai.pcn.download.service.EncryptionFileIdUtil;
import com.api.youhong.ai.pcn.ssoyunzhao.service.SsoYunZhaoService;
import org.junit.Test;
@ -36,4 +38,10 @@ public class Test01 extends BaseTest {
String decode = URLDecoder.decode(encode, "UTF-8");
System.out.println(EncryptionFileIdUtil.decrypt(decode));
}
@Test
public void test() {
// System.out.println(Double.class.isAssignableFrom(double.class));
GenerateFileUtil.createApiDoc(SsoLoginAuthController.class);
}
}

View File

@ -1,11 +1,10 @@
package youhong.ai.pcn.multilingual;
import basetest.BaseTest;
import com.alibaba.fastjson.JSON;
import com.customization.youhong.pcn.datasmultilingual.MultilingualUtil;
import org.junit.Test;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* <h1>ceshi</h1>
*
@ -18,51 +17,19 @@ public class MultilingualTest extends BaseTest {
@Test
public void test() {
String mainDataStr = "{\n" +
" \"detail_1\":\n" +
" {\n" +
" \"indexnum\": 1,\n" +
" \"rowDatas\":\n" +
" {\n" +
" \"row_0\":\n" +
" {\n" +
" \"field24478\":\n" +
" {\n" +
" \"value\": \"A:\\nB:\\nC:\\nD:\"\n" +
" },\n" +
" \"field24632\":\n" +
" {\n" +
" \"value\": \"\"\n" +
" },\n" +
" \"field24631\":\n" +
" {\n" +
" \"value\": \"~`~`7当与商业伙伴、客户或第三方打交道时必须避免留下任何保时捷进行不寻常的业务实践或有针对性的措施以对业务决策施加不公平的影响的印象。因此如果向商业伙伴、客户或第三方提供/收取的利益不符合以下容许标准,或者发现给予方的动机不纯正时,则不得寻求或鼓励、且应拒绝从商业伙伴、客户或第三方那里获得或向其提供利益。\\n(1) 无(潜在)利益冲突:根据员工和直线经理的评估,以及经咨询集团或本地合规咨询平台(如适用),提供或收取利益不构成利益冲突。\\n(2) 不得给予好处:不得采取意在影响商业决策或获得对价、超出内部批准的促销或客户保留措施、无法被定义为一般商业惯例或显示不公平的动机的措施。\\n(3) 非关键时刻:不得于例如招标邀请时、合同谈判和谈判结束时或进行业务关系审计时(或于接近的时间)收取或提供利益。\\n(4) 适当价值利益应当有符合社交的适当需要即利益价值应当与接收者或提供者的生活水平相符或符合第三方的惯例即与行业水平相当或是在相关措施的背景下。且遵守礼物的价格限额每份礼物为800元人民币税前或每一项邀请为1600元人民币税前。提供或接受的邀请主办方代表应同样参加。\\n(5) 不得形成固定惯例利益不得由同一人定期地或频繁地收取或提供每个商业伙伴一年之内仅限一份总价值为800元人民币的礼物或两份总价值不超过800元人民币的礼物。\\n(6) 非私人场合:应在商业背景下,而非私人活动(例如生日或婚礼)的场合中提供或接受利益。\\n(7) 批准:在上述容许范围内向商业伙伴、客户或第三方收取或提供利益前需获得直线经理的批准。任何上述容许范围的例外情形及提供给或自政府工作人员收取的利益必须由合规咨询平台检查和批准。`~`8When dealing with Business Partners, Customers or Third Parties, it is essential to avoid any impression that PCN engages in unusual business practices or targeted measures to exercise unfair influence on business decisions. Therefore, benefits from / to Business Partners, Customers or Third Parties must not be solicited or encouraged but should be rejected, if these are not in accordance with the following admissibility criteria or if unfair motivation of the giver is identified.\\n(1) No (potential) conflict of interest: On the basis of the assessment by the employee and the Line Manager and, if applicable, after consultation with the central or local Compliance Helpdesk, granting or accepting the benefit does not cause a Conflict of Interest.\\n(2) No granting of advantages: No measures have been taken which are specifically intended to influence a business decision or in the expectation of consideration, which either exceed an internally approved sales promotion or customer retention measures, which cannot be regarded as customary business practice, or which reveals an unfair motivation.\\n(3) No critical timing: Benefits are not granted or accepted in connection with (or close in time to), for instance, an invitation of tender, contract negotiations and the conclusion of such negotiations or auditing the business relationship.\\n(4) Appropriate value: Benefits are socially appropriate (i.e. the value of the benefit is consistent with the standard of living of the recipient or giver) or customary among Third Parties (i.e. comparable in the industry or in the context of the measure) and stay within the value limits for gifts of RMB 800 (pre-tax) per gift or RMB 1600 (pre-tax) per invitation. An invitation should only be granted or accepted if the host's representative(s) participate in the event.\\n(5) Not applied practice: The benefits are not granted or accepted by the same person on a regular or frequent basis, i.e. only one gift with a total value of RMB 800 or two gifts up to a maximum limit of RMB 800 per Business Partner per year are permitted.\\n(6) No personal occasion: Benefits are granted or accepted in a business context and not on the occasion of a personal event such as a birthday or a wedding.\\n(7) Approval: Benefits to/from Business Partner(s) or from Customers or Third Parties within the above mentioned admissibility criteria must be checked and approved by the Line Manager. Exceptions to the above admissibility criteria and benefits to/from Public Official(s) must be checked and approved by the Compliance Helpdesk.`~`~\"\n" +
" },\n" +
" \"field24629\":\n" +
" {\n" +
" \"value\": \"当与商业伙伴、客户或第三方打交道时,必须避免留下任何保时捷进行不寻常的业务实践或有针对性的措施以对业务决策施加不公平的影响的印象。因此,如果向商业伙伴、客户或第三方提供/收取的利益不符合以下容许标准,或者发现给予方的动机不纯正时,则不得寻求或鼓励、且应拒绝从商业伙伴、客户或第三方那里获得或向其提供利益。\\n(1) 无(潜在)利益冲突:根据员工和直线经理的评估,以及经咨询集团或本地合规咨询平台(如适用),提供或收取利益不构成利益冲突。\\n(2) 不得给予好处:不得采取意在影响商业决策或获得对价、超出内部批准的促销或客户保留措施、无法被定义为一般商业惯例或显示不公平的动机的措施。\\n(3) 非关键时刻:不得于例如招标邀请时、合同谈判和谈判结束时或进行业务关系审计时(或于接近的时间)收取或提供利益。\\n(4) 适当价值利益应当有符合社交的适当需要即利益价值应当与接收者或提供者的生活水平相符或符合第三方的惯例即与行业水平相当或是在相关措施的背景下。且遵守礼物的价格限额每份礼物为800元人民币税前或每一项邀请为1600元人民币税前。提供或接受的邀请主办方代表应同样参加。\\n(5) 不得形成固定惯例利益不得由同一人定期地或频繁地收取或提供每个商业伙伴一年之内仅限一份总价值为800元人民币的礼物或两份总价值不超过800元人民币的礼物。\\n(6) 非私人场合:应在商业背景下,而非私人活动(例如生日或婚礼)的场合中提供或接受利益。\\n(7) 批准:在上述容许范围内向商业伙伴、客户或第三方收取或提供利益前需获得直线经理的批准。任何上述容许范围的例外情形及提供给或自政府工作人员收取的利益必须由合规咨询平台检查和批准。\"\n" +
" },\n" +
" \"field24631\":\n" +
" {\n" +
" \"value\": \"~`~`7当与商业伙伴、客户或第三方打交道时益不符合以下容许标准或者发现给予方益冲突根据员工和直线经理的评估以及得给予好处近的时间收取或提供利益。\\n(4) 适当价值:利益应当有符合社交的适当需要(即利益价值应当与接收者或提供者的生活水平相符),或符合第三方的惯例(即与行业水平相当或是在相关措施的背景下)。且遵守礼物的价格限额:每份礼物为台检查和批准。`~`8When dealing with Business Partners, Customers or Third Parties, it is essential to avoid any impression that PCN engages in unusual business practices or targeted measures to exercise unfair influence on business decisions. Therefore, benefits from / to Business Partners, Customers or Thirdmer retention measures, which cannot be regarded as customary business practice, or which reveals an unfair motivation.\\n(3) No critical timing: Benefits are not granted or accepted in connection with (or close in time to), for instance, an invitation of tender, contract negotiations and the conclusion of such negotiations or auditing the business relationship.\\n(4) Appropriate value: Benefits are socially appropriate (i.e. the value of the benefit is consistent with the standard of living of the recipient or giver) or customary among Third Parties (i.e. comparable in the industry or in the context of the measure) and stay within the value limits for gifts of RMB 800 (pre-tax) per gift or RMB 1600 (pre-tax) per invitation. An invitation should only be granted or accepted if the host's representative(s) participate in the event.\\n(5) Not applied practice: The benefits are not granted or accepted by the same person on a regular or frequent basis, i.e. only one gift with a total value of RMB 800 or two gifts up to a maximum limit of RMB 800 per Business Partner per year are permitted.\\n(6) No ps to/from Public Official(s) must be checked and approved by the Compliance Helpdesk.`~`~\"\n" +
" },\n" +
" \"keyid\": 65,\n" +
" \"field24476\":\n" +
" {\n" +
" \"value\": \"When dealing with Business Partners, Customers or Third Parties, it is essential to avoid any impression that PCN engages in unusual business practices or targeted measures to exercise unfair influence on business decisions. Therefore, benefits from / to Business Partners, Customers or Third Parties must not be solicited or encouraged but should be rejected, if these are not in accordance with the following admissibility criteria or if unfair motivation of the giver is identified.\\n(1) No (potential) conflict of interest: On the basis of the assessment by the employee and the Line Manager and, if applicable, after consultation with the central or local Compliance Helpdesk, granting or accepting the benefit does not cause a Conflict of Interest.\\n(2) No granting of advantages: No measures have been taken which are specifically intended to influence a business decision or in the expectation of consideration, which either exceed an internally approved sales promotion or customer retention measures, which cannot be regarded as customary business practice, or which reveals an unfair motivation.\\n(3) No critical timing: Benefits are not granted or accepted in connection with (or close in time to), for instance, an invitation of tender, contract negotiations and the conclusion of such negotiations or auditing the business relationship.\\n(4) Appropriate value: Benefits are socially appropriate (i.e. the value of the benefit is consistent with the standard of living of the recipient or giver) or customary among Third Parties (i.e. comparable in the industry or in the context of the measure) and stay within the value limits for gifts of RMB 800 (pre-tax) per gift or RMB 1600 (pre-tax) per invitation. An invitation should only be granted or accepted if the host's representative(s) participate in the event.\\n(5) Not applied practice: The benefits are not granted or accepted by the same person on a regular or frequent basis, i.e. only one gift with a total value of RMB 800 or two gifts up to a maximum limit of RMB 800 per Business Partner per year are permitted.\\n(6) No personal occasion: Benefits are granted or accepted in a business context and not on the occasion of a personal event such as a birthday or a wedding.\\n(7) Approval: Benefits to/from Business Partner(s) or from Customers or Third Parties within the above mentioned admissibility criteria must be checked and approved by the Line Manager. Exceptions to the above admissibility criteria and benefits to/from Public Official(s) must be checked and approved by the Compliance Helpdesk.\"\n" +
" }\n" +
" }\n" +
" }\n" +
" }\n" +
"}";
String mainDataStr = "~`~`7当与商业伙伴、客户或第三方打交道时必须避免留下任何保时捷进行不寻常的业务实践或有针对性的措施以对业务决策施加不公平的影响的印象。因此如果向商业伙伴、客户或第三方提供/收取的利益不符合以下容许标准,或者发现给予方的动机不纯正时,则不得寻求或鼓励、且应拒绝从商业伙伴、客户或第三方那里获得或向其提供利益。\n" +
"(1) 无(潜在)利益冲突:根据员工和直线经理的评估,以及经咨询集团或本地合规咨询平台(如适用),提供或收取利益不构成利益冲突。\n" +
"(2) 不得给予好处:不得采取意在影响商业决策或获得对价、超出内部批准的促销或客户保留措施、无法被定义为一般商业惯例或显示不公平的动机的措施。\n" +
"(3) 非关键时刻:不得于例如招标邀请时、合同谈判和谈判结束时或进行业务关系审计时(或于接近的时间)收取或提供利益。\n" +
"(4) 适当价值利益应当有符合社交的适当需要即利益价值应当与接收者或提供者的生活水平相符或符合第三方的惯例即与行业水平相当或是在相关措施的背景下。且遵守礼物的价格限额每份礼物为800元人民币税前或每一项邀请为1600元人民币税前。提供或接受的邀请主办方代表应同样参加。\n" +
"(5) 不得形成固定惯例利益不得由同一人定期地或频繁地收取或提供每个商业伙伴一年之内仅限一份总价值为800元人民币的礼物或两份总价值不超过800元人民币的礼物。\n" +
"(6) 非私人场合:应在商业背景下,而非私人活动(例如生日或婚礼)的场合中提供或接受利益。\n" +
"(7) 批准:在上述容许范围内向商业伙伴、客户或第三方收取或提供利益前需获得直线经理的批准。任何上述容许范围的例外情形及提供给或自政府工作人员收取的利益必须由合规咨询平台检查和批准。`~`8intRow size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs`~`~ ";
String startPattern = "~`~`";
String endPattern = "`~`~";
// 构建正则表达式模式
String pattern = Pattern.quote(startPattern) + "(.*?)" + Pattern.quote(endPattern);
Pattern regex = Pattern.compile(pattern);
Matcher matcher = regex.matcher(mainDataStr);
while (matcher.find()) {
System.out.println(matcher.group(1));
}
String string = MultilingualUtil.findString(mainDataStr, startPattern, endPattern);
System.out.println(string);
System.out.println(JSON.toJSONString(MultilingualUtil.getLanguageMap(string)));
}
}

Binary file not shown.

View File

@ -0,0 +1,576 @@
<%@page import="weaver.conn.RecordSet"%>
<%@page import="weaver.hrm.company.DepartmentComInfo"%>
<%@page import="weaver.hrm.company.SubCompanyComInfo"%>
<%@page import="weaver.hrm.settings.BirthdayReminder"%>
<%@ page isELIgnored="false"%>
<%@ include file="/cportal/common/init.jsp" %>
<%@ page import="weaver.general.GCONST" %>
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="cp" tagdir="/WEB-INF/tags/cportal" %>
<%@ taglib prefix="cdata" tagdir="/WEB-INF/tags/cportal/data" %>
<%@ taglib prefix="csnip" tagdir="/WEB-INF/tags/cportal/snip" %>
<%@ taglib prefix="oscache" uri="http://www.opensymphony.com/oscache" %>
<%@ page import="weaver.systeminfo.SystemEnv"%>
<%@ page import="weaver.hrm.HrmUserVarify"%>
<%@ page import="weaver.hrm.User"%>
<%@ page import="weaver.general.StaticObj" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.rtx.RTXConfig" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="weaver.general.GCONST" %>
<%@ page import="weaver.general.IsGovProj" %>
<%@ include file="/times.jsp" %>
<jsp:useBean id="signRs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rtxClient" class="weaver.rtx.RTXClientCom" scope="page" />
<jsp:useBean id="hrmScheduleDiffUtil" class="weaver.hrm.report.schedulediff.HrmScheduleDiffUtil" scope="page" />
<jsp:useBean id="MouldStatusCominfo" class="weaver.systeminfo.MouldStatusCominfo" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="HrmScheduleDiffUtil" class="weaver.hrm.report.schedulediff.HrmScheduleDiffUtil" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page"/>
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page"/>
<jsp:useBean id="sharemanager" class="weaver.share.ShareManager" scope="page"/>
<jsp:useBean id="SearchClause" class="weaver.search.SearchClause" scope="session" />
<%
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String workflowType=Util.null2String(request.getParameter("workflowType"));
String operateType = Util.null2String(request.getParameter("operateType"));
String moreUrl="";
String src0 = "";
if("doing".equals(workflowType) || "".equals(workflowType)){
moreUrl="/workflow/search/WFSearchTemp.jsp?method=all&iscomplete=0";
} else if("done".equals(workflowType)){
moreUrl="/workflow/search/WFSearchTemp.jsp?method=all&viewType=2&viewScope=done&complete=2";
} else if("myrequest".equals(workflowType)){
moreUrl="/workflow/search/WFSearchTemp.jsp?method=myall";
} else if("supervice".equals(workflowType)){
moreUrl = "/workflow/search/RequestSupervise.jsp";
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>上海世贸商城-工作平台</title>
<jsp:include page="/cportal/common/include.jsp" />
<style>
.tabs-titile tr td{
cursor: pointer;
}
.tabs-titile tr td.active{
color:#cd3389 !important;
}
.alink a:active {
color : #cd3389;
}
.linkTable tr td:hover {
background-color: #8a004d;
}
.linkTable tr td{
background-color: #c0006b;
cursor:pointer;
}
.linkTable tr td a{
font-size: 16px;
color: #fff;
}
.navFix{
position:fixed;
right:184px;
width:65px;
_position:absolute;
bottom:220px;
z-index:99999;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
var headHeight = 0;
var nav = $(".ydiv");
$(window).scroll(function(){
if($(this).scrollTop() > headHeight){
nav.addClass("navFix");
$(".navFix").css('display','');
$(".navFix").css('right',((document.body.offsetWidth - 1000)/2 - 68) + "px");
}
});
});
function backTop(){
$('body,html').animate({scrollTop:0},1000);
}
</script>
<script type="text/javascript">
function showWfMore(){
$("#wfTr").find("TD").each(function(){
var tmpClass = jQuery(this).attr('class');
var tmpId = jQuery(this).attr('id');
if(tmpClass == 'active'){
if(tmpId == 'tab1'){
window.open('/workflow/request/RequestView.jsp?e<%=(new Date()).getTime() %>');
}else if(tmpId == 'tab2'){
window.open('/workflow/request/RequestHandled.jsp?e<%=(new Date()).getTime() %>');
}else if(tmpId == 'tab3'){
window.open('/workflow/request/MyRequestView.jsp?e<%=(new Date()).getTime() %>');
}else if(tmpId == 'tab4'){
window.open('/workflow/search/RequestSupervise.jsp?e<%=(new Date()).getTime() %>');
}
}
});
}
function changeIframeSrc (tab){
if(tab == 0){
$("#frame2").attr("src",'/eas/requestpage.jsp?type=0');
//window.location.href='/cportal/work_sm.jsp';
$("#tab1").attr("class","active");
$("#tab1").css("border-bottom","2px solid #CD3389");
$("#tab2").attr("class","");
$("#tab3").attr("class","");
$("#tab4").attr("class","");
$("#tab2").css("border-bottom","1px solid #666666");
$("#tab3").css("border-bottom","1px solid #666666");
$("#tab4").css("border-bottom","1px solid #666666");
}else if(tab == 1){
$("#frame2").attr("src","/eas/requestpage.jsp?type=1");
$("#tab2").attr("class","active");
$("#tab2").css("border-bottom","2px solid #CD3389");
$("#tab1").css("border-bottom","1px solid #666666");
$("#tab3").css("border-bottom","1px solid #666666");
$("#tab4").css("border-bottom","1px solid #666666");
$("#tab1").attr("class","");
$("#tab3").attr("class","");
$("#tab4").attr("class","");
}else if(tab == 2){
$("#frame2").attr("src","/eas/requestpage.jsp?type=2");
$("#tab3").attr("class","active");
$("#tab2").attr("class","");
$("#tab1").attr("class","");
$("#tab4").attr("class","");
$("#tab3").css("border-bottom","2px solid #CD3389");
$("#tab1").css("border-bottom","1px solid #666666");
$("#tab2").css("border-bottom","1px solid #666666");
$("#tab4").css("border-bottom","1px solid #666666");
}else if(tab == 3){
$("#frame2").attr("src","/workflow/search/RequestSupervise.jsp");
$("#tab4").attr("class","active");
$("#tab2").attr("class","");
$("#tab3").attr("class","");
$("#tab1").attr("class","");
$("#tab4").css("border-bottom","2px solid #CD3389");
$("#tab1").css("border-bottom","1px solid #666666");
$("#tab2").css("border-bottom","1px solid #666666");
$("#tab3").css("border-bottom","1px solid #666666");
}
}
</script>
</head>
<body>
<jsp:include page="/cportal/common/header.jsp" />
<div class="center w-1000 text-left">
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="middle">
<td width="100%"valign="top" colspan="3">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom">
<!--
<ul class="tabs-titile" style="font-size:14px;width: 100%">
<li id="tab1" style="display: inline;" onclick="changeIframeSrc(0);" class="active">待办 <SPAN style="width:5%">&nbsp;</SPAN></li>
<li id="tab2" style="display: inline;" onclick="changeIframeSrc(1);">已办<SPAN style="width:5%">&nbsp;</SPAN></li>
<li id="tab3" style="display: inline;" onclick="changeIframeSrc(2);">我的请求<SPAN style="width:5%">&nbsp;</SPAN></li>
<li id="tab4" style="display: inline;" onclick="changeIframeSrc(3);">督办</li>
</ul>
-->
<table cellpadding="0" cellspacing="0" class="tabs-titile" width="100%" style="height: 30px;font-size: 12px;">
<tr id="wfTr">
<td style="border-bottom:2px solid #CD3389" id="tab1" width="10%" ondblclick="window.open('/eas/requestpage.jsp?type=0','_blank');" onclick="changeIframeSrc(0);" class="active">待办</td>
<td id="tab2" style="border-bottom: 1px solid #666666;" width="10%" ondblclick="window.open('/eas/requestpage.jsp?type=1','_blank');" onclick="changeIframeSrc(1);">已办</td>
<td id="tab3" style="border-bottom: 1px solid #666666;" width="10%" ondblclick="window.open('/eas/requestpage.jsp?type=2','_blank');" onclick="changeIframeSrc(2);">我的请求</td>
<td id="tab4" style="border-bottom: 1px solid #666666;" width="10%" ondblclick="window.open('/workflow/search/RequestSupervise.jsp','_blank');" onclick="changeIframeSrc(3);">督办</td>
<td style="border-bottom: 1px solid #666666;" ></td>
<td style="border-bottom: 1px solid #666666;">&nbsp;</td>
<td align="right" style="border-bottom: 1px solid #666666;">
<img src="/cportal/images/sm/more.png" border="0" class="float_right hand" onclick="showWfMore();" />
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td height="455px;">
<iframe class="flowFrame" frameborder="0" frameborder="0" id="frame2" name="frame2" src="<%=moreUrl %>" width="100%" height="450px;" scrolling="no" style="overflow: hidden;border: 0;"></iframe>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="3" height="10px;">&nbsp;</td></tr>
<tr>
<td valign="top" colspan="3">
<table class="linkTable" width="100%" cellpadding="0" cellspacing="0">
<tr height="50px;" style="color: #fff;">
<td width="15%" align="center" onclick="window.open('/cportal/newWorkflow.jsp?isfrom=1','_blank')">
<b>新建流程</b>
</td>
<td width="15%" align="center" onclick="window.open('/workflow/search/WFSearch.jsp?fromleftmenu=1','_blank')">
<b>查询流程</b>
</td>
<!--td align="center" onclick="window.open('/workflow/request/wfAgentStatistic.jsp','_blank')">
<b>流程代理</b>
</td-->
<td width="15%" align="center" onclick="window.open('/system/systemmonitor/workflow/WorkflowMonitor.jsp?fromleftmenu=1','_blank')">
<b>流程监控</b>
</td>
<td width="15%" align="center" onclick="">
<b>流程报表</b>
</td>
<td align="center" onclick="">
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="3" height="10px;">&nbsp;</td></tr>
<tr>
<td colspan="2" valign="top">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" align="left" style="border-bottom:2px solid #CD3389;color:#BF006B;font-size:16px;">快捷功能</td>
<td style="border-bottom:2px solid #626262;" colspan="7" align="right">
<img src="/cportal/images/sm/more.png" border="0" class="float_right hand" onclick="window.open('/cportal/quickLink.jsp?e<%=(new Date()).getTime() %>=')" />
</td>
</tr>
<tr><td colspan="8" height="10px;">&nbsp;</td></tr>
<%
String select_sql = "select top(8) * from uf_QuickButton where isShow =1 order by showorder ";
if(rs.executeSql(select_sql)){
int k = 0;
int num = rs.getCounts();
while(rs.next()){
String icon = Util.null2String(rs.getString("icon"));
String iconOver = Util.null2String(rs.getString("iconOver"));
String link = Util.null2String(rs.getString("link"));
String name = Util.null2String(rs.getString("name"));
if(k == 0){
out.println("<tr id=\"kjbutton\">");
}
if((k++)%4==0 && k > 0){
out.println("</tr><tr><td colspan=\"8\" height=\"10px;\">&nbsp;</td></tr><tr id=\"kjbutton\">");
}
%>
<td valign="middle" width="8%">
<A href="<%=link %>" target="_blank" id="kjbutton">
<img src="<%=icon %>" border="0" align="middle" attr1="<%=icon %>" attr2="<%=iconOver %>" align="middle" />
</A>
</td>
<td width="17%">
<A href="<%=link %>" target="_blank" >
<%=name %>
</A>
</td>
<% if(k == num){
out.println("</tr>");
}
}
}
%>
<!--
<tr id="kjbutton">
<td valign="middle" width="8%">
<A href="http://server09/buyerregwinform/BuyerRegDB_Winform.application" target="_blank" id="kjbutton">
<img src="/cportal/images/work/xmzd.png" border="0" align="middle" attr1="/cportal/images/work/xmzd.png" attr2="/cportal/images/work/xmzd0.png" align="middle" />
</A>
</td>
<td width="17%">
<A href="/interface/AccountSettingFrame.jsp" target="_blank" >
集成登录<br/>设置
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/HrWeb/" id="kjbutton" target="_blank">
<img src="/cportal/images/work/qygl.png" border="0" align="middle" attr1="/cportal/images/work/qygl.png" attr2="/cportal/images/work/qygl0.png" />
</A>
</td>
<td width="17%">
A href="http://server09/buyerregwinform/BuyerRegDB_Winform.application" target="_blank" >
全员管理系统
</A
<A href="/eas/loginSM.jsp" target="_blank" >
EAS系统
</A>
</td>
<td valign="middle" width="8%">
<A href="http://server09/estatementwinform/eStatementWinform.application" target="_blank" id="kjbutton">
<img src="/cportal/images/work/dzzd.png" border="0" align="middle" attr1="/cportal/images/work/dzzd.png" attr2="/cportal/images/work/dzzd0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/estatementwinform/eStatementWinform.application" target="_blank">
电子账单系统
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/vipbuyer/" target="_blank" id="kjbutton">
<img src="/cportal/images/work/vipm.png" border="0" align="middle" attr1="/cportal/images/work/vipm.png" attr2="/cportal/images/work/vipm0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/vipbuyer/" target="_blank" >
VIP买家数据库
</A>
</td>
</tr>
<tr><td colspan="8" height="10px;">&nbsp;</td></tr>
<tr>
<td valign="middle" width="8%">
<A href="http://server09/ERP/" target="_blank" id="kjbutton"><img src="/cportal/images/work/zlxt.png" border="0" align="middle" attr1="/cportal/images/work/zlxt.png" attr2="/cportal/images/work/zlxt0.png"/></A>
</td>
<td width="17%">
<A href="http://server09/ERP/" target="_blank">
租赁系统
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/ERP_AR" target="_blank" id="kjbutton">
<img src="/cportal/images/work/ysxt.png" border="0" align="middle" attr1="/cportal/images/work/ysxt.png" attr2="/cportal/images/work/ysxt0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/ERP_AR" target="_blank">
应收系统
</A>
</td>
<td valign="middle" width="8%">
<A href="\\server06\TempFolder" target="_blank" id="kjbutton">
<img src="/cportal/images/work/wlyp.png" border="0" align="middle" attr1="/cportal/images/work/wlyp.png" attr2="/cportal/images/work/wlyp0.png"/>
</A>
</td>
<td width="17%">
<A href="\\server06\TempFolder" target="_blank" >
网络硬盘
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/bpm" target="_blank" id="kjbutton">
<img src="/cportal/images/work/jlcx.png" border="0" align="middle" attr1="/cportal/images/work/jlcx.png" attr2="/cportal/images/work/jlcx0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/bpm" target="_blank" >
旧流程信息平台
</A>
</td>
</tr>
-->
<!--
<tr><td colspan="8" height="10px;">&nbsp;</td></tr>
<tr>
<td valign="middle" width="8%">
<A href="\\server06\SHMART" target="_blank" id="kjbutton"><img src="/cportal/images/work/wlyp.png" border="0" align="middle" attr1="/cportal/images/work/wlyp.png" attr2="/cportal/images/work/wlyp0.png"/></A>
</td>
<td width="17%">
<A href="\\server06\SHMART" target="_blank">
部门空间
</A>
</td>
<td width="8%" align="left">
<A href="\\server06\SHMART\Portal顶级网站" target="_blank" id="kjbutton">
<img src="/cportal/images/work/wlyp.png" border="0" align="middle" attr1="/cportal/images/work/wlyp.png" attr2="/cportal/images/work/wlyp0.png"/>
</A>
</td>
<td width="17%">
<A href="\\server06\SHMART\Portal顶级网站" target="_blank">
共享空间
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/ExpoService/Exposervice.application" target="_blank" id="kjbutton">
<img src="/cportal/images/work/wlyp.png" border="0" align="middle" attr1="/cportal/images/work/wlyp.png" attr2="/cportal/images/work/wlyp0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/ExpoService/Exposervice.application" target="_blank">
展览现场服务
</A>
</td>
<td width="8%" align="left">
<A href="http://server09/equipment/" target="_blank" id="kjbutton">
<img src="/cportal/images/work/wlyp.png" border="0" align="middle" attr1="/cportal/images/work/wlyp.png" attr2="/cportal/images/work/wlyp0.png"/>
</A>
</td>
<td width="17%">
<A href="http://server09/equipment/" target="_blank">
设备管理
</A>
</td>
</tr>
-->
</table>
<SCRIPT>
$("#kjbutton img").hover(function(){
var attr2=$(this).attr("attr2");
if(attr2){
$(this).attr("src",attr2);
}
},function(){
var attr1=$(this).attr("attr1");
if(attr1){
$(this).attr("src",attr1);
}
});
</SCRIPT>
</td>
<td width="33%" valign="top" rowspan="5" align="right">
<iframe src="/page/element/MyCalendar/Iframe.jsp?ebaseid=MyCalendar&eid=4&styleid=1390381555293&hpid=1&subCompanyId=1" scrolling="no" style="border:0px;height: 460px;width:100%;"></iframe>
</td>
</tr>
<tr>
<td valign="top" colspan="2">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" style="border-bottom:2px solid #CD3389;color:#BF006B;font-size:16px;">我的会议</td>
<td style="border-bottom:2px solid #626262;">
<!--
<img src="/cportal/images/sm/more.png" class="float_right hand" onclick="window.open('/hrm/HrmTab.jsp?_fromURL=HrmBirthdayInfo&e<%=(new Date()).getTime() %>=')" />
-->
</td>
</tr>
<tr>
<td colspan="2">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="13%">
<A style="color:#BF006B;font-size:14px;" href="/meeting/data/MeetingCalView.jsp" target="_blank">
<img src="/cportal/images/sm/add.png" class="float_left" border="0" />
</A>
</td>
<td width="37%" valign="middle">
<A style="color:#BF006B;font-size:14px;" href="/meeting/data/MeetingCalView.jsp" target="_blank"><b>新建会议</b></A>
</td>
<td width="13%">
<A style="color:#BF006B;font-size:14px;" href="/meeting/data/MeetingCalView.jsp" target="_blank">
<img src="/cportal/images/sm/room.png" class="float_left" border="0"/>
</A>
</td>
<td width="37%" valign="middle" style="color:#BF006B;font-size:14px;">
<A style="color:#BF006B;font-size:14px;" href="/meeting/report/MeetingRoomPlan.jsp" target="_blank"><b>会议室资源</b></A>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td colspan="2" height="10px;">&nbsp;</td></tr>
<tr>
<td colspan="2" valign="top">
<A href="http://server09/giswinform/MartGIS.application" target="_blank"><img src="/cportal/images/sm/ftt.jpg" border="0" width="100%"></img></A>
</td>
</tr>
<tr style="display: none;">
<td colspan="3" height="270px;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" style="height: 270px;">
<tr valign="top" style="height: 30px;">
<td width="10%" style="border-bottom:2px solid #CD3389;color:#BF006B;font-size:16px;">保养进度信息</td>
<td style="border-bottom:2px solid #626262;" align="right">
<img src="/cportal/images/sm/more.png" class="float_right hand" onclick="window.open('/hrm/HrmTab.jsp?_fromURL=HrmBirthdayInfo&e<%=(new Date()).getTime() %>=')" />
</td>
</tr>
<tr>
<td colspan="2" valign="top">
暂无内容
</td>
</tr>
</table>
</td>
</tr>
<tr style="display: none;"><td colspan="3" height="10px;">&nbsp;</td></tr>
<tr style="display: none;">
<td colspan="3" height="270px;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" style="height: 270px;">
<tr valign="top" style="height: 30px;">
<td width="10%" style="border-bottom:2px solid #CD3389;color:#BF006B;font-size:16px;">强退信息</td>
<td style="border-bottom:2px solid #626262;" align="right">
<img src="/cportal/images/sm/more.png" class="float_right hand" onclick="window.open('/hrm/HrmTab.jsp?_fromURL=HrmBirthdayInfo&e<%=(new Date()).getTime() %>=')" />
</td>
</tr>
<tr>
<td colspan="2" valign="top">
暂无内容
</td>
</tr>
</table>
</td>
</tr>
<tr style="display: none;"><td colspan="3" height="10px;">&nbsp;</td></tr>
<tr style="display: none;">
<td colspan="3" height="270px;" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" style="height: 270px;">
<tr valign="top" style="height: 30px;">
<td width="200px;" style="border-bottom:2px solid #CD3389;color:#BF006B;font-size:16px;">展览现场服务工单信息</td>
<td style="border-bottom:2px solid #626262;" align="right">
<img src="/cportal/images/sm/more.png" class="float_right hand" onclick="window.open('/hrm/HrmTab.jsp?_fromURL=HrmBirthdayInfo&e<%=(new Date()).getTime() %>=')" />
</td>
</tr>
<tr>
<td colspan="2" valign="top">
暂无内容
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<DIV class="ydiv navFix" style="float:left;display:none;">
<table>
<TR><td><img title="回到顶部" src="/cportal/images/index/float_top.png" class="hand" border="0" onclick="backTop();" /></td></TR>
<TR><td><img title="账号设置" src="/cportal/images/index/float_set.png" border="0" class="hand" onclick="window.open('/interface/AccountSetting.jsp','_blank')" /></td></TR>
<%if(HrmUserVarify.checkUserRight("SoftwareModel:all",user)) { %>
<TR><td><img title="软件模式" src="/cportal/images/index/float_rjmx.png" border="0" class="hand" onclick="window.open('/wui/main.jsp','_blank')" /></td></TR>
<%}%>
<TR><td><img title="帮助手册" src="/cportal/images/index/float_help.png" border="0" class="hand" onclick="window.open('/docs/docs/DocMoreForHp.jsp?urlType=16&eid=19&date2during=6&tabid=1','_blank')" /></td></TR>
</table>
</DIV>
<div class="clear h-40"></div>
<jsp:include page="/cportal/common/footer.jsp" />
</body>
</html>

View File

@ -0,0 +1,97 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.eas.MD5Util,weaver.general.BaseBean,weaver.general.Util" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<!DOCTYPE html>
<%
RecordSet rs = new RecordSet();
User user = HrmUserVarify.getUser(request, response);
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"), "true");
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"), "88888888");
String isweb = Util.null2String(request.getParameter("isweb"), "true");
String host = Util.null2String(b.getPropValue("eas", "eas_host"));
String port = Util.null2String(b.getPropValue("eas", "eas_port"));
String dcname = Util.null2String(b.getPropValue("eas", "dcname"));
String eas_host = host + (port.equals("") ? "" : ":" + port);
String eas_requestinfotodo = Util.null2String(rs.getPropValue("eas", "TODOView"));
String eas_linkname = Util.null2String(rs.getPropValue("eas", "linkname"));
rs.executeSql("select * from openquery(" + eas_linkname + ",''select fweb from SM20230606.T_SM_VWorkFlowToDo where fpersonusernumber=''" + loginid + "'' and FASSIGNID=''" + requestid + "''')");
if (rs.next()) {
isweb = rs.getString(1);
}
response.setHeader("Access-Control-Allow-Origin", "*");
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
<script type="text/javascript" src="/wui/easyXDM/src/easyXDM.debug.js"></script>
<script>
var showMsg = function (message) {
//document.getElementById('output').innerHTML += "<p>" + message + "</p>";
};
var rpc = new easyXDM.Rpc({
isHost: true,
remote: 'b.shanghaimart.com:180/workflow/request/ViewRequestOS.jsp',
hash: true,
protocol: '1',
// container: document.getElementById('container'),
// props: {
// frameBorder: 0,
// scrolling: 'no',
// style: {width: '100%', height: '100px'}
//}
},
{
local: {
echo: function (message) {
location.reload();
}
}
});
//alert(rpc.remote);
</script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" target="_blank" method="post">
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type="hidden">
<input name="redirectTo" value="/" type="hidden">
<input name="udcsso" value="<%=hashkey %>" type="hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input type="hidden" id="dcname" name='dcname' value='<%=dcname %>'/>
<input type="hidden" id="dataCenter" name='dataCenter' value='<%=dcname %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type="hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type="hidden">
<input name="bill" value="<%=bill %>" type="hidden">
<input name="assid" value="<%=requestid %>" type="hidden">
<input name="isWeb" value="<%=isweb %>" type="hidden">
</div>
</div>
</div>
</form>
<iframe id="rFrame" name="rFrame" src="" width="100%" height="100%" scrolling="no" marginheight="0" marginwidth="0">
</iframe>
<script type="text/javascript">
document.domain = 'shanghaimart.com';
jQuery(function () {
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*,weaver.conn.*" %>
<!DOCTYPE html>
<%
RecordSet rs = new RecordSet();
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"),"true");
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"),"88888888");
String isweb = Util.null2String(request.getParameter("isweb"),"true");
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
String eas_requestinfotodo = Util.null2String(rs.getPropValue("eas","TODOView"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
rs.executeSql("select * from openquery("+eas_linkname+",''select fweb from SM20230606.T_SM_VWorkFlowToDo where fpersonusernumber=''"+loginid+"'' and FASSIGNID=''"+requestid+"''')");
if(rs.next()){
isweb = rs.getString(1);
}
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="<%=isweb %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,58 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*,weaver.conn.*" %>
<!DOCTYPE html>
<%
RecordSet rs = new RecordSet();
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"),"true");
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"),"88888888");
String isweb = Util.null2String(request.getParameter("isweb"),"true");
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
String eas_requestinfotodo = Util.null2String(rs.getPropValue("eas","TODOView"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
rs.executeSql("select * from openquery("+eas_linkname+",''select fweb from SM20230606.T_SM_VWorkFlowToDo where fpersonusernumber=''"+loginid+"'' and FASSIGNID=''"+requestid+"''')");
if(rs.next()){
isweb = rs.getString(1);
}
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="<%=isweb %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*,weaver.conn.*" %>
<!DOCTYPE html>
<%
RecordSet rs = new RecordSet();
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"),"88888888");
String isweb = Util.null2String(request.getParameter("isweb"),"true");
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
String eas_requestinfotodo = Util.null2String(rs.getPropValue("eas","TODOView"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
rs.executeSql("select * from openquery("+eas_linkname+",''select fweb from SM20180328.T_SM_VWorkFlowToDo where fpersonusernumber=''"+loginid+"'' and FASSIGNID=''"+requestid+"''')");
if(rs.next()){
isweb = rs.getString(1);
}
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="<%=isweb %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,47 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="get" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="88888888" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="true" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,76 @@
<%@page import="weaver.conn.RecordSet"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="java.util.*" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<%@ page import="weaver.hrm.*,weaver.general.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
String sqlWhere_eas = " and FWORKFLOWID = ''"+requestid+"' ";
String eas_workflowinfo= Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
//String isWeb = "";
String ceshi = "";
String sql = "select * from openquery("+eas_linkname+",'select * from "+eas_requestinfo+" where 1=1 AND FWorkFlowID=''"+requestid+"'' ')";
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select * from "+eas_requestinfo+" where 1=1 AND FWorkFlowID=''"+requestid+"'' ')");
RecordSet.next();
String isWeb = RecordSet.getString("FWEB");
/*while(RecordSet.next()){
ceshi = "tt";
isWeb = RecordSet.getString("FWEB");
}*/
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="get" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="88888888" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="<%=isWeb %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
var a = "<%=isWeb%>";
var b = "<%=ceshi%>";
var sql = "<%=sql%>";
alert("a:"+a+" ---b:"+b+" sql:"+sql);
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,47 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="get" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="88888888" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="true" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,68 @@
<%@page import="weaver.conn.RecordSet"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="java.util.*" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<%@ page import="weaver.hrm.*,weaver.general.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
BaseBean b = new BaseBean();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
String eas_workflowinfo= Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
String sql = "select * from openquery("+eas_linkname+",'select * from "+eas_requestinfo+" where 1=1 "+
" AND FWorkFlowID=''"+requestid+"'' ')";
rs1.executeSql(sql);
rs1.next();
String isWeb = rs1.getString("FWEB");
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="get" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="88888888" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
<input name="isWeb" value="<%=isWeb %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
var a = "<%=isWeb%>";
var sql = "<%=sql%>";
alert("a:"+a+" sql:"+sql);
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,85 @@
@charset "utf-8";
/* 圆角 */
.br2 {-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;}
.br3 {-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}
.br5,.d-b-list:hover {-webkit-border-radius: 5px; -moz-border-radius: 5px;border-radius: 5px;}
.brtl5 {-webkit-border-top-left-radius: 5px;-moz-border-radius-topleft: 5px;border-top-left-radius: 5px;}
.brbl5 {-webkit-border-bottom-left-radius: 5px;-moz-border-radius-bottomleft: 5px;border-bottom-left-radius: 5px;}
.brtltr5 {-webkit-border-radius: 5px 5px 0 0;-moz-border-radius: 5px 5px 0 0;border-radius: 5px 5px 0 0;}
.btn-login, .btn-register {-moz-text-shadow: 0 1px 1px #000;-webkit-text-shadow: 0 1px 1px #000;text-shadow: 0 1px 1px #000;}
/* ============= banner ================ */
.download{-webkit-box-shadow: 0 2px 2px #333;-moz-box-shadow: 0 2px 3px #333;box-shadow: 0 2px 2px #333;}
.login-mod {background: none;
position: absolute;left:537px;top:160px;}
.login-mod{background:rgb(255,255,255) none repeat scroll !important; /*实现FF背景透明文字不透明*/
background:#fff; filter:Alpha(opacity=80);/*实现IE背景透明*/}
.login-mod{ position:relative; border: 1px solid #999;}/*实现IE文字不透明*/
.title-tip {background: #fff;}
/*.user-box {
background: url(../img/weixin.png) no-repeat 320px 8px;
}
*/
.login-btn{background: #0075eb;
}
.login-box .register-btn {color: #4d4d4d;background: #fff;border: 1px solid #ccc;
}
.remember-input {-moz-border-radius: 8px;-webkit-border-radius: 8px;border-radius: 8px;}
.d-b-list,.registered-btn,.topNav li a{-webkit-transition: background .3s ease;
-moz-transition: background .3s ease;
-ms-transition: background .3s ease;
-o-transition: background .3s ease;
transition: background .3s ease;}
.curr-bor{-webkit-transition: border-color .4s ease;
-moz-transition: border-color .4s ease;
-ms-transition: border-color .4s ease;
-o-transition: border-color .4s ease;
transition: border-color .4s ease;}
@media only screen and (max-width: 1000px) {
.wrap-1000{
width: 90%;
}
.login-bg-wrap{
display: none;
}
.login-box {
width: 100%;
height: 646px;
margin: 0 auto;
top: 0;
left: 0;
}
.login-mod{
left: 0;
margin: 0 auto;
}
.footer .f-c-left .service-list , .footer .f-c-left .clear , .f-c-right{
display:none;
}
.copyright {
text-align: center;
margin-top: 25px;
/* margin: 0 auto; */
}
.copyright-text {
width: 100%;
text-align: left;
text-align: center;
}
.f-c-left {
margin-top: 85px;
margin: 0 auto;
width: 100%;
}
}
.mod-shadow{ -webkit-box-shadow:1px 2px 25px 2px #CCCCCC; -moz-box-shadow:1px 2px 25px 2px #CCCCCC; box-shadow:1px 2px 25px 2px #CCCCCC;}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,210 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<link rel="stylesheet" type="text/css" href="css/index.css"/>
<script src="js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="layer/layer.js" type="text/javascript" charset="utf-8"></script>
<title>上海世贸商城</title>
<style type="text/css">
*{padding:0px;margin:0px;}
.page_hd img { display: block; width: 100%; max-width: 100%; }
.page_ft { position: fixed; left: 0px; bottom: 0px; right: 0px; height: 60px; line-height: 60px; display: flex;justify-content: space-around; }
.page_ft a { display:block;text-decoration:none; }
.page_ft a img{ width:25px;display:block;line-height:25px;margin:0px auto; }
.page_ft a span { display: block; line-height: 25px; font-size: 14px; color: #686868;}
.page_bd div.payInfo{position:fixed;top:15px;right:20px;}
.page_bd div.payInfo a{font-size:16px;color:#686868;text-decoration: none;}
.page_bd div.activityInfo{display:block;text-align:center;padding:20px 15px;}
.page_bd div.activityInfo img{ display:block; width:100%; max-width:100%; }
.page_bd div.activityInfo a{display:block;}
</style>
</head>
<script type="text/javascript">
function guan(){
console.log("1");
$('#provienceBox').hide();
$('#textBox').hide();
}
</script>
<body>
<!-- 头部 -->
<div class="page_hd">
<img src="http://wx.shanghaimart.com/Images/ParkBanner.png" />
</div>
<!-- 正文内容 -->
<div class="page_bd">
<div class="payInfo"><a href="http://wx.shanghaimart.com/Home/News">缴费说明</a></div>
<!-- 临停车牌输入区 -->
<div id="carLicenseBox" style="margin-top:0;border:0px;">
<img src="imgs/icon_car.png" style="margin-left:40px;">
<div class="carLicenseMain">
<ul>
<li id="li1" class="active"></li>
<li id="li2"></li>
<li id="li3"></li>
<li id="li4"></li>
<li id="li5"></li>
<li id="li6"></li>
<li id="li7"></li>
<li id="li8" class="xinnengyuan"></li>
</ul>
</div>
<div style="text-align:center; width:100%;height:100%;margin:0px;">
<button class="submitBtn" id="submitBtn">查询停车费</button>
</div>
</div>
<div id="keyboardBox">
<!--<button id="changeContentBtn">ABC</button>
<button id="deleteBtn">X</button>-->
<div class="provienceBox" id="provienceBox" style="display:none;">
<div id="guanbi1">
<span style="float:right;margin-top:-5px;margin-right:5px;font-weight:700px;height:30px;color:yellow;" id="chahao" onclick="guan()">关闭</span>
</div>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul>
<li class="changeContentBtn other">ABC</li>
<li></li>
<li>使</li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li class="deleteBtn other"><img src="imgs/backDeleteImg.jpg" /></li>
</ul>
</div>
<div class="textBox" id="textBox">
<div id="guanbi2">
<span style="float:right;margin-top:-5px;margin-right:5px;font-weight:700px;height:30px;color:yellow;" id="chahao2"onclick="guan()">关闭</span>
</div>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>0</li>
</ul>
<ul>
<li>Q</li>
<li>W</li>
<li>E</li>
<li>R</li>
<li>T</li>
<li>Y</li>
<li>U</li>
<li>I</li>
<li>O</li>
<li>P</li>
</ul>
<ul>
<li>A</li>
<li>S</li>
<li>D</li>
<li>F</li>
<li>G</li>
<li>H</li>
<li>J</li>
<li>K</li>
<li>L</li>
</ul>
<ul>
<li class="changeContentBtn other">返回</li>
<li>Z</li>
<li>X</li>
<li>C</li>
<li>V</li>
<li>B</li>
<li>N</li>
<li>M</li>
<li class="deleteBtn other"><img src="imgs/backDeleteImg.jpg" /></li>
</ul>
</div>
</div>
</div>
</div>
<div class="activityInfo">
<a href="http://wap.shanghaimart.com/activity/activity_list.aspx"><img src="http://wx.shanghaimart.com/Images/ParkActivity.png" alt="" /></a>
</div>
</div>
<!-- 页脚 -->
<div class="page_ft">
<div>
<a href="javascript:;">
<img src="./imgs/1-28.png" />
<span>临停缴费</span>
</a>
</div>
<div>
<a href="http://wx.shanghaimart.com/User/Rental">
<img src="./imgs/1-24.png" />
<span>长租车缴费</span>
</a>
</div>
<div>
<a href="http://wx.shanghaimart.com/Home/Index">
<img src="./imgs/1-26.png" />
<span>租户管理</span>
</a>
</div>
<div>
<a href="http://wx.shanghaimart.com/Home/PendingInvoice">
<img src="./imgs/1-25.png" />
<span>我要开票</span>
</a>
</div>
</div>
<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util,weaver.general.*"%>
<%@ page import="weaver.hrm.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
BaseBean b = new BaseBean();
String redirectTo = Util.null2String(request.getParameter("redirectTo"));
if(redirectTo.equals("")){
redirectTo = "/";
}
String isNotCheckRelogin = Util.null2String(request.getParameter("isNotCheckRelogin"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String assid = Util.null2String(request.getParameter("assid"));
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
%>
<head>
<title>单点登录</title>
<!--
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login2.css" rel="stylesheet" type="text/css" />
//http://172.16.1.43:6888/portal/index2sso.jsp
-->
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="<%=redirectTo %>" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=assid %>" type = "hidden">
<input name="isweb" value="1" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
})
</script>
</body>
</html>

View File

@ -0,0 +1,54 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util,weaver.general.Util"%>
<%@ page import="weaver.hrm.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
String redirectTo = Util.null2String(request.getParameter("redirectTo"));
if(redirectTo.equals("")){
redirectTo = "/";
}
String isNotCheckRelogin = Util.null2String(request.getParameter("isNotCheckRelogin"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String assid = Util.null2String(request.getParameter("assid"));
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
%>
<head>
<title>单点登录</title>
<!--
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login2.css" rel="stylesheet" type="text/css" />
//http://172.16.1.43:6888/portal/index2sso.jsp
-->
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://172.16.1.43:6888/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="<%=redirectTo %>" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=assid %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
})
</script>
</body>
</html>

View File

@ -0,0 +1,73 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
String hashkey = MD5Util.getUserMd5String(user.getLoginid());
%>
<head>
<title>单点登录</title>
<!--
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login2.css" rel="stylesheet" type="text/css" />
-->
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<style type="text/css">
/*.topNav li a, .topNav li a:hover{color: #333;}*/
.content-wrap,.footer{border: none;background: #f2f2f2;}
.topNav .btn-login{ background: #1a85ff; color: #fff !important;}
.login-mod{
height: 520px;
top: 100px;
}
.other-login{
clear: both;
float: right;
display: block;
margin-bottom: 10px;
height: 40px;
line-height: 40px;
font-size: 14px;
color: #666;
text-decoration: none;
}
.other-login img{
width: 40px;
height: 40px;
vertical-align: middle;
margin-left: 15px;
}
.other-login a{
color: #666;
}
.other-login a:hover{
text-decoration: none;
}
.login-bg-wrap{
top: 25px;
}
</style>
<form id=loginform action="http://172.16.1.43:6888/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<h5 class="title-tip brtltr5">单点登录跳转中</h5>
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=user.getLoginid() %>'/>
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
})
</script>
</body>
</html>

View File

@ -0,0 +1,62 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util,weaver.general.BaseBean" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.hrm.HrmUserVarify" %>
<%@ page import="weaver.hrm.User" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser(request, response);
BaseBean b = new BaseBean();
String redirectTo = Util.null2String(request.getParameter("redirectTo"));
if (redirectTo.equals("")) {
redirectTo = "/";
}
String isNotCheckRelogin = Util.null2String(request.getParameter("isNotCheckRelogin"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String assid = Util.null2String(request.getParameter("assid"));
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String host = Util.null2String(b.getPropValue("eas", "eas_host"));
String port = Util.null2String(b.getPropValue("eas", "eas_port"));
String dcname = Util.null2String(b.getPropValue("eas", "dcname"));
String eas_host = host + (port.equals("") ? "" : ":" + port);
%>
<head>
<title>单点登录</title>
<!--
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login2.css" rel="stylesheet" type="text/css" />
//http://172.16.1.43:6888/portal/index2sso.jsp
-->
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post">
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type="hidden">
<input name="redirectTo" value="<%=redirectTo %>" type="hidden">
<input name="udcsso" value="<%=hashkey %>" type="hidden">
<input type="hidden" id="username" name='username' value='<%=loginid %>'/>
<input type="hidden" id="dcname" name='dcname' value='<%=dcname %>'/>
<input type="hidden" id="dataCenter" name='dataCenter' value='<%=dcname %>'/>
<input name="isNotCheckRelogin" value="true" type="hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type="hidden">
<input name="bill" value="999999999" type="hidden">
<input name="assid" value="" type="hidden">
<input name="isweb" value="1" type="hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function () {
jQuery("#loginform").submit();
})
</script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util,weaver.general.*"%>
<%@ page import="weaver.hrm.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
BaseBean b = new BaseBean();
String redirectTo = Util.null2String(request.getParameter("redirectTo"));
if(redirectTo.equals("")){
redirectTo = "/";
}
String isNotCheckRelogin = Util.null2String(request.getParameter("isNotCheckRelogin"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
String assid = Util.null2String(request.getParameter("assid"));
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String host = Util.null2String(b.getPropValue("eas","eas_host"));
String port = Util.null2String(b.getPropValue("eas","eas_port"));
String eas_host = host+(port.equals("")?"":":"+port);
%>
<head>
<title>单点登录</title>
<!--
<link href="css/login.css" rel="stylesheet" type="text/css" />
<link href="css/login2.css" rel="stylesheet" type="text/css" />
//http://172.16.1.43:6888/portal/index2sso.jsp
-->
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://<%=eas_host %>/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="<%=redirectTo %>" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="999999999" type = "hidden">
<input name="assid" value="" type = "hidden">
<input name="isweb" value="1" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
})
</script>
</body>
</html>

View File

@ -0,0 +1,130 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browser" prefix="brow"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="easutl" class="weaver.eas.EASUtil" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<!DOCTYPE html>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript" src="/js/weaver_wev8.js"></script>
<script type="text/javascript" src="/js/messagejs/simplehrm_wev8.js"></script>
<script type="text/javascript" src="/js/messagejs/messagejs_wev8.js"></script>
<script type="text/javascript" src="/qrcode/js/jquery.qrcode-0.7.0_wev8.js"></script>
<%@ include file="/hrm/resource/simpleHrmResource_wev8.jsp" %>
</head>
<%
String loginid = easutl.getLoginid(user);
//type:0-代办 1-已办 2-我的请求 3-督办
String type = Util.null2String(request.getParameter("type"));//获取操作类型
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
String userid = user.getUID()+"";
int precount = 12 ;
String sqlwhere_oa = " and t2.userid="+userid+" and t2.usertype='0' and islasttimes=1 and t.workflowid in (select id from workflow_base where (isvalid='1' or isvalid='3') ) ";
String sqlwhere_eas = " and FPersonUserNumber='"+loginid+"'";
if(type.equals("0")){
sqlwhere_oa += " and ((t2.isremark=0 and (t2.takisremark is null or t2.takisremark=0 )) or t2.isremark in('1','5','8','9','7')) and (t.deleted=0 or t.deleted is null) and t2.islasttimes=1 and (isnull(t.currentstatus,-1) = -1 or (isnull(t.currentstatus,-1)=0 ))";
sqlwhere_eas += " and FState='1' ";
}else if(type.equals("1")){
sqlwhere_oa += " and t2.isremark='2' ";
sqlwhere_eas += " and FState='16' ";
}else if(type.equals("2")){
sqlwhere_oa += " and t.creater="+userid;
sqlwhere_eas += " and FCreatorNumber='"+loginid+"'";
}
%>
<body>
<TABLE class=Shadow>
<tr>
<td valign="top">
<%
String searchsql = "SELECT '0' AS systemname,CAST(t.requestid as varchar(100)) as requestid,requestname,requestmark,cast(creater as varchar(100)) as creater,'0' as createrstr,CAST(t.currentnodeid AS VARCHAR(100)) as currentnodeid,CAST(t2.userid as varchar(100)) as userid,t2.receivedate,t2.receivetime,CAST(t.workflowid as varchar(100)) AS workflowid,'0' AS billid,'' as undo FROM workflow_requestbase t, workflow_currentoperator t2"+
" WHERE t.requestid=t2.requestid "+sqlwhere_oa+
" UNION "+
" SELECT '1' AS systemname,FASSIGNID AS requestid , FSubject AS requestname ,FProcdeFNumber AS requestmark , FCreatorNumber AS creater,FCreator as createrstr , FActdeFName as currentnodeid,(SELECT id FROM HrmResource WHERE loginid=FPersonUserNumber) AS userid ,SUBSTRING(CONVERT(VARCHAR(20),FActTime,120),0,11) AS receivedate ,SUBSTRING(CONVERT(VARCHAR(20),FActTime,120),12,19) AS receivetime ,FworkflowID AS workflowid,Fbillid AS billid,FPersonUserName as undo FROM ( SELECT * FROM OPENQUERY("+eas_linkname+",'select * from "+eas_requestinfo+"')) t "+
" where 1=1 "+sqlwhere_eas;//ORDER BY receivedate desc, receivetime desc
%>
<TABLE width="100%" cellspacing=0 class="ListStyle">
<tr class='header'>
<td>系统</td><td>流程编号</td><td>创建人</td><td>请求标题</td><td>接受时间</td><td>当前节点</td><td>未操作者</td>
</tr>
<%
String sql = "SELECT TOP "+precount+" * FROM ("+searchsql+") temp ORDER BY receivedate desc, receivetime desc";
rs.executeSql(sql);
System.out.println(sql);
while(rs.next()){
String requestid = rs.getString("requestid");
String workflowid = rs.getString("workflowid");
String typeid = rs.getString("systemname");
String _userid = Util.null2String(rs.getString("userid"));
if(_userid.equals(""))_userid="0";
String _undo = rs.getString("undo");
%>
<tr>
<td><%=easutl.getSystemName(typeid,"") %></td>
<td><%=rs.getString("requestmark") %></td>
<td><%=easutl.getUserName(rs.getString("creater"),typeid+"+"+Util.null2String(rs.getString("createrstr"))) %></td>
<td><%=easutl.getRequestNameLink(requestid,rs.getString("requestname")+"+"+typeid+"+"+_userid+"+"+user.getLanguage()) %></td>
<td><%=rs.getString("receivedate") %>&nbsp;<%=rs.getString("receivetime").substring(0,5) %></td>
<td><%=easutl.getNodeName(rs.getString("currentnodeid"),typeid) %></td>
<td><%=easutl.getUnOperators(requestid,user.getLanguage()+"+"+_userid+"+"+_userid+"+"+typeid+"+"+_undo) %></td>
</tr>
<tr style="height: 1px !important;" class="Spacing"><td class="paddingLeft0Table" colSpan="7"><div class="intervalDivClass"></div></td></tr>
<%} %>
</TABLE>
</td>
</tr>
</TABLE>
<script type='text/javascript'>
function ajaxinit(){
var ajax=false;
try {
ajax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ajax = false;
}
}
if (!ajax && typeof XMLHttpRequest!='undefined') {
ajax = new XMLHttpRequest();
}
return ajax;
}
function showallreceived(requestid,returntdid){
//showreceiviedPopup("<%=SystemEnv.getHtmlLabelName(19205, user.getLanguage())%>");
var ajax=ajaxinit();
ajax.open("POST", "/workflow/search/WorkflowUnoperatorPersons.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid+"&returntdid="+returntdid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
$GetEle(returntdid).innerHTML = ajax.responseText;
$GetEle(returntdid).parentElement.title = ajax.responseText.replace(/[\r\n]/gm, "");
}catch(e){}
showTableDiv.style.display='none';
oIframe.style.display='none';
}
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,426 @@
<!DOCTYPE html>
<%@ page import="weaver.general.Util,org.apache.commons.lang3.*" %>
<%@ page import="weaver.conn.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browser" prefix="brow"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="xssUtil" class="weaver.filter.XssUtil" scope="page" />
<jsp:useBean id="EASUtil" class="weaver.eas.EASUtil" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT language="javascript" src="../../js/weaver_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<script language="javascript" src="/js/datetime_wev8.js"></script>
<script language="javascript" src="/js/selectDateTime_wev8.js"></script>
<script language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</head>
<%
boolean isedit = true;
String pageId = "EAS:wfeas_tablelist";
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(82487,user.getLanguage());
String needfav ="1";
String needhelp ="";
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
String requestname = Util.null2String(request.getParameter("requestname"));
String requestmark = Util.null2String(request.getParameter("requestmark"));
String workflowtypeid = Util.null2String(request.getParameter("workflowtypeid"));
String workflowid = Util.null2String(request.getParameter("workflowid"));
String creater = Util.null2String(request.getParameter("creater"));
String craetedateselect = Util.null2String(request.getParameter("craetedateselect"));
String createsdate = Util.null2String(request.getParameter("createsdate"));
String createedate = Util.null2String(request.getParameter("createedate"));
String status = Util.null2String(request.getParameter("status"));
String unoperator = Util.null2String(request.getParameter("unoperator"));
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{搜索,javaScript:dosearch(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{重置,javaScript:doreset(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<TABLE class=Shadow>
<tr>
<td valign="top">
<form name="frmSearch" id="frmSearch" method="post" action="requestsearch.jsp">
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input type="button" value="搜索" class="e8_btn_top" onclick="dosearch()"/>
<input type="button" value="重置" class="e8_btn_top" onclick="doreset()"/>
</td>
</tr>
</table>
<!-- bpf start 2013-10-29 -->
<div class="advancedSearchDiv1" id="advancedSearchDiv1">
<wea:layout type="fourCol">
<wea:group context="查询条件">
<wea:item>标题</wea:item>
<wea:item><input type="text" name="requestname" class="inputStyle" value="<%=requestname%>"></wea:item>
<wea:item>编号</wea:item>
<wea:item><input type="text" name="requestmark" class="inputStyle" value="<%=requestmark%>"></wea:item>
<wea:item>类型</wea:item>
<wea:item>
<brow:browser name="workflowtypeid" viewType="1"
hasBrowser="true" hasAdd="false"
browserUrl="/systeminfo/BrowserMain.jsp?url=/interface/CommonBrowser.jsp?type=browser.workflow_typebrowser"
isMustInput="1"
isSingle="true"
hasInput="true"
completeUrl="/data.jsp?type=161&fielddbtype=browser.workflow_typebrowser"
width="250px"
browserValue="<%=workflowtypeid %>"
browserSpanValue="<%=EASUtil.getWorkflowTypeName(workflowtypeid) %>" />
</wea:item>
<wea:item>流程</wea:item>
<wea:item>
<brow:browser name="workflowid" viewType="1"
hasBrowser="true" hasAdd="false"
browserUrl="/systeminfo/BrowserMain.jsp?url=/interface/CommonBrowser.jsp?type=browser.workflow_browser"
isMustInput="1"
isSingle="true"
hasInput="true"
completeUrl="/data.jsp?type=161&fielddbtype=browser.workflow_browser"
width="250px"
browserValue="<%=workflowid %>"
browserSpanValue="<%=EASUtil.getWorkflowName(workflowid,0) %>" />
</wea:item>
<wea:item>创建日期</wea:item>
<wea:item>
<span class="wuiDateSpan" selectId="craetedateselect" selectValue="<%=craetedateselect %>">
<input class=wuiDateSel type="hidden" name="createsdate" value="<%=createsdate %>">
<input class=wuiDateSel type="hidden" name="createedate" value="<%=createedate %>">
</span>
</wea:item>
<wea:item>创建人</wea:item>
<wea:item>
<brow:browser viewType="0" name="creater"
browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp"
hasInput="true" isSingle="false" hasBrowser = "true"
isMustInput='1'
completeUrl="/data.jsp"
width="80%"
browserValue="<%=creater %>"
browserSpanValue="<%=ResourceComInfo.getMulResourcename(creater) %>">
</brow:browser>
</wea:item>
<wea:item>处理状态</wea:item>
<wea:item>
<select class=inputstyle size=1 style='' name="status">
<option value="0" <%if(status.equals("0")){%> selected <%} %>><%=SystemEnv.getHtmlLabelName(332, user.getLanguage())%></option>
<option value="1" <%if(status.equals("1")){%> selected <%} %>><%=SystemEnv.getHtmlLabelName(16658, user.getLanguage())%></option>
<option value="2" <%if(status.equals("2")){%> selected <%} %>><%=SystemEnv.getHtmlLabelName(24627, user.getLanguage())%></option>
</select>
</wea:item>
<wea:item>未操作者</wea:item>
<wea:item>
<brow:browser viewType="0" name="unoperator"
browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp"
hasInput="true" isSingle="false" hasBrowser = "true"
isMustInput='1' completeUrl="/data.jsp" width="80%"
browserValue="<%=unoperator %>"
browserSpanValue="<%=ResourceComInfo.getMulResourcename(unoperator) %>">
</brow:browser>
</wea:item>
</wea:group>
</wea:layout>
</div>
<input type="hidden" name="pageId" _showCol=false id="pageId" value="<%=pageId %>"/>
</form>
<%
String loginid = EASUtil.getLoginid(user);
String sqlWhere_oa = " and islasttimes=1 ";
String sqlWhere_eas = " and FPersonUserNumber=''"+loginid+"''";
//只取正常的流程
//sqlWhere += " and EXISTS (select 1 from workflow_base WHERE isvalid='1' and id=workflowid )" ;
/*
System.out.println("requestname = "+requestname);
System.out.println("requestmark = "+requestmark);
System.out.println("workflowtypeid = "+workflowtypeid);
System.out.println("workflowid = "+workflowid);
System.out.println("createsdate = "+createsdate);
System.out.println("createedate = "+createedate);
System.out.println("creater = "+creater);
System.out.println("status = "+status);
System.out.println("unoperator = "+unoperator);
*/
if(!requestname.equals("")){
sqlWhere_oa += " and requestname like '%"+requestname+"%'";
sqlWhere_eas += " and fsubject like ''%"+requestname+"%''" ;
}
if(!requestmark.equals("")){
sqlWhere_oa += " and requestmark like '%"+requestmark+"%'";
sqlWhere_eas += " and FProcdeFNumber like ''%"+requestmark+"%''" ;
}
if(!workflowtypeid.equals("")){
//sqlWhere += " and workflowtype='"+workflowtypeid+"'";
sqlWhere_oa += " and ( t.workflowid IN (SELECT id FROM workflow_base WHERE workflowtype="+workflowtypeid+"))";
sqlWhere_eas += " and fworkflowid IN (SELECT FworkflowID FROM "+eas_workflowinfo+" WHERE FCategoryID="+workflowtypeid+")" ;
}
if(!workflowid.equals("")){
sqlWhere_oa += " and t.workflowid="+workflowid;
sqlWhere_eas += " and fworkflowid=(select fworkflowid from "+eas_workflowinfo+" where fid="+workflowid+") ";
}
if(!creater.equals("")){
sqlWhere_oa += " and creater="+creater ;
sqlWhere_eas += " and FCreatorNumber=''"+EASUtil.getLoginid(creater)+"'' ";
}
if(!unoperator.equals("")){
sqlWhere_oa += " and userid='"+unoperator+"' ";
sqlWhere_eas += " and FPersonUserNumber=''"+EASUtil.getLoginid(unoperator)+"'' ";
}
if(!status.equals("")){
//TODO 代办
if(status.equals("1")){
sqlWhere_oa += " and isremark in ('0','1','5','7','8','9') ";
sqlWhere_eas += " and fstate=''1'' " ;
}else if(status.equals("2")){
//已办
sqlWhere_oa += " and isremark in (2,4) ";
sqlWhere_eas += " and fstate=''16'' " ;
}else{
//全部
}
}
if(!createsdate.equals("")){
sqlWhere_oa += " and createdate>='"+createsdate+"'" ;
sqlWhere_eas += " and to_char(fcreatedtime, ''yyyy-mm-dd'') >=''"+createsdate+"'' " ;
}
if(!createedate.equals("")){
sqlWhere_oa += " and createdate<='"+createedate+"'" ;
sqlWhere_eas += " and to_char(fcreatedtime, ''yyyy-mm-dd'') <=''"+createedate+"'' " ;
}
String sqltemp = "SELECT '0' AS systemtype ,"+
"CAST(t.requestid AS VARCHAR(200)) AS requestid ,"+
"requestname ,"+
"requestmark ,"+
"creater ,'' as createrstr,"+
"CAST(t.currentnodeid AS VARCHAR(100)) AS currentnodeid ,"+
"t2.userid ,"+
"t.createdate,"+
"t.createtime,"+
"t2.receivedate ,"+
"t2.receivetime ,"+
"t2.isremark, "+
"CAST(t.workflowid AS VARCHAR(100)) AS workflowid,'0' as undo "+
" FROM workflow_requestbase t ,"+
" workflow_currentoperator t2"+
" WHERE t.requestid = t2.requestid"+
" AND t2.userid = "+user.getUID()+" "+
" AND t2.usertype = '0'"+
" AND islasttimes = 1"+
" AND EXISTS (SELECT 1 FROM workflow_base WHERE id=t.workflowid AND isvalid=1)"+sqlWhere_oa+
" UNION "+
" SELECT '1' AS systemtype ,"+
" FASSIGNID AS requestid ,"+
" FSubject AS requestname ,"+
" FProcdeFNumber AS requestmark ,"+
" FCreatorNumber AS creater,FCreator AS createrstr ,"+
"FActdeFName AS currentnodeid ,"+
"FPersonUserNumber AS userid ,"+
"SUBSTRING(CONVERT(VARCHAR(20), FCreatedTime, 120), 0, 11) AS createdate ,"+
"SUBSTRING(CONVERT(VARCHAR(20), FCreatedTime, 120), 12, 19) AS createtime ,"+
"SUBSTRING(CONVERT(VARCHAR(20), FActTime, 120), 0, 11) AS receivedate ,"+
"SUBSTRING(CONVERT(VARCHAR(20), FActTime, 120), 12, 19) AS receivetime ,"+
"FState as isremark , "+
" FWorkFlowID AS workflowid,FPersonUserName as undo "+
" FROM (select * from openquery("+eas_linkname+",'select * from "+eas_requestinfo+" where 1=1 "+sqlWhere_eas+" ')) w "+
" WHERE 1 = 1"+
//" AND FPersonUserName = 'qiong.li'"+
//" AND FState = '0' "+
"";
String sqlWhere = "";
String orderby ="receivedate,receivetime";
String tableString = "";
String backfields = " systemtype,requestid,requestname ,requestmark ,creater ,createrstr,currentnodeid ,userid ,createdate,createtime,receivedate ,receivetime ,workflowid,undo";
String fromSql = " ("+sqltemp+") t ";
System.out.println("select "+backfields+" from "+fromSql+" where "+sqlWhere);
String param = user.getLanguage()+"+column:userid+column:userid+column:systemtype+column:undo";
tableString = " <table instanceid=\"wfeas_tablelist\" pageId=\""+pageId+"\" tabletype=\"none\" pagesize=\""+PageIdConst.getPageSize(PageIdConst.WF_WORKFLOW_CUSTOMQUERYTYPETAB,user.getUID())+"\" >"+
//" <checkboxpopedom id=\"checkbox\" popedompara=\"column:id\" showmethod=\"weaver.workflow.exchange.ExchangeUtil.getCanDele\" />"+
" <sql backfields=\""+backfields+"\" sqlform=\""+fromSql+"\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\" sqlorderby=\""+orderby+"\" sqlprimarykey=\"requestid\" sqlsortway=\"desc\" sqlisdistinct=\"true\" />"+
" <head>"+
" <col width=\"5%\" text=\"系统\" column=\"systemtype\" otherpara=\"column:requestid\" transmethod=\"weaver.eas.EASUtil.getSystemName\" />"+
" <col width=\"10%\" text=\"流程编号\" column=\"requestmark\" orderkey=\"requestmark\" />"+
" <col width=\"10%\" text=\"流程名称\" column=\"workflowid\" orderkey=\"workflowid\" transmethod=\"weaver.eas.EASUtil.getWorkflowName\" />"+
" <col width=\"10%\" text=\"创建人\" column=\"creater\" orderkey=\"creater\" otherpara=\"column:systemtype+column:createrstr\" transmethod=\"weaver.eas.EASUtil.getUserName\" />"+
" <col width=\"10%\" text=\"请求标题\" column=\"requestid\" orderkey=\"requestname\" otherpara=\"column:requestname+column:systemtype+"+user.getUID()+"+"+user.getLanguage()+"\" transmethod=\"weaver.eas.EASUtil.getRequestNameLink\" />"+
" <col width=\"10%\" text=\"创建时间\" column=\"createdate\" orderkey=\"createdate\" otherpara=\"column:createtime\" transmethod=\"weaver.eas.EASUtil.getDateTime\" />"+
" <col width=\"10%\" text=\"当前状态\" column=\"requestid\" otherpara=\"column:currentnodeid+column:systemtype+"+user.getLanguage()+"\" transmethod=\"weaver.eas.EASUtil.getCurrentStatus\" />"+
" <col width=\"10%\" text=\"未操作者\" column=\"requestid\" otherpara=\""+param+"\" transmethod=\"weaver.eas.EASUtil.getUnOperators\" />"+
" </head>"+
" </table>";
%>
<TABLE width="100%" cellspacing=0>
<tr>
<td valign="top">
<wea:SplitPageTag tableString="<%=tableString%>" mode="run" />
</td>
</tr>
</TABLE>
</td>
</tr>
</TABLE>
<script type="text/javascript">
function dosearch(){
enableAllmenu();
document.frmSearch.submit();
}
</script>
</BODY>
<script type="text/javascript">
var diag_vote;
jQuery(document).ready(function () {
$("#topTitle").topMenuTitle({searchFn:onBtnSearchClick});
$(".topMenuTitle td:eq(0)").html($("#tabDiv").html());
$("#tabDiv").remove();
//parent.document.getElementById("tabcontentframe").contentWindow.location.href ;
});
function closeDialog(){
diag_vote.close();
}
function onenable(status,id,type){
onstatus(id,status,type) ;
}
function onforbidden(status,id,type){
onstatus(id,status,type) ;
}
function onBtnSearchClick(){
var typename=$("input[name='flowTitle']",parent.document).val();
$("input[name='shortName']").val(typename);
window.location="/workflow/exchange/managelist.jsp?shortName="+typename;
}
function onReset() {
jQuery('input[name="flowTitle"]', parent.document).val('');
jQuery('input[name="shortName"]').val('');
}
function onEditForwfDoc(id,wfid){
if(!wfid){
top.Dialog.alert("流程不能为空");
return;
}
dialog = new top.Dialog();
dialog.currentWindow = window;
var url = "/workflow/workflow/addwf.jsp?wfid="+wfid+"&src=editwf&iscreate=0";
dialog.Title = "<%=SystemEnv.getHtmlLabelNames("21954",user.getLanguage())%>";
dialog.Width = jQuery(top.window).width()-330;
dialog.Height = jQuery(top.window).height()-330;
dialog.maxiumnable = true;
dialog.URL = url;
dialog.show();
}
function onshowlog(id,type){
dialog = new top.Dialog();
dialog.currentWindow = window;
var url = '' ;
if(type=='0'){
url = "/systeminfo/SysMaintenanceLog.jsp?_fromURL=&wflog=1&isdialog=1&sqlwhere=<%=xssUtil.put("where operateitem=199 and relatedid=")%>&relatedid="+id;
}else{
url = "/systeminfo/SysMaintenanceLog.jsp?_fromURL=&wflog=1&isdialog=1&sqlwhere=<%=xssUtil.put("where operateitem=200 and relatedid=")%>&relatedid="+id;
}
if(id==0){
url = "/systeminfo/SysMaintenanceLog.jsp?_fromURL=&wflog=1&isdialog=1&sqlwhere=<%=xssUtil.put("where operateitem in (199,200) ")%>&temp=";
}
dialog.Title = "<%=SystemEnv.getHtmlLabelName(31709,user.getLanguage()) %>";
dialog.Width = jQuery(top.window).width()-100;
dialog.Height = jQuery(top.window).height()-100;
dialog.maxiumnable = true;
dialog.URL = url;
dialog.show();
}
function onReset() {
try{
jQuery('#frmSearch .e8_os input[type="hidden"]').each(function() {
cleanBrowserValue(jQuery(this).attr('name'));
});
jQuery('#frmSearch input:text').val('');
jQuery('#frmSearch select').each(function() {
setSelectBoxValue(this);
});
}catch(e){
}
}
function setSelectBoxValue(selector, value) {
if (value == null) {
value = jQuery(selector).find('option').first().val();
}
jQuery(selector).selectbox('change',value,jQuery(selector).find('option[value="'+value+'"]').text());
}
function cleanBrowserValue(name) {
_writeBackData(name, 1, {id:'',name:''});
}
function ajaxinit(){
var ajax=false;
try {
ajax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ajax = false;
}
}
if (!ajax && typeof XMLHttpRequest!='undefined') {
ajax = new XMLHttpRequest();
}
return ajax;
}
function showallreceived(requestid,returntdid){
//showreceiviedPopup("<%=SystemEnv.getHtmlLabelName(19205, user.getLanguage())%>");
var ajax=ajaxinit();
ajax.open("POST", "/workflow/search/WorkflowUnoperatorPersons.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid+"&returntdid="+returntdid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
$GetEle(returntdid).innerHTML = ajax.responseText;
$GetEle(returntdid).parentElement.title = ajax.responseText.replace(/[\r\n]/gm, "");
}catch(e){}
//showTableDiv.style.display='none';
//oIframe.style.display='none';
}
}
}
</script>
</HTML>

View File

@ -0,0 +1,70 @@
<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="java.util.*" %>
<HTML><HEAD>
<script src="/js/tabs/jquery.tabs.extend_wev8.js"></script>
<link type="text/css" href="/js/tabs/css/e8tabs1_wev8.css" rel="stylesheet" />
<link rel="stylesheet" href="/css/ecology8/request/searchInput_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/ecology8/request/searchInput_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/seachBody_wev8.css" type="text/css" />
<link rel="stylesheet" href="/css/ecology8/request/hoverBtn_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/ecology8/request/hoverBtn_wev8.js"></script>
<script type="text/javascript" src="/js/ecology8/request/titleCommon_wev8.js"></script>
<%
String navName = "查询流程";
%>
<script type="text/javascript">
$(function(){
$('.e8_box').Tabs({
getLine:1,
mouldID:"-1",
iframe:"tabcontentframe",
staticOnLoad:true
});
});
jQuery(document).ready(function(){ setTabObjName("<%=navName%>"); });
</script>
</head>
<BODY scroll="no">
<div class="e8_box demo2">
<div class="e8_boxhead">
<div class="div_e8_xtree" id="div_e8_xtree"></div>
<div class="e8_tablogo" id="e8_tablogo"></div>
<div class="e8_ultab">
<div class="e8_navtab" id="e8_navtab">
<span id="objName"></span>
</div>
<div>
<div id="rightBox" class="e8_rightBox">
</div>
</div>
</div>
</div>
<div class="tab_box">
<div>
<iframe src="requestsearch.jsp" onload="update()" id="tabcontentframe" name="tabcontentframe" class="flowFrame" frameborder="0" height="100%" width="100%;"></iframe>
</div>
</div>
</div>
</body>
<script type="text/javascript">
function mnToggleleft(){
var f = window.parent.oTd1.style.display;
if (f != null) {
if(f==''){
window.parent.oTd1.style.display='none';
}else{
window.parent.oTd1.style.display='';
var divHeght = window.parent.wfleftFrame.setHeight();
}
}
}
jQuery(function(){
jQuery("#e8_tablogo").remove();
})
</script>
</html>

View File

@ -0,0 +1,44 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.eas.MD5Util"%>
<%@ page import="weaver.hrm.*,weaver.general.*" %>
<!DOCTYPE html>
<%
User user = HrmUserVarify.getUser (request , response) ;
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String hashkey = MD5Util.getUserMd5String(loginid);
String requestid = Util.null2String(request.getParameter("requestid"));
String isNotCheckRelogin = Util.null2String(request.getParameter("rwid"));
String isAwokeAtUserReLoginForPortal = Util.null2String(request.getParameter("isAwokeAtUserReLoginForPortal"));
String bill = Util.null2String(request.getParameter("bill"));
System.out.println("udcsso = "+hashkey);
System.out.println("assid = "+requestid);
%>
<head>
<title>查看流程</title>
<script type="text/javascript" src="/wui/common/jquery/jquery.min_wev8.js"></script>
</head>
<body>
<form id=loginform action="http://172.16.1.43:6888/portal/index2sso.jsp" method="post" >
<div class="login-con-bg">
<div class="login-box">
<div class="login-mod br5">
<input name="password" value="" type = "hidden">
<input name="redirectTo" value="/" type = "hidden">
<input name="udcsso" value="<%=hashkey %>" type = "hidden">
<input type="hidden" id="username" name=username value='<%=loginid %>'/>
<input name="isNotCheckRelogin" value="<%=isNotCheckRelogin %>" type = "hidden">
<input name="isAwokeAtUserReLoginForPortal" value="<%=isAwokeAtUserReLoginForPortal %>" type = "hidden">
<input name="bill" value="<%=bill %>" type = "hidden">
<input name="assid" value="<%=requestid %>" type = "hidden">
</div>
</div>
</div>
</form>
<script type="text/javascript">
jQuery(function(){
jQuery("#loginform").submit();
});
</script>
</body>
</html>

View File

@ -0,0 +1,297 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="weaver.general.Util"%>
<%@ page import="weaver.conn.*"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EAS创建流程列表</title>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script src='/js/ecology8/jquery_wev8.js'></script>
<style>
.listbox2 ul {
margin: 0 0 0 0;
padding: 0px;
list-style: none;
/** border-top: 1px solid #ccc;**/
}
.listbox2 {
width:99%;
/** border: 1px solid #ccc; **/
margin-bottom: 32px;
margin-right:0px;
}
.listbox2 .titleitem{
height: 26px;
line-height: 26px;
/** background: #F7F7F7;**/
font-weight: bold;
/** padding-left: 10px;**/
border-bottom: 2px solid #e4e4e4;
}
/** .listbox2 .opimg{
vertical-align: middle;
margin-right:10px;
}**/
TABLE.ViewForm TD {
padding: 0 0 0 5;
BACKGROUND-COLOR: white;
}
.listbox2 ul li a{
color: black;
margin-left:8px;
margin-right:12px;
}
.listbox2 ul li {
height: 30px;
line-height: 30px;
border-bottom:1px dashed #f0f0f0;
padding-left: 0px;
/** background-image:url(http://localhost:9090/images/ecology8/top_icons/1-1_wev8.png);
background-position:0px 50%;
background-repeat:no-repeat no-repeat;**/
}
TABLE.ViewForm A:link {
COLOR: grey;
/* TEXT-DECORATION: none;*/
vertical-align: middle;
line-height: 24px;
}
.ViewForm .commonitem{
/** border: 1px solid #ccc;**/
margin-bottom: 32px;
width: 99.7%;
}
TABLE.ViewForm TD {
padding: 0px;
BACKGROUND-COLOR: white;
}
.ViewForm .commonitem .commonitemtitle{
height: 26px;
line-height: 26px;
/** background: #F7F7F7;**/
font-weight: bold;
border-bottom: 2px solid #e4e4e4;
/** padding-left: 10px;**/
}
.ViewForm .increamentinfo{
color:grey;
margin-left: 10px;
}
#warn{
width: 260px;
height: 65px;
background-color: gray;
position: absolute;
display:none;
background: url("/images/ecology8/addWorkGround_wev8.png");
}
.titlecontent{
float:left;
color:#232323;
/** margin-top: 0.5px;**/
}
.commian{
float:left;
color:#232323;
/** margin-top: 0.5px;**/
border-bottom:2px solid #9e17b6;
}
TABLE.ViewForm TR {
height: 30px !important;
}
.middlehelper {
display: inline-block;
height: 100%;
vertical-align: middle;
}
.autocomplete-suggestions { border: none;background: #F5F5F5;}
.autocomplete-suggestion { padding: 2px 5px; color:#5b5b5b;white-space: nowrap; overflow: hidden;height:30px;line-height:30px;cursor: pointer;text-overflow:ellipsis;border-bottom:1px solid #e2e3e4;}
.autocomplete-selected { border-bottom:1px solid #99cdf8;color:#292828; }
.autocomplete-suggestions strong { font-weight: normal; color: #292828; }
/*代理菜单样式*/
.agentitem{
padding: 2px;
}
.chosen{
background:#3399ff;
color:white;
cursor:pointer;
}
.agentitem a:hover{
color:#ffffff !important;
}
.menuitem{
margin-bottom:5px;
}
/*动态计算浮动签字栏距离top的距离*/
.flowmenuitem {
/* IE5.5+/Win - this is more specific than the IE 5.0 version */
right: auto; bottom: auto;
top: expression( ( -0.1 - this.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
BACKGROUND-COLOR: #F7F7F7;
}
.wrapper{
position: absolute;
width: 100%;
height: 41px;
top: 0;
left: 0;
background: #999999;
z-index: -1;
}
.search_view{
cursor:pointer;
}
</style>
<link href="/css/ecology8/request/requestTypeShow_wev8.css" type="text/css" rel="STYLESHEET">
</head>
<%
RecordSet rs = new RecordSet();
ArrayList typeids = new ArrayList();
ArrayList typenames = new ArrayList();
ArrayList typecounts = new ArrayList();
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
rs.executeSql("select FCategoryID,FCategory,FCategorySeq,count from openquery("+eas_linkname+",'SELECT a.FCategoryID,a.FCategory,a.FCategorySeq,(SELECT COUNT(fid) FROM "+eas_workflowinfo+" WHERE FCategoryID=a.FCategoryID and fstatus=1) as count FROM "+eas_workflowinfo+" a GROUP BY a.FCategoryID,a.FCategory,a.FCategorySeq ORDER BY a.FCategorySeq ')");
while(rs.next()){
String typeid = rs.getString(1);
String typename = rs.getString(2);
System.out.println("typeid = "+typeid+" typename="+typename);
int count = Util.getIntValue(rs.getString(4),0);
if(count>0){
typeids.add(typeid);
typenames.add(typename);
typecounts.add(count+"");
}
}
int ls = typeids.size()%3;
int hs = typeids.size()/3;
String[] color={"#166ca5","#953735","#01b0f1","#767719","#f99d52","#cf39a4"};
%>
<body>
<table height=100% width="100%" border="0" cellspacing="0" cellpadding="0" >
<colgroup>
<col width="10">
<col width="">
<col width="10">
</colgroup>
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td></td>
<td valign="top">
<TABLE class="Shadow" style="width:100%;" >
<tr>
<td valign="top">
<table class="ViewForm">
<tbody>
<tr class="field">
<td style="width:32%;white-space: nowrap;text-overflow: ellipsis;word-wrap:break-word;" align="left" valign="top" num="1">
<%
int idx = 0;
Random r = new Random();
for(int i = 0 ; i < typeids.size(); i++){
String typeid = typeids.get(i).toString();
String typename = typenames.get(i).toString();
String typecount = typecounts.get(i).toString();
int j = r.nextInt(6);
%>
<div class="listbox2">
<div class="titleitem">
<div class="titlecontent main1" style="border-bottom:2px solid <%=color[j] %>"><label><%=typename %></label><font color="#989898" style="font-weight: 400;margin-left:5px;">(<%=typecount %>)</font></div></div>
<div class="mainItem">
<%
rs.executeSql("select fid,fname,fsearchurl from openquery("+eas_linkname+",'SELECT FID,FName,fsearchurl,fexeurl FROM "+eas_workflowinfo+" WHERE FCategoryID="+typeid+" and fstatus=1 ')");
while(rs.next()){
String fid = rs.getString(1);
String fname = rs.getString(2);
String faddurl = rs.getString(3);
%>
<div class="centerItem" style="background-color: rgb(255, 255, 255);">
<div class="fontItem" style="overflow:hidden;">
<img name="esymbol" src="\images\ecology8\request\workflowTitle_wev8.png" style="vertical-align: middle;">
<a style="cursor: pointer;" onclick="javascript:onNewRequest('<%=faddurl %>','<%=fid %>');"><%=fname %></a>
</div>
</div>
<%} %>
</div>
<%
System.out.println("idx = "+idx);
if(idx==2){
idx=0;
%>
</div>
</td>
</tr><tr>
<td width="32%" align="left" valign="top" style="white-space: nowrap;text-overflow: ellipsis;word-wrap:break-word;">
<div class="listbox2">
<%
}else{
%>
</div>
</td>
<td style="width:25px;">&nbsp;</td>
<td width="32%" align="left" valign="top" style="white-space: nowrap;text-overflow: ellipsis;word-wrap:break-word;">
<div class="listbox2">
<%
}
idx++;
%>
<%} %>
</div>
</td>
</tr>
</table>
</td>
</tr>
</TABLE>
</td>
</tr>
<tr>
<td height="10" colspan="3"></td>
</tr>
</table>
<script type="text/javascript">
function onNewRequest(addurl,id){
var url = "/eas/loginSM.jsp?fid="+id+"&"+addurl;
openFullWindow(url);
}
</script>
</body>
</html>

View File

@ -0,0 +1,487 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea" %>
<%@ taglib uri="/browserTag" prefix="brow"%>
<!--added by xwj for td2023 on 2005-05-20-->
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.workflow.search.WfAdvanceSearchUtil" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.*,weaver.workflow.request.WFWorkflows,weaver.workflow.request.WFWorkflowTypes"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="SearchClause" class="weaver.search.SearchClause" scope="session"/>
<jsp:useBean id="CustomerInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WFUrgerManager" class="weaver.workflow.request.WFUrgerManager" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<jsp:useBean id="ProjectInfoComInfo" class="weaver.proj.Maint.ProjectInfoComInfo" scope="page" />
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page" />
<jsp:useBean id="TimeUtil" class="weaver.general.TimeUtil" scope="page" />
<!--以下是显示定制组件所需的js -->
<script type="text/javascript" src="/js/dragBox/parentShowcol_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestView_wev8.css" type="text/css" />
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT type="text/javascript" src="../../js/weaver_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdDOC_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ":" + SystemEnv.getHtmlLabelName(648, user.getLanguage());
String needfav = "1";
String needhelp = "";
%>
<BODY>
<FORM id=frmmain name=frmmain method=post action="WFSuperviseList.jsp">
<%
String method = Util.null2String(request.getParameter("method"));
String objid = Util.null2String(request.getParameter("objid"));
String workflowid = Util.null2String(request.getParameter("workflowid"));
String nodetype = Util.null2String(request.getParameter("nodetype"));
String creatertype = Util.null2String(request.getParameter("creatertype"));
String requestlevel = Util.null2String(request.getParameter("requestlevel"));
//菜单点击workflow 点击的是流程 type 点击的是流程类型
String menutype = Util.null2String(request.getParameter("menutype"));
//菜单点击workflowid or worktypeid 依据menutype而定
String menuid = Util.null2String(request.getParameter("menuid"));
//菜单点击flowAll 所有流程;flowNew 未读流程;flowResponse 反馈的;flowOut 超时的
String complete = Util.null2String(request.getParameter("complete"));
//已督办2未督办1
String isdo = Util.null2String(request.getParameter("isdo"));
//创建日期标识
String datecondition=Util.null2String(request.getParameter("createdateselect"));
//接收日期标识
String recievedateselect = Util.null2String(request.getParameter("recievedateselect"));
int ownerdepartmentid = Util.getIntValue(request.getParameter("ownerdepartmentid"),0);
int creatersubcompanyid=Util.getIntValue(request.getParameter("creatersubcompanyid"),0);
int createrid = Util.getIntValue(request.getParameter("createrid"),0);
int createrid2=Util.getIntValue(request.getParameter("createrid2"),0);
int unophrmid=Util.getIntValue(request.getParameter("unophrmid"),0);
String sqlwhere="";
boolean isnew = false;
//根据页面上(用户所输入的)查询方式来设置查询条件
if (method.equals("type")&&!objid.trim().equals("")) {
workflowid = "";
sqlwhere=" b.workflowtype="+objid;
}
if (method.equals("workflow")&&!objid.trim().equals("")) {
workflowid = objid;
sqlwhere=" b.id="+objid;
}
if (method.equals("request")&&!objid.trim().equals("")) {
String level = Util.null2String(request.getParameter("level"));
//类型级别
if (level.equals("1"))
{
workflowid = "";
sqlwhere=" b.workflowtype="+objid;
}else if (level.equals("2"))
{
workflowid = objid;
sqlwhere=" b.id="+objid;
}
isnew = true;
}
//如果当前流程ID列表为空则对其进行二次赋值
if(workflowid.equals("")){
//如果当前流程类型不为空则将流程类型的所有流程设置为流程ID列表
if(method.equals("type")&&!objid.trim().equals("")){
RecordSet.execute("select id from workflow_base where workflowtype="+objid);
while(RecordSet.next()){
int id_tmp = Util.getIntValue(RecordSet.getString(1), 0);
workflowid += (id_tmp+",");
}
if(!workflowid.equals("")){
workflowid = workflowid.substring(0, workflowid.length()-1);
}
}else{
//如果当前流程类型为空则从会话作用域中来获取流程ID列表
workflowid = SearchClause.getWorkflowId();
}
}
ArrayList flowList=Util.TokenizerString(workflowid,",");
//调用WFUrgerManager类获取当前用户的所有流程的流程督办的配置信息
int logintype = Util.getIntValue(user.getLogintype(),1);
int userID = user.getUID();
WFUrgerManager.setLogintype(logintype);
WFUrgerManager.setUserid(userID);
WFUrgerManager.setSqlwhere(sqlwhere);
WFUrgerManager.setWorkflowIDs(workflowid);
ArrayList wftypes=WFUrgerManager.getWrokflowTree();
String tmpTableName = WFUrgerManager.getTmpTableName();
String requestids = "";
String requestSql = "";
Map mapRequestIDs = new HashMap();
for(int i=0;i<wftypes.size();i++){
WFWorkflowTypes wftype=(WFWorkflowTypes)wftypes.get(i);
ArrayList workflows=wftype.getWorkflows();
for(int j=0;j<workflows.size();j++){
//if(j>0) break;
WFWorkflows wfObj=(WFWorkflows)workflows.get(j);
String tempWorkflow=wfObj.getWorkflowid()+"";
//查询的流程ID列表为空或者流程ID列表包含
if("".equals(workflowid) || flowList.contains(tempWorkflow)) {
ArrayList requests = null;
if(isnew){
requests=wfObj.getNewrequestids();
}else{
requests=wfObj.getReqeustids();
}
for(int k=0;k<requests.size();k++){
if(requestids.equals("")){
requestids=(String)requests.get(k);
}else{
requestids+=","+requests.get(k);
}
}
}
}
}
String newsql =" where (t1.currentnodetype is null or t1.currentnodetype<>'3') and t1.requestid=t2.requestid and t1.deleted<>1 ";
// =====================添加页面上的查询条件 Start =====================
if (!workflowid.equals("")){
//去掉最前边的逗号
while(workflowid.startsWith(",")){
workflowid = workflowid.substring(1);
}
newsql += " and t1.workflowid in(" + workflowid + ")";
}
//高级搜索条件
WfAdvanceSearchUtil conditionutil=new WfAdvanceSearchUtil(request,RecordSet);
String conditions=conditionutil.getAdVanceSearchCondition();
if(!conditions.equals(""))
{
newsql += conditions;
}
// =====================添加页面上的查询条件 END =====================
int perpage=12;
boolean hascreatetime =true;
boolean hascreater =true;
boolean hasworkflowname =true;
boolean hasrequestlevel =false;
boolean hasrequestname =true;
boolean hasreceivetime =false;
boolean hasstatus =false;
boolean hasreceivedpersons =true;
boolean hascurrentnode =true;
perpage=10;
//update by fanggsh 20060711 for TD4532 begin
boolean hasSubWorkflow =false;
//主要用于 显示定制列以及 表格 每页展示记录数选择
String pageIdStr = "7";
if(workflowid!=null&&!workflowid.equals("")&&workflowid.indexOf(",")==-1){
RecordSet.executeSql("select id from Workflow_SubWfSet where mainWorkflowId="+workflowid);
if(RecordSet.next()){
hasSubWorkflow=true;
}
}
String tableString = "";
String fromSql = "";
String sqlWhere = newsql;
String backfields = " t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid, t1.requestname,t1.requestnamenew, t1.status,t1.requestlevel,t1.currentnodeid,t2.receivedatetime";
if(RecordSet.getDBType().equals("oracle")){
fromSql = " from (select requestid,max(receivedate||' '||receivetime) as receivedatetime from workflow_currentoperator group by requestid) t2,workflow_requestbase t1 ";
}else{
fromSql = " from (select requestid,max(receivedate+' '+receivetime) as receivedatetime from workflow_currentoperator group by requestid) t2,workflow_requestbase t1 ";
}
if (!requestids.equals("")) {
if (isnew) {
sqlWhere += " AND t1.requestid in("+requestids+") ";
}
}else{
sqlWhere+=" and 1>2 ";
}
if(RecordSet.getDBType().equals("oracle"))
{
sqlWhere += " and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ";
}
else
{
sqlWhere += " and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ";
}
String table1 = "select " + backfields + fromSql + sqlWhere;
backfields = " t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid, t1.requestname, t1.requestnamenew, t1.status,t1.requestlevel,t1.currentnodeid,t1.receivedatetime";
fromSql =" from ("+table1+") t1 ";
if(tmpTableName != null) {
fromSql += " ,(Select requestId from "+tmpTableName+") t2 ";
sqlWhere = " where t1.requestid=t2.requestid ";
} else {
sqlWhere = "";
}
//已督办
if(isdo.equals("2"))
sqlWhere += " and (select count(0) from workflow_requestlog where requestid =t2.requestid and logtype='s' and operator="+user.getUID()+")>0 ";
//未督办
else if(isdo.equals("1"))
sqlWhere += " and (select count(0) from workflow_requestlog where requestid =t2.requestid and logtype='s' and operator="+user.getUID()+")=0 ";
if(menutype.equals("workflow"))
sqlWhere += " and t1.workflowid='"+menuid+"' ";
else if(menutype.equals("type"))
sqlWhere += " and (select count(0) from workflow_base where id=t1.workflowid and workflowtype='"+menuid+"')>0 ";
//未读流程
if(complete.equals("3"))
sqlWhere += " and (select count(0) from workflow_requestviewlog where id=t2.requestid and currentnodeid = t1.currentnodeid and viewer="+user.getUID()+")=0";
//反馈流程
else if(complete.equals("4"));
//超时流程
else if(complete.equals("8"));
String popeUrgepara = "column:requestid+column:workflowid+"+user.getUID()+"+"+(logintype-1)+"+"+ user.getLanguage();
String operateString= "";
operateString = "<operates>";
operateString +=" <popedom transmethod=\"weaver.general.WorkFlowTransMethod.getWfUrgerNewOperation\" otherpara=\""+popeUrgepara+"\" ></popedom> ";
//operateString +=" <operate href=\"javascript:doReadFlag();\" text=\"标记为已读\" index=\"0\"/>";
operateString +="</operates>";
String orderby = " t1.receivedatetime ";
%>
<TABLE width="100%" cellspacing=0 class="ListStyle">
<tr class='header'>
<td>流程编号</td><td>创建人</td><td>请求标题</td><td>接受时间</td><td>当前节点</td><td>未操作者</td>
</tr>
<%
WorkFlowTransMethod wtm = new WorkFlowTransMethod();
String sql = "selct "+backfields +" "+fromSql+" where 1=1 "+sqlWhere+" order by "+orderby+" desc";
RecordSet.executeSql(sql);
while(RecordSet.next()){
String requestid = RecordSet.getString("requestid");
String requestname = RecordSet.getString("requestname");
String _workflowid = RecordSet.getString("workflowid");
String _userid = Util.null2String(RecordSet.getString("userid"));
String para2 = requestid+"+"+_workflowid+"+"+userID+"+"+(logintype-1)+"+"+ user.getLanguage();
%>
<tr>
<td><%=RecordSet.getString("requestmark") %></td>
<td><%=ResourceComInfo.getMulResourcename1(RecordSet.getString("creater")) %></td>
<td><%=wtm.getWfNewLinkByUrger(requestname,"")%></td>
<td><%=RecordSet.getString("receivedatetime") %></td>
<td><%=wtm.getCurrentNode(RecordSet.getString("currentnodeid")) %></td>
<td><%=wtm.getUnOperators(requestid,user.getLanguage()+"+"+user.getUID()) %></td>
</tr>
<tr style="height: 1px !important;" class="Spacing"><td class="paddingLeft0Table" colSpan="7"><div class="intervalDivClass"></div></td></tr>
<%} %>
</TABLE>
<div id='divshowreceivied' style='background:#FFFFFF;padding:3px;width:100%' valign='top'>
</div>
</form>
</body>
<script type="text/javascript">
function rightMenuSearch(){
if(jQuery("#advancedSearchOuterDiv").css("display")!="none"){
document.frmmain.submit();
}else{
try{
jQuery("span#searchblockspan",parent.document).find("img:first").click();
}catch(e){
document.frmmain.submit();
}
}
}
function changeType(type,span1,span2){
if(type=="1"){
jQuery("#"+span1).hide();
jQuery("#"+span2).show();
}else{
jQuery("#"+span2).hide();
jQuery("#"+span1).show();
}
}
var dialog = null;
//批处理
function doReadFlagByBatch()
{
if(_xtable_CheckedCheckboxId()=="")
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
else
{
//批量督办
var reqids = _xtable_CheckedCheckboxId();
dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/workflow/search/WFSuperviseSignature.jsp?reqids="+reqids;
dialog.Title = "<%=SystemEnv.getHtmlLabelName(26039,user.getLanguage())%>";
dialog.Width = 450;
dialog.Height = 227;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
}
}
//标记为已读
function doReadFlag(requestid,params,obj){
var ajax=ajaxinit();
ajax.open("POST", "WFSuperviseDoFlag.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
var rsdata=$.trim(ajax.responseText);
if(rsdata==="success")
{
_table. reLoad();
}
}catch(e){
}
}
}
}
function onShowWorkFlow(inputname, spanname) {
onShowWorkFlowBase(inputname, spanname, false);
}
function onShowWorkFlowBase(inputname, spanname, needed) {
var retValue = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkflowBrowser.jsp", "", "dialogWidth:550px;dialogHeight:550px;");
if (retValue != null) {
if (wuiUtil.getJsonValueByIndex(retValue, 0) != "" ) {
$GetEle(spanname).innerHTML = wuiUtil.getJsonValueByIndex(retValue, 1);
$GetEle(inputname).value = wuiUtil.getJsonValueByIndex(retValue, 0);
$GetEle("objid").value = wuiUtil.getJsonValueByIndex(retValue, 0);
} else {
$GetEle(inputname).value = "";
if (needed) {
$GetEle(spanname).innerHTML = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>";
} else {
$GetEle(spanname).innerHTML = "";
}
$GetEle("objid").value = "";
}
}
}
</script>
<SCRIPT language="javascript">
jQuery("#topTitle").topMenuTitle({searchFn:searchItem});
var showTableDiv = document.getElementById('divshowreceivied');
var oIframe = document.createElement('iframe');
function showreceiviedPopup(content){
showTableDiv.style.display='';
var message_Div = document.createElement("div");
message_Div.id="message_Div";
message_Div.className="xTable_message";
showTableDiv.appendChild(message_Div);
var message_Div1 = document.getElementById("message_Div");
message_Div1.style.display="inline";
message_Div1.innerHTML=content;
var pTop= document.body.offsetHeight/2+document.body.scrollTop-50;
var pLeft= document.body.offsetWidth/2-50;
message_Div1.style.position="absolute"
message_Div1.style.top=pTop;
message_Div1.style.left=pLeft;
message_Div1.style.zIndex=1002;
oIframe.id = 'HelpFrame';
showTableDiv.appendChild(oIframe);
oIframe.frameborder = 0;
oIframe.style.position = 'absolute';
oIframe.style.top = pTop;
oIframe.style.left = pLeft;
oIframe.style.zIndex = message_Div1.style.zIndex - 1;
oIframe.style.width = parseInt(message_Div1.offsetWidth);
oIframe.style.height = parseInt(message_Div1.offsetHeight);
oIframe.style.display = 'block';
}
function ajaxinit(){
var ajax=false;
try {
ajax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ajax = false;
}
}
if (!ajax && typeof XMLHttpRequest!='undefined') {
ajax = new XMLHttpRequest();
}
return ajax;
}
function showallreceived(requestid,returntdid){
showreceiviedPopup("<%=SystemEnv.getHtmlLabelName(19205,user.getLanguage())%>");
var ajax=ajaxinit();
ajax.open("POST", "WorkflowUnoperatorPersons.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid+"&returntdid="+returntdid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
document.getElementById(returntdid).innerHTML = ajax.responseText;
}catch(e){}
showTableDiv.style.display='none';
oIframe.style.display='none';
}
}
}
</script>
<SCRIPT language="javascript" src="/js/ecology8/request/wFCommonAdvancedSearch_wev8.js"></script>
<SCRIPT language="javascript" src="/js/datetime_wev8.js"></script>
<SCRIPT language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</html>

View File

@ -0,0 +1,812 @@
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<%
Enumeration em = request.getParameterNames();
boolean isinit = true;
while(em.hasMoreElements())
{
String paramName = (String)em.nextElement();
if(!paramName.equals(""))
isinit = false;
break;
}
//是否需要加载树
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
String loadtree = Util.null2String(request.getParameter("loadtree"));
int date2during = Util.getIntValue(request.getParameter("date2during"),0);
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(1210,user.getLanguage()) +":"+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
String resourceid=""+user.getUID();
session.removeAttribute("RequestViewResource");
String logintype = ""+user.getLogintype();
int usertype = 0;
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?offical="+offical+"&officalType="+officalType+"&fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
if(logintype.equals("2"))
usertype= 1;
char flag = Util.getSeparator();
int olddate2during = 0;
BaseBean baseBean = new BaseBean();
String date2durings = "";
try
{
date2durings = Util.null2String(baseBean.getPropValue("wfdateduring", "wfdateduring"));
}
catch(Exception e)
{}
String[] date2duringTokens = Util.TokenizerString2(date2durings,",");
if(date2duringTokens.length>0)
{
olddate2during = Util.getIntValue(date2duringTokens[0],0);
}
if(olddate2during<0||olddate2during>36)
{
olddate2during = 0;
}
if(isinit)
{
date2during = olddate2during;
}
%>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript">
var date2during = '<%=date2during %>';
function changeShowType()
{
if(date2during=='0')
{
location.href="/workflow/request/MyRequestView.jsp?offical=<%=offical%>&officalType=<%=officalType%>&date2during=<%=olddate2during%>";
}
else
{
location.href="/workflow/request/MyRequestView.jsp?offical=<%=offical%>&officalType=<%=officalType%>&date2during=0";
}
}
</script>
</head>
<body>
<% // if(HrmUserVarify.checkUserRight("requestview:Add", user)){ %>
<% // }%>
<%
ArrayList wftypes=new ArrayList();
ArrayList wftypecounts=new ArrayList();
ArrayList workflows=new ArrayList();
ArrayList wftypecountsy=new ArrayList();
ArrayList workflowcounts=new ArrayList();//未归档的
ArrayList workflowcountsy=new ArrayList();//归档
ArrayList newcountslist = new ArrayList();//未读
ArrayList supedcountslist = new ArrayList();//反馈
ArrayList overcountslist = new ArrayList();//超时
Map workflowcountsMap=new Hashtable();//未归档的数量
Map workflowcountsyMap=new Hashtable();//归档数量
Map newcountsMap=new Hashtable(); //未读
Map supedcountsMap=new Hashtable();//反馈数量
Map overcountsMap = new Hashtable(); //超时数量
String _viewtype = ""; //
int totalcount=0;
int totalcounty=0;
String currworkflowtype="";
String currworkflowid="";
String currentnodetype="";
String _wftypes = "";
String demoLeftMenus = "";
if(loadtree.equals("true")){
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select count(distinct t1.requestid) typecount, ");
sqlsb.append(" t2.workflowtype, ");
sqlsb.append(" t1.workflowid, ");
sqlsb.append(" t1.currentnodetype ");
sqlsb.append(" from workflow_requestbase t1, workflow_base t2,workflow_currentoperator t3 ");
sqlsb.append(" where t1.creater = ").append(resourceid);
sqlsb.append(" and t1.creatertype = ").append(usertype);
sqlsb.append(" and t1.workflowid = t2.id ");
sqlsb.append(" and t1.requestid = t3.requestid ");
sqlsb.append(" and t3.islasttimes=1 ");
sqlsb.append(" and (t2.isvalid='1' or t2.isvalid='3') ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
sqlsb.append(" and exists ");
sqlsb.append(" (select 1 ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where workflow_currentoperator.islasttimes='1' ");
sqlsb.append(" and workflow_currentoperator.userid = " + resourceid + WorkflowComInfo.getDateDuringSql(date2during) +") ");
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and isvalid=1)");
}else if(officalType==2){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and isvalid=1)");
}
}
sqlsb.append("group by t2.workflowtype, t1.workflowid, t1.currentnodetype");
RecordSet.executeSql(sqlsb.toString());
//System.out.println("sqlsb.toString():"+sqlsb.toString());
//RecordSet.executeProc("workflow_requestbase_MyRequest",resourceid+flag+usertype);
while (RecordSet.next())
{
currworkflowtype = RecordSet.getString("workflowtype");
currworkflowid = RecordSet.getString("workflowid");
currworkflowid = WorkflowVersion.getActiveVersionWFID(currworkflowid);
currentnodetype=RecordSet.getString("currentnodetype");
_viewtype = RecordSet.getString("viewtype");
int theworkflowcount=RecordSet.getInt("typecount");
if(selectedworkflow.indexOf("T"+currworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+currworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
int temps=wftypes.indexOf(currworkflowtype);
if (temps!=-1)
{
if (currentnodetype.equals("3"))
wftypecountsy.set(temps,""+(Util.getIntValue((String)wftypecountsy.get(temps),0)+theworkflowcount));
else
wftypecounts.set(temps,""+(Util.getIntValue((String)wftypecounts.get(temps),0)+theworkflowcount));
}
else
{
wftypes.add(currworkflowtype);
if (currentnodetype.equals("3"))
{
wftypecountsy.add(""+RecordSet.getString("typecount"));
wftypecounts.add(""+0);
}
else
{
wftypecounts.add(""+RecordSet.getString("typecount"));
wftypecountsy.add(""+0);
}
}
temps=workflows.indexOf(currworkflowid);
if (temps!=-1)
{
if (currentnodetype.equals("3"))
workflowcountsy.set(temps,""+(Util.getIntValue((String)workflowcountsy.get(temps),0)+theworkflowcount));
else
workflowcounts.set(temps,""+(Util.getIntValue((String)workflowcounts.get(temps),0)+theworkflowcount));
}
else
{
workflows.add(currworkflowid);
if (currentnodetype.equals("3"))
{
workflowcountsy.add(""+RecordSet.getString("typecount"));
workflowcounts.add(""+0);
}
else
{
workflowcounts.add(""+RecordSet.getString("typecount"));
workflowcountsy.add(""+0);
}
}
if (currentnodetype.equals("3"))
totalcounty+=theworkflowcount;
else
totalcount+=theworkflowcount;
}
//左侧树 json 数据生成逻辑
demoLeftMenus+="[";
String typeid="";
String typecount=""; //未归档的type数量
String typecounty = ""; //已归档的type数量
String typename="";
String workflowid="";
String workflowcount=""; //未归档的数量
String workflowcounty = ""; //归档的数量
String wfnewcount = ""; //未读
String wfrescount = ""; //反馈
String wfoutcount = ""; //超时
String workflowname="";
//System.out.println("wftypes.size():流程类型总数==>"+wftypes.size()); //流程类型总数
for(int i=0;i<wftypes.size();i++){
typeid=(String)wftypes.get(i);
//typecount=(String)wftypecounts.get(i);
//typecounty = (String)wftypecountsy.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
demoLeftMenus+="{";
demoLeftMenus+="\"name\":\""+Util.toScreenForJs(Util.toScreen(typename,user.getLanguage()))+"\",";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
demoLeftMenus+="\"isOpen\":\"true\",";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"typeid\":"+typeid+",";
demoLeftMenus+="\"fromAdvancedMenu\":"+fromAdvancedMenu+",";
demoLeftMenus+="\"infoId\":"+infoId+",";
demoLeftMenus+="\"selectedContent\":\""+selectedContent+"\",";
demoLeftMenus+="\"menuType\":\""+menuType+"\",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus+="\"submenus\":[";
List<Map> maps=new ArrayList(0);
for(int j=0;j<workflows.size();j++){
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)){
continue;
}
workflowcount=(String)workflowcounts.get(j);
workflowcounty = (String)workflowcountsy.get(j);
//wfnewcount = (String)newcountslist.get(j);
//wfrescount = (String)supedcountslist.get(j);
//wfoutcount = (String)overcountslist.get(j);
Object tempovtimenumObj = newcountsMap.get(workflowid);
if (tempovtimenumObj != null) {
wfnewcount = tempovtimenumObj.toString();
} else {
wfnewcount = "0";
}
Object tempovtimenumObj2 = supedcountsMap.get(workflowid);
if (tempovtimenumObj2 != null) {
wfrescount = tempovtimenumObj2.toString();
} else {
wfrescount = "0";
}
Object tempovtimenumObj3 = overcountsMap.get(workflowid);
if (tempovtimenumObj3 != null) {
wfoutcount = tempovtimenumObj3.toString();
} else {
wfoutcount = "0";
}
//把未归档的和已归档的合并起来 modifier Dracula 2014-7-7
String wfallcount = (Util.getIntValue(workflowcount) + Util.getIntValue(workflowcounty))+"";
//System.out.println("未归档:"+workflowcount+" 已归档:"+workflowcounty);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
//System.out.println(workflowname+" 未读流程:"+wfnewcount+"反馈流程:"+wfrescount);
Map map=new HashMap();
map.put("name",Util.toScreenForJs(Util.toScreen(workflowname,user.getLanguage())));
map.put("workflowid",workflowid);
map.put("flowAll",Util.toScreen("0",user.getLanguage()));
map.put("flowNew",Util.toScreen("0",user.getLanguage()));
map.put("flowResponse",Util.toScreen("0",user.getLanguage()));
map.put("flowOut",Util.toScreen("0",user.getLanguage()));
if(workflowcount.equals("")) workflowcount = "0";
if(workflowcounty.equals("0")) workflowcounty = "0";
//把未归档的和已归档的合并起来 modifier Dracula 2014-7-7
if(workflowcount.equals("0") && workflowcounty.equals("0"));
else{
maps.add(map);
}
}
int flowAll=0;
int flowNew=0;
int flowResponse=0;
int flowOut=0;
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
flowAll+=Integer.valueOf(map.get("flowAll")+"");
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowOut+=Integer.valueOf(map.get("flowOut")+"");
demoLeftMenus+="{";
demoLeftMenus+="\"name\":\""+map.get("name")+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus+="\"isOpen\":\"true\",";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"workflowid\":"+map.get("workflowid")+",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus+="\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus+="\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus+="\"flowOut\":"+map.get("flowOut");
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
demoLeftMenus+="],";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+flowAll+",";
demoLeftMenus+="\"flowNew\":"+flowNew+",";
demoLeftMenus+="\"flowResponse\":"+flowResponse+",";
demoLeftMenus+="\"flowOut\":"+flowOut;
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (i==wftypes.size()-1)?"":",";
_wftypes += typeid+",";
}
//EAS流程类型查询里列表
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select FCategoryID,FCategory,FCategorySeq from "+eas_workflowinfo+" group by FCategoryID,FCategory,FCategorySeq order by FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
while(rs.next()){
String _typeid = rs.getString(1);
String _typename = rs.getString(2);
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select * from "+eas_requestinfo+" where FCreatorNumber=''"+loginid+"'' and fworkflowid in (select fworkflowid from "+eas_workflowinfo+" where FCategoryID=''"+_typeid+"'') ')");
int allwfcount = RecordSet.getCounts();
if(allwfcount==0){
continue ;
}
System.out.println("_typeid = "+_typeid+" _typename="+_typename);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",{";
}else{
demoLeftMenus +="{";
}
demoLeftMenus += "\"name\":\""+_typename+"\",";
demoLeftMenus+="\"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"hasChildren\":"+true+",";
demoLeftMenus += "\"isOpen\":"+true+",";
demoLeftMenus += "\"submenus\":[";
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
int wfcountall = 0 ;
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String _wfname = RecordSet.getString(2);
String fworkflowid = Util.null2String(RecordSet.getString("fworkflowid"));
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FCreatorNumber=''"+loginid+"'' and fworkflowid=''"+fworkflowid+"'' ')");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
if(wfcount==0){
continue ;
}
wfcountall += wfcount ;
demoLeftMenus += "{";
demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"workflowid\":"+_wfid+",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+wfcount+",";
demoLeftMenus+="\"flowNew\":0,";
demoLeftMenus+="\"flowResponse\":0,";
demoLeftMenus+="\"flowOut\":0";
demoLeftMenus+="}";
demoLeftMenus += "}";
demoLeftMenus += ",";
}
if(demoLeftMenus.endsWith(",")){
demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
}
demoLeftMenus += "],";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"typeid\":"+typeid+",";
demoLeftMenus+="\"fromAdvancedMenu\":"+fromAdvancedMenu+",";
demoLeftMenus+="\"infoId\":"+infoId+",";
demoLeftMenus+="\"selectedContent\":\""+selectedContent+"\",";
demoLeftMenus+="\"menuType\":\""+menuType+"\",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+wfcountall+",";
demoLeftMenus+="\"flowNew\":0,";
demoLeftMenus+="\"flowResponse\":0,";
demoLeftMenus+="\"flowOut\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
}
demoLeftMenus += "]";
out.clear();
out.print(demoLeftMenus);
System.out.println(demoLeftMenus);
return;
}
boolean isUseOldWfMode=sysInfo.isUseOldWfMode();
if(!isUseOldWfMode){
String typeid="";
String typecount="";
String typename="";
String workflowid="";
String workflowcount="";
String workflowname="";
int typerowcounts=wftypes.size();
JSONArray jsonFinishedWfTypeArray = new JSONArray();
JSONArray jsonUnFinishedWfTypeArray = new JSONArray();
for(int i=0;i<typerowcounts;i++){
JSONObject jsonWfType = new JSONObject();
jsonWfType.put("draggable",false);
jsonWfType.put("leaf",false);
typeid=(String)wftypes.get(i);
typecount=(String)wftypecounts.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
if (!typecount.equals("0"))
{
if(fromAdvancedMenu==1){
jsonWfType.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywftype&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=0&selectedContent="+selectedContent+"&menuType="+menuType);
}
else{
jsonWfType.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywftype&wftype="+typeid+"&complete=0");
}
jsonWfType.put("text","<a href=# onClick=javaScript:loadGrid('"+jsonWfType.get("paras").toString()+"',true) >"+typename+"&nbsp;</a>("+typecount+")");
jsonWfType.put("cls","wfTreeFolderNode");
//if(typeid.equals("24")) continue;
JSONArray jsonWfTypeChildrenArray = new JSONArray();
for(int j=0;j<workflows.size();j++){
String wfText = "";
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)) continue;
JSONObject jsonWfTypeChild = new JSONObject();
jsonWfTypeChild.put("draggable",false);
jsonWfTypeChild.put("leaf",true);
workflowcount=(String)workflowcounts.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
if (!workflowcount.equals("0")){
jsonWfTypeChild.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywfid&workflowid="+workflowid+"&complete=0");
wfText +="<a href=# onClick=javaScript:loadGrid('"+jsonWfTypeChild.get("paras").toString()+"',true) >"+workflowname+" </a>&nbsp(";
wfText+=Util.toScreen(workflowcount,user.getLanguage())+")";
jsonWfTypeChild.put("text",wfText);
jsonWfTypeChild.put("iconCls","btn_dot");
jsonWfTypeChild.put("cls","wfTreeLeafNode");
jsonWfTypeChildrenArray.put(jsonWfTypeChild);
}
}
jsonWfType.put("children",jsonWfTypeChildrenArray);
jsonUnFinishedWfTypeArray.put(jsonWfType);
}
}
for(int i=0;i<typerowcounts;i++){
JSONObject jsonWfType = new JSONObject();
jsonWfType.put("draggable",false);
jsonWfType.put("leaf",false);
typeid=(String)wftypes.get(i);
typecount=(String)wftypecountsy.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
if (!typecount.equals("0"))
{
if(fromAdvancedMenu==1){
jsonWfType.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywftype&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=1&selectedContent="+selectedContent+"&menuType="+menuType);
}
else{
jsonWfType.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywftype&wftype="+typeid+"&complete=1");
}
jsonWfType.put("text","<a href=# onClick=javaScript:loadGrid('"+jsonWfType.get("paras").toString()+"',true) >"+typename+"&nbsp;</a>("+typecount+")");
jsonWfType.put("cls","wfTreeFolderNode");
//if(typeid.equals("24")) continue;
JSONArray jsonWfTypeChildrenArray = new JSONArray();
for(int j=0;j<workflows.size();j++){
String wfText = "";
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)) continue;
JSONObject jsonWfTypeChild = new JSONObject();
jsonWfTypeChild.put("draggable",false);
jsonWfTypeChild.put("leaf",true);
workflowcount=(String)workflowcountsy.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
if (!workflowcount.equals("0")){
jsonWfTypeChild.put("paras","offical="+offical+"&officalType="+officalType+"&method=myreqeustbywfid&workflowid="+workflowid+"&complete=1");
wfText +="<a href = # onClick=javaScript:loadGrid('"+jsonWfTypeChild.get("paras").toString()+"',true) >"+workflowname+" </a>&nbsp(";
wfText+=Util.toScreen(workflowcount,user.getLanguage())+")";
jsonWfTypeChild.put("text",wfText);
jsonWfTypeChild.put("iconCls","btn_dot");
jsonWfTypeChild.put("cls","wfTreeLeafNode");
jsonWfTypeChildrenArray.put(jsonWfTypeChild);
}
}
jsonWfType.put("children",jsonWfTypeChildrenArray);
jsonFinishedWfTypeArray.put(jsonWfType);
}
}
session.setAttribute("finished",jsonFinishedWfTypeArray);
session.setAttribute("unfinished",jsonUnFinishedWfTypeArray);
session.setAttribute("finishedCount",""+totalcounty);
session.setAttribute("unfinishedCount",""+totalcount);
response.sendRedirect("/workflow/request/ext/Request.jsp?offical="+offical+"&officalType="+officalType+"&type=myrequest"); //type: view,表待办 handled表已办
return;
}
%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
/* edited by wdl 2006-06-14 left menu advanced menu */
if(date2during==0)
{
//显示部分
RCMenu += "{"+SystemEnv.getHtmlLabelName(89,user.getLanguage())+SystemEnv.getHtmlLabelName(15154,user.getLanguage())+",javascript:changeShowType(),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
else
{
//显示全部
RCMenu += "{"+SystemEnv.getHtmlLabelName(89,user.getLanguage())+SystemEnv.getHtmlLabelName(332,user.getLanguage())+",javascript:changeShowType(),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
if(fromAdvancedMenu!=1){
RCMenuWidth = 160;
RCMenu += "{"+SystemEnv.getHtmlLabelName(16342,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=myall&complete=0&viewType=4,_self} " ;
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{"+SystemEnv.getHtmlLabelName(16343,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=myall&complete=1&viewType=4,_self} " ;
RCMenuHeight += RCMenuHeightStep;
}
/* edited end */
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<script type="text/javascript">
function showloading()
{
if(jQuery(".leftTypeSearch").css("display") === "none");
else
e8_before2();
}
var demoLeftMenus = [];
function onloadtree()
{
var ajax=ajaxinit();
ajax.open("POST", "/workflow/request/MyRequestView.jsp?offical=<%=offical%>&officalType=<%=officalType%>", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("loadtree=true");
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
var restr = ajax.responseText;
$("#overFlowDiv").attr("loadtree","true");
demoLeftMenus = jQuery.parseJSON(restr);
var needflowOut=true;
var needflowResponse=true;
var numberTypes={
flowNew:{hoverColor:"#EE5F5F",color:"#EE5F5F",title:"新的流程"}
};
if(needflowOut==true || needflowOut=="true"){
numberTypes.flowOut={hoverColor:"#CB9CF4",color:"#CB9CF4",title:"超时的流程"};
}
if(needflowResponse==true || needflowResponse=="true"){
numberTypes.flowResponse={hoverColor:"#FFC600",color:"#FFC600",title:"有反馈的流程"};
}
numberTypes.flowAll={hoverColor:"#A6A6A6",color:"black",title:"全部流程",display:false};
if(demoLeftMenus != null)
{
$(".ulDiv").leftNumMenu(demoLeftMenus,{
numberTypes:numberTypes,
showZero:false,
//deleteIfAllZero:true,
_callback:onloadtreeCount,
menuStyles:["menu_lv1",""],
clickFunction:function(attr,level,numberType){
leftMenuClickFn(attr,level,numberType);
}
});
}
var sumCount=0;
$(".e8_level_2").each(function(){
sumCount+=parseInt($(this).find(".e8_block:last").html());
});
e8_after2();
}catch(e){e8_after2();}
}
}
}
function onloadtreeCount(obj,menus,options,level,customparams){
jQuery(obj).leftNumMenu("/workflow/request/MyRequestViewAjaxCount.jsp?offical=<%=offical%>&officalType=<%=officalType%>&flag="+Math.random(),"update");
}
function leftMenuClickFn(attr,level,numberType){
var doingTypes={
"flowAll":{complete:0}, //全部
"flowNew":{complete:4}, //未读
"flowResponse":{complete:3}, //反馈
"flowOut":{complete:5}
};
if(numberType==null){
numberType="flowAll";
}
var url;
var typeid=attr.typeid;
var fromAdvancedMenu=attr.fromAdvancedMenu;
var infoId=attr.infoId;
var selectedContent=attr.selectedContent;
var menuType=attr.menuType;
var date2during=attr.date2during;
var workflowid=attr.workflowid;
var viewcondition=doingTypes[numberType].complete;
if(level==1){
window.typeid=typeid;
window.workflowid=null;
window.nodeids=null;
if(fromAdvancedMenu=="1"){
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=myreqeustbywftype&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=2&viewcondition="+viewcondition+"&selectedContent="+selectedContent +"&menuType="+menuType +"&date2during="+date2during +"&viewType=4&wftypes=<%=_wftypes %>";
}else{
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=myreqeustbywftype&wftype="+typeid+"&complete=2&viewcondition="+viewcondition+"&date2during="+date2during +"&viewType=4&wftypes=<%=_wftypes %>";
}
}else{
if(numberType==null){
numberType="flowAll";
}
window.typeid=null;
window.workflowid=workflowid;
window.nodeids=nodeids;
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=myreqeustbywfid&workflowid="+workflowid+"&complete=2&viewcondition="+viewcondition+"&date2during="+date2during+"&viewType=4&wftypes=<%=_wftypes %>";
}
url+="&viewScope=mine&numberType="+numberType;
$(".flowFrame").attr("src",url);
}
function WfSearchAll(){
/*清除已选项样式*/
jQuery(".leftSearchInput").val("");
if(window.e8_search && window.oldtree!=false){
if(jQuery(".webfx-tree-item").length>0){
jQuery(".webfx-tree-item_selected").find("img[src*='w_']").each(function(){
var lastSrc = jQuery(this).attr("src");
jQuery(this).attr("src",lastSrc.replace("w_",""));
});
jQuery(".webfx-tree-item_selected").removeClass("webfx-tree-item_selected");
}else{
jQuery(".curSelectedNode").removeClass("curSelectedNode");
}
format("",true);
}else{
jQuery(".e8_li_selected").find(".e8menu_icon_close_select").removeClass("e8menu_icon_close_select").addClass("e8menu_icon_close");
jQuery(".e8_li_selected").find(".e8menu_icon_open_select").removeClass("e8menu_icon_open_select").addClass("e8menu_icon_open");
jQuery(".e8_li_selected").removeClass("e8_li_selected");
format2("",true);
}
/*清除右侧查询条件并重新查询*/
document.getElementById("myFrame").src ="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=myall&viewType=4&viewScope=mine&wftypes=<%=_wftypes %>&complete=2";
}
</script>
<%@ include file="/systeminfo/leftMenuCommon.jsp" %>
<script type="text/javascript" src="/js/ecology8/request/requestView_wev8.js"></script>
<table cellspacing="0" cellpadding="0" class="flowsTable" >
<tr>
<td class="leftTypeSearch">
<span class="leftType" onclick="WfSearchAll()">
<span><img style="vertical-align:middle;" src="/images/ecology8/request/alltype_wev8.png" width="18"/></span>
<span><%=SystemEnv.getHtmlLabelName(21979,user.getLanguage()) %></span>
</span>
<span class="leftSearchSpan">
&nbsp;<input type="text" class="leftSearchInput" />
</span>
</td>
<td rowspan="2">
<iframe id="myFrame" name="myFrame" src="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=myall&viewType=4&viewScope=mine&wftypes=<%=_wftypes %>&complete=2" class="flowFrame" style='height:100%;' frameborder="0" ></iframe>
</td>
</tr>
<tr>
<td style="width:23%;" class="flowMenusTd">
<div class="flowMenuDiv" >
<!--<div class="flowMenuAll"><span class="allText">全部&nbsp;</span></div>-->
<div style="overflow:hidden;height:300px;position:relative;" id="overFlowDiv">
<div class="ulDiv" ></div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,557 @@
<%@page import="weaver.systeminfo.SystemEnv"%>
<%@page import="weaver.hrm.User"%>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<%@ page import="weaver.general.BaseBean" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<%
User user = HrmUserVarify.getUser (request , response) ;
if(user==null) {
return;
}
Enumeration em = request.getParameterNames();
boolean isinit = true;
while(em.hasMoreElements())
{
String paramName = (String)em.nextElement();
if(!paramName.equals(""))
isinit = false;
break;
}
//是否需要加载树
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
String loadtree = Util.null2String(request.getParameter("loadtree"));
int date2during = Util.getIntValue(request.getParameter("date2during"),0);
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(1210,user.getLanguage()) +":"+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
String resourceid=""+user.getUID();
session.removeAttribute("RequestViewResource");
String logintype = ""+user.getLogintype();
int usertype = 0;
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?offical="+offical+"&officalType="+officalType+"&fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
if(logintype.equals("2"))
usertype= 1;
char flag = Util.getSeparator();
int olddate2during = 0;
BaseBean baseBean = new BaseBean();
String date2durings = "";
try
{
date2durings = Util.null2String(baseBean.getPropValue("wfdateduring", "wfdateduring"));
}
catch(Exception e)
{}
String[] date2duringTokens = Util.TokenizerString2(date2durings,",");
if(date2duringTokens.length>0)
{
olddate2during = Util.getIntValue(date2duringTokens[0],0);
}
if(olddate2during<0||olddate2during>36)
{
olddate2during = 0;
}
if(isinit)
{
date2during = olddate2during;
}
ArrayList wftypes=new ArrayList();
ArrayList wftypecounts=new ArrayList();
ArrayList workflows=new ArrayList();
ArrayList wftypecountsy=new ArrayList();
ArrayList workflowcounts=new ArrayList();//未归档的
ArrayList workflowcountsy=new ArrayList();//归档
ArrayList newcountslist = new ArrayList();//未读
ArrayList supedcountslist = new ArrayList();//反馈
ArrayList overcountslist = new ArrayList();//超时
Map workflowcountsMap=new Hashtable();//未归档的数量
Map workflowcountsyMap=new Hashtable();//归档数量
Map newcountsMap=new Hashtable(); //未读
Map supedcountsMap=new Hashtable();//反馈数量
Map overcountsMap = new Hashtable(); //超时数量
String _viewtype = ""; //
int totalcount=0;
int totalcounty=0;
String currworkflowtype="";
String currworkflowid="";
String currentnodetype="";
String _wftypes = "";
String demoLeftMenus = "";
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select count(distinct t1.requestid) typecount, ");
sqlsb.append(" t2.workflowtype, ");
sqlsb.append(" t1.workflowid, ");
sqlsb.append(" t1.currentnodetype ");
sqlsb.append(" from workflow_requestbase t1, workflow_base t2,workflow_currentoperator t3 ");
sqlsb.append(" where t1.creater = ").append(resourceid);
sqlsb.append(" and t1.creatertype = ").append(usertype);
sqlsb.append(" and t1.workflowid = t2.id ");
sqlsb.append(" and t1.requestid = t3.requestid ");
sqlsb.append(" and t3.islasttimes=1 ");
sqlsb.append(" and (t2.isvalid='1' or t2.isvalid='3') ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
sqlsb.append(" and exists ");
sqlsb.append(" (select 1 ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where workflow_currentoperator.islasttimes='1' ");
sqlsb.append(" and workflow_currentoperator.userid = " + resourceid + WorkflowComInfo.getDateDuringSql(date2during) +") ");
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and isvalid=1)");
}else if(officalType==2){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and isvalid=1)");
}
}
sqlsb.append("group by t2.workflowtype, t1.workflowid, t1.currentnodetype");
RecordSet.executeSql(sqlsb.toString());
//System.out.println("sqlsb.toString():"+sqlsb.toString());
//RecordSet.executeProc("workflow_requestbase_MyRequest",resourceid+flag+usertype);
while (RecordSet.next())
{
currworkflowtype = RecordSet.getString("workflowtype");
currworkflowid = RecordSet.getString("workflowid");
currworkflowid = WorkflowVersion.getActiveVersionWFID(currworkflowid);
currentnodetype=RecordSet.getString("currentnodetype");
_viewtype = RecordSet.getString("viewtype");
int theworkflowcount=RecordSet.getInt("typecount");
if(selectedworkflow.indexOf("T"+currworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+currworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
int temps=wftypes.indexOf(currworkflowtype);
if (temps!=-1)
{
if (currentnodetype.equals("3"))
wftypecountsy.set(temps,""+(Util.getIntValue((String)wftypecountsy.get(temps),0)+theworkflowcount));
else
wftypecounts.set(temps,""+(Util.getIntValue((String)wftypecounts.get(temps),0)+theworkflowcount));
}
else
{
wftypes.add(currworkflowtype);
if (currentnodetype.equals("3"))
{
wftypecountsy.add(""+RecordSet.getString("typecount"));
wftypecounts.add(""+0);
}
else
{
wftypecounts.add(""+RecordSet.getString("typecount"));
wftypecountsy.add(""+0);
}
}
temps=workflows.indexOf(currworkflowid);
if (temps!=-1)
{
if (currentnodetype.equals("3"))
workflowcountsy.set(temps,""+(Util.getIntValue((String)workflowcountsy.get(temps),0)+theworkflowcount));
else
workflowcounts.set(temps,""+(Util.getIntValue((String)workflowcounts.get(temps),0)+theworkflowcount));
}
else
{
workflows.add(currworkflowid);
if (currentnodetype.equals("3"))
{
workflowcountsy.add(""+RecordSet.getString("typecount"));
workflowcounts.add(""+0);
}
else
{
workflowcounts.add(""+RecordSet.getString("typecount"));
workflowcountsy.add(""+0);
}
}
if (currentnodetype.equals("3"))
totalcounty+=theworkflowcount;
else
totalcount+=theworkflowcount;
}
StringBuffer wftypesb = new StringBuffer();
StringBuffer wfsb = new StringBuffer();
StringBuffer wfnodesb = new StringBuffer();
for(int x=0;x<workflows.size();x++)
{
String _wfid = (String)workflows.get(x);
String _wftype = (String)WorkflowComInfo.getWorkflowtype(_wfid);
}
for(int i=0;i<workflows.size();i++){
String tworkflowid = (String)workflows.get(i);
String tworkflowtype = (String)WorkflowComInfo.getWorkflowtype(tworkflowid);
int newcount=0;
int newcount1=0;
//tworkflowNodeIDs = Util.null2String((String)wfNodeHahstable.get(tworkflowid));
if(!"".equals(tworkflowtype)){
wftypesb.append(",").append(tworkflowtype);
wfsb.append(",").append(WorkflowVersion.getAllVersionStringByWFIDs(tworkflowid));
}
/*
String tempnodeid = WorkflowVersion.getAllRelationNodeStringByNodeIDs(tworkflowNodeIDs);
if (tempnodeid != null && !"".equals(tempnodeid)) {
wfnodesb.append(",").append(tempnodeid);
}
*/
}
if (wftypesb.length() > 0) {
wftypesb = wftypesb.delete(0, 1);
wfsb = wfsb.delete(0, 1);
}
if (wfnodesb.indexOf(",") == 0) {
wfnodesb = wfnodesb.delete(0, 1);
}
sqlsb = new StringBuffer();
sqlsb.append(" select t3.workflowtype, t3.workflowid, count(distinct t1.requestid) viewcount,t3.viewtype,t3.isremark ");
sqlsb.append(" from workflow_requestbase t1, workflow_base t2,workflow_currentoperator t3 ");
sqlsb.append(" where t1.creater = ").append(resourceid);
sqlsb.append(" and t3.userid = ").append(resourceid);
sqlsb.append(" and t1.creatertype = ").append(usertype);
sqlsb.append(" and t1.workflowid = t2.id ");
sqlsb.append(" and t3.workflowtype in ( ").append(wftypesb).append(") ");
sqlsb.append(" and t3.workflowid in (").append(wfsb).append(")");
sqlsb.append(" and t1.requestid = t3.requestid ");
sqlsb.append(" and t3.islasttimes=1 ");
sqlsb.append(" and (t2.isvalid='1' or t2.isvalid='3') ");
sqlsb.append(" and (t1.deleted=0 or t1.deleted is null) and ((t3.isremark in('2','4') and t1.currentnodetype = '3') or t1.currentnodetype <> '3' ) ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ");
}
sqlsb.append(" and exists ");
sqlsb.append(" (select 1 ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where workflow_currentoperator.islasttimes='1' ");
sqlsb.append(" and workflow_currentoperator.userid = " + resourceid + WorkflowComInfo.getDateDuringSql(date2during) +") ");
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and isvalid=1)");
}else if(officalType==2){
sqlsb.append(" and t1.workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and isvalid=1)");
}
}
sqlsb.append(" group by viewtype,t3.isremark, t3.workflowtype, t3.workflowid");
RecordSet.execute(sqlsb.toString());
//System.out.println(sqlsb.toString());
int _newcount = 0;
int _rescount = 0;
int _outcount = 0;
while(RecordSet.next()) {
String tworkflowtype = Util.null2String(RecordSet.getString("workflowtype"));
String tworkflowid = WorkflowVersion.getActiveVersionWFID(Util.null2String(RecordSet.getString("workflowid")));
int _vc = Util.getIntValue(RecordSet.getString("viewcount"),0);
String _im = RecordSet.getString("isremark");
String _vt = RecordSet.getString("viewtype");
//System.out.println(WorkflowComInfo.getWorkflowname(_wfid) +" 有"+(_vt.equals("-1")?"反馈":(_vt.equals("0")?"未读":"一般"))+"流程 "+_vc+" 条");
int wfindex = workflows.indexOf(tworkflowid) ;
if(wfindex != -1) {
if(_im.equals("5")) {
//_outcount += _vc;
Object tempobj = overcountsMap.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
overcountsMap.put(tworkflowid, wf0countindex + _vc);
} else {
overcountsMap.put(tworkflowid, _vc);
}
}else{
if(_vt.equals("-1")) {
Object tempobj = supedcountsMap.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
supedcountsMap.put(tworkflowid, wf0countindex + _vc);
} else {
supedcountsMap.put(tworkflowid, _vc);
}
//_rescount += _vc;
}
if(_vt.equals("0")) {
Object tempobj = newcountsMap.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
newcountsMap.put(tworkflowid, wf0countindex + _vc);
} else {
newcountsMap.put(tworkflowid, _vc);
}
//_newcount += _vc;
}
}
}
}
//newcountslist.add(_newcount+"");
//supedcountslist.add(_rescount+"");
//overcountslist.add(_outcount+"");
//}
/***************************************/
//左侧树 json 数据生成逻辑
demoLeftMenus+="[";
String typeid="";
String typecount=""; //未归档的type数量
String typecounty = ""; //已归档的type数量
String typename="";
String workflowid="";
String workflowcount=""; //未归档的数量
String workflowcounty = ""; //归档的数量
String wfnewcount = ""; //未读
String wfrescount = ""; //反馈
String wfoutcount = ""; //超时
String workflowname="";
for(int i=0;i<wftypes.size();i++){
typeid=(String)wftypes.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
demoLeftMenus+="{";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
List<Map> maps=new ArrayList(0);
int flowAll=0;
int flowNew=0;
int flowResponse=0;
int flowOut=0;
for(int j=0;j<workflows.size();j++){
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)){
continue;
}
workflowcount=(String)workflowcounts.get(j);
workflowcounty = (String)workflowcountsy.get(j);
//wfnewcount = (String)newcountslist.get(j);
//wfrescount = (String)supedcountslist.get(j);
//wfoutcount = (String)overcountslist.get(j);
Object tempovtimenumObj = newcountsMap.get(workflowid);
if (tempovtimenumObj != null) {
wfnewcount = tempovtimenumObj.toString();
} else {
wfnewcount = "0";
}
Object tempovtimenumObj2 = supedcountsMap.get(workflowid);
if (tempovtimenumObj2 != null) {
wfrescount = tempovtimenumObj2.toString();
} else {
wfrescount = "0";
}
Object tempovtimenumObj3 = overcountsMap.get(workflowid);
if (tempovtimenumObj3 != null) {
wfoutcount = tempovtimenumObj3.toString();
} else {
wfoutcount = "0";
}
String wfallcount = (Util.getIntValue(workflowcount) + Util.getIntValue(workflowcounty))+"";
//System.out.println("未归档:"+workflowcount+" 已归档:"+workflowcounty);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
//System.out.println(workflowname+" 未读流程:"+wfnewcount+"反馈流程:"+wfrescount);
Map map=new HashMap();
map.put("name",Util.toScreen(workflowname,user.getLanguage()));
map.put("workflowid",workflowid);
map.put("flowAll",Util.toScreen(wfallcount,user.getLanguage()));
map.put("flowNew",Util.toScreen(wfnewcount,user.getLanguage()));
map.put("flowResponse",Util.toScreen(wfrescount,user.getLanguage()));
map.put("flowOut",Util.toScreen(wfoutcount,user.getLanguage()));
if(workflowcount.equals("")) workflowcount = "0";
if(workflowcounty.equals("0")) workflowcounty = "0";
//把未归档的和已归档的合并起来 modifier Dracula 2014-7-7
if(workflowcount.equals("0") && workflowcounty.equals("0"));
else{
maps.add(map);
}
flowAll+=Integer.valueOf(map.get("flowAll")+"");
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowOut+=Integer.valueOf(map.get("flowOut")+"");
}
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+flowAll+",";
demoLeftMenus+="\"flowNew\":"+flowNew+",";
demoLeftMenus+="\"flowResponse\":"+flowResponse+",";
demoLeftMenus+="\"flowOut\":"+flowOut;
demoLeftMenus+="}";
demoLeftMenus+="}";
if (maps.size() > 0) {
demoLeftMenus += ",";
}
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
demoLeftMenus+="{";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus+="\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus+="\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus+="\"flowOut\":"+map.get("flowOut");
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
if (i < wftypes.size() - 1) {
demoLeftMenus += ",";
}
}
RecordSet rs = new RecordSet();
RecordSet rs1 = new RecordSet();
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
//EAS流程类型查询里列表
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select a.FCategoryID,a.FCategory,a.FCategorySeq,(select COUNT(FProcinstID) from "+eas_requestinfo+" where FCreatorNumber=''"+loginid+"'' AND FWorkFlowID in (SELECT fworkflowid FROM "+eas_workflowinfo+" WHERE FCategoryID=a.FCategoryID) ) from "+eas_workflowinfo+" a group by a.FCategoryID,a.FCategory,a.FCategorySeq order by a.FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
int wfcountall = 0 ;
while(rs.next()){
String _typeid = rs.getString(1);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",";
}
wfcountall = rs.getInt(4);
demoLeftMenus += "{";
demoLeftMenus+=" \"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowAll\":"+wfcountall+",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus+= "\"flowOut\":0";
demoLeftMenus += "}";
demoLeftMenus += "},";
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String fworkflowid = Util.null2String(RecordSet.getString("fworkflowid"));
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FCreatorNumber=''"+loginid+"'' AND FWorkFlowID=''"+fworkflowid+"'' ') ");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
//if(wfcount>0){
demoLeftMenus += "{";
//demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
//demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowAll\":"+wfcount+",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus+= "\"flowOut\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += ",";
//}
}
if(demoLeftMenus.endsWith(",")){
demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
}
//demoLeftMenus += ",";
}
demoLeftMenus += "]";
out.print(demoLeftMenus);
%>

View File

@ -0,0 +1,701 @@
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<!DOCTYPE html>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<%
Enumeration em = request.getParameterNames();
boolean isinit = true;
while(em.hasMoreElements())
{
String paramName = (String)em.nextElement();
if(!paramName.equals(""))
isinit = false;
break;
}
String loadtree = Util.null2String(request.getParameter("loadtree"));
int date2during = Util.getIntValue(request.getParameter("date2during"),0);
String resourceid= Util.null2String(request.getParameter("resourceid"));
String logintype = ""+user.getLogintype();
int usertype = 0;
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?offical="+offical+"&officalType="+officalType+"&fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
if(resourceid.equals("")) {
resourceid = ""+user.getUID();
if(logintype.equals("2")) usertype= 1;
session.removeAttribute("RequestViewResource") ;
}
else {
session.setAttribute("RequestViewResource",resourceid) ;
}
char flag = Util.getSeparator();
String username = Util.toScreen(ResourceComInfo.getResourcename(resourceid),user.getLanguage());
if(logintype.equals("2")) username = Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(""+user.getUID()),user.getLanguage()) ;
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(17991,user.getLanguage()) + ": "+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
int olddate2during = 0;
BaseBean baseBean = new BaseBean();
String date2durings = "";
try
{
date2durings = Util.null2String(baseBean.getPropValue("wfdateduring", "wfdateduring"));
}
catch(Exception e)
{}
String[] date2duringTokens = Util.TokenizerString2(date2durings,",");
if(date2duringTokens.length>0)
{
olddate2during = Util.getIntValue(date2duringTokens[0],0);
}
if(olddate2during<0||olddate2during>36)
{
olddate2during = 0;
}
if(isinit)
{
date2during = olddate2during;
}
%>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript">
var date2during = '<%=date2during %>';
function changeShowType()
{
if(date2during=='0')
{
location.href="/workflow/request/RequestHandled.jsp?offical=<%=offical %>&officalType=<%=officalType %>&date2during=<%=olddate2during%>";
}
else
{
location.href="/workflow/request/RequestHandled.jsp?offical=<%=offical %>&officalType=<%=officalType %>&date2during=0";
}
}
</script>
</head>
<body>
<%
String typeid="";
String typecount="";
String typename="";
String workflowid="";
String workflowcount="";
String newremarkwfcount0="";
String newremarkwfcount="";
String workflowname="";
ArrayList wftypes=new ArrayList();
ArrayList wftypecounts=new ArrayList();
ArrayList workflows=new ArrayList();
ArrayList workflowcounts=new ArrayList();//反馈
ArrayList newremarkwfcount0s=new ArrayList();//未读
ArrayList newremarkwfcounts=new ArrayList();
int totalcount=0;
String _wftypes = "";
String demoLeftMenus = "";
if(loadtree.equals("true")){
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select workflowtype, ");
sqlsb.append(" workflowid, ");
sqlsb.append(" viewtype, ");
sqlsb.append(" count(distinct requestid) workflowcount ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where (isremark in('2','4') or (isremark=0 and takisremark =-2)) ");
sqlsb.append(" and islasttimes = 1 ");
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype).append(WorkflowComInfo.getDateDuringSql(date2during));
sqlsb.append(" and exists ");
sqlsb.append(" (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = workflow_currentoperator.workflowid ");
sqlsb.append(" and c.requestid = workflow_currentoperator.requestid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
if(offical.equals("1")){
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
sqlsb.append(" group by workflowtype, workflowid, viewtype ");
sqlsb.append(" order by workflowtype, workflowid");
//RecordSet.executeSql("select workflowtype, workflowid, viewtype, count(distinct requestid) workflowcount from workflow_currentoperator where isremark='2' and iscomplete=0 and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" group by workflowtype, workflowid, viewtype order by workflowtype, workflowid " ) ;
RecordSet.executeSql(sqlsb.toString()) ;
while(RecordSet.next()){
String theworkflowid = Util.null2String(RecordSet.getString("workflowid")) ;
String theworkflowtype = Util.null2String(RecordSet.getString("workflowtype")) ;
int theworkflowcount = Util.getIntValue(RecordSet.getString("workflowcount"),0) ;
int viewtype = Util.getIntValue(RecordSet.getString("viewtype"),-2) ;
theworkflowid = WorkflowVersion.getActiveVersionWFID(theworkflowid);
if(WorkflowComInfo.getIsValid(theworkflowid).equals("1")){
/* added by wdl 2006-06-14 left menu advanced menu */
if(selectedworkflow.indexOf("T"+theworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+theworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
/* added end */
int wfindex = workflows.indexOf(theworkflowid) ;
if(wfindex != -1) {
workflowcounts.set(wfindex,""+(Util.getIntValue((String)workflowcounts.get(wfindex),0)+theworkflowcount)) ;
if(viewtype==-1){
newremarkwfcounts.set(wfindex,""+(Util.getIntValue((String)newremarkwfcounts.get(wfindex),0)+theworkflowcount)) ;
}
}else{
workflows.add(theworkflowid) ;
workflowcounts.add(""+theworkflowcount) ;
if(viewtype==-1){
newremarkwfcounts.add(""+theworkflowcount);
newremarkwfcount0s.add(""+0);
}else{
newremarkwfcounts.add(""+0);
newremarkwfcount0s.add(""+0);
}
}
int wftindex = wftypes.indexOf(theworkflowtype) ;
if(wftindex != -1) {
wftypecounts.set(wftindex,""+(Util.getIntValue((String)wftypecounts.get(wftindex),0)+theworkflowcount)) ;
}
else {
wftypes.add(theworkflowtype) ;
wftypecounts.add(""+theworkflowcount) ;
}
totalcount += theworkflowcount;
}
}
//左侧树拼接 json
demoLeftMenus="[";
for(int i=0;i<wftypes.size();i++){
typeid=(String)wftypes.get(i);
typecount=(String)wftypecounts.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
demoLeftMenus+="{";
demoLeftMenus+="\"name\":\""+Util.toScreenForJs(Util.toScreen(typename,user.getLanguage()))+"\",";
demoLeftMenus+="\"hasChildren\":true,";
demoLeftMenus+="\"isOpen\":true,";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"typeid\":"+typeid+",";
demoLeftMenus+="\"fromAdvancedMenu\":"+fromAdvancedMenu+",";
demoLeftMenus+="\"infoId\":\""+infoId+"\",";
demoLeftMenus+="\"selectedContent\":\""+selectedContent+"\",";
demoLeftMenus+="\"menuType\":\""+menuType+"\",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus+="\"submenus\":[";
List<Map> maps=new ArrayList(0);
for(int j=0;j<workflows.size();j++){
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)){
continue;
}
workflowcount=(String)workflowcounts.get(j);
newremarkwfcount0=(String)newremarkwfcount0s.get(j);
newremarkwfcount=(String)newremarkwfcounts.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
Map map=new HashMap();
map.put("name",Util.toScreenForJs(Util.toScreen(workflowname,user.getLanguage())));
map.put("workflowid",workflowid);
//map.put("flowResponse",Util.toScreen(newremarkwfcount,user.getLanguage()));//
//map.put("flowNew",newremarkwfcount0);
//map.put("flowAll",Util.toScreen(workflowcount,user.getLanguage()));//
map.put("flowResponse","0");//
map.put("flowNew","0");
map.put("flowAll","0");//
maps.add(map);
}
int flowNew=0;
int flowResponse=0;
int flowAll=0;
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowAll+=Integer.valueOf(map.get("flowAll")+"");
demoLeftMenus+="{";
demoLeftMenus+="\"name\":\""+map.get("name")+"\",";
demoLeftMenus+="\"hasChildren\":false,";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus+="\"isOpen\":false,";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"workflowid\":"+map.get("workflowid")+",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus+="\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus+="\"flowAll\":"+map.get("flowAll");
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
demoLeftMenus+="],";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowNew\":"+flowNew+",";
demoLeftMenus+="\"flowResponse\":"+flowResponse+",";
demoLeftMenus+="\"flowAll\":"+flowAll;
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (i==wftypes.size()-1)?"":",";
_wftypes += typeid+",";
}
//EAS流程类型查询里列表
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select FCategoryID,FCategory,FCategorySeq from "+eas_workflowinfo+" group by FCategoryID,FCategory,FCategorySeq order by FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
while(rs.next()){
String _typeid = rs.getString(1);
String _typename = rs.getString(2);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",{";
}else{
demoLeftMenus +="{";
}
System.out.println("_typeid = "+_typeid+" _typename="+_typename);
demoLeftMenus += "\"name\":\""+_typename+"\",";
demoLeftMenus+="\"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"hasChildren\":"+true+",";
demoLeftMenus += "\"isOpen\":"+true+",";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"typeid\":"+_typeid+",";
demoLeftMenus+="\"fromAdvancedMenu\":"+fromAdvancedMenu+",";
demoLeftMenus+="\"infoId\":\""+infoId+"\",";
demoLeftMenus+="\"selectedContent\":\""+selectedContent+"\",";
demoLeftMenus+="\"menuType\":\""+menuType+"\",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus += "\"submenus\":[";
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
int wfcountall = 0 ;
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String _wfname = RecordSet.getString(2);
String fworkflowid = Util.null2String(RecordSet.getString("fworkflowid"));
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' AND FWorkFlowID=''"+fworkflowid+"'' and FState=''16''')");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
//if(wfcount>0){
wfcountall += wfcount ;
demoLeftMenus += "{";
demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
demoLeftMenus+="\"hasChildren\":false,";
demoLeftMenus+="\"attr\":{";
demoLeftMenus+="\"workflowid\":"+_wfid+",";
demoLeftMenus+="\"date2during\":\""+date2during+"\"";
demoLeftMenus+="},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+"";
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += ",";
//}
}
if(demoLeftMenus.endsWith(",")){
demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
}
demoLeftMenus += "],";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+"";
demoLeftMenus += "}";
demoLeftMenus += "}";
}
demoLeftMenus += "]";
out.clear();
out.print(demoLeftMenus);
//System.out.println(demoLeftMenus);
return;
}
boolean isUseOldWfMode=sysInfo.isUseOldWfMode();
if(!isUseOldWfMode){
int typerowcounts=wftypes.size();
//typerowcounts=(wftypes.size()+1)/2;
JSONArray jsonWfTypeArray = new JSONArray();
for(int i=0;i<typerowcounts;i++){
JSONObject jsonWfType = new JSONObject();
jsonWfType.put("draggable",false);
jsonWfType.put("leaf",false);
jsonWfType.put("cls","wfTreeFolderNode");
typeid=(String)wftypes.get(i);
typecount=(String)wftypecounts.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
if(fromAdvancedMenu==1){
jsonWfType.put("paras","method=reqeustbywftype&fromadvancedmenu="+fromAdvancedMenu+"&infoId"+infoId+"&wftype="+typeid+"&complete=2&selectedContent="+selectedContent+"&menuType="+menuType);
}
else{
jsonWfType.put("paras","method=reqeustbywftype&wftype="+typeid+"&complete=2");
}
JSONArray jsonWfTypeChildrenArray = new JSONArray();
int newwfCount0 = 0;
int newwfCount = 0;
for(int j=0;j<workflows.size();j++){
String wfText = "";
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)) continue;
workflowcount=(String)workflowcounts.get(j);
newremarkwfcount0=(String)newremarkwfcount0s.get(j);
newremarkwfcount=(String)newremarkwfcounts.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
JSONObject jsonWfTypeChild = new JSONObject();
jsonWfTypeChild.put("draggable",false);
jsonWfTypeChild.put("leaf",true);
jsonWfTypeChild.put("iconCls","btn_dot");
jsonWfTypeChild.put("cls","wfTreeLeafNode");
jsonWfTypeChild.put("paras","method=reqeustbywfid&workflowid="+workflowid+"&complete=2");
wfText +="<a href=# onClick=javaScript:loadGrid('"+jsonWfTypeChild.get("paras").toString()+"',true) >"+workflowname+" </a>&nbsp(";
if(!newremarkwfcount0.equals("0")){
String paras = "method=reqeustbywfid&workflowid="+workflowid+"&complete=50";
wfText+="<a href=# onClick=javaScript:loadGrid('"+paras+"',true) >"+Util.toScreen(newremarkwfcount0,user.getLanguage())+"</a><IMG src='/images/BDNew_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
newwfCount0 =newwfCount0 +Util.getIntValue(newremarkwfcount0);
}
if(!newremarkwfcount.equals("0")){
String paras = "method=reqeustbywfid&workflowid="+workflowid+"&complete=5";
wfText+="<a href=# onClick=javaScript:loadGrid('"+paras+"',true) >"+Util.toScreen(newremarkwfcount,user.getLanguage())+"</a><IMG src='/images/BDNew2_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
newwfCount =newwfCount +Util.getIntValue(newremarkwfcount);
}
wfText+=Util.toScreen(workflowcount,user.getLanguage())+")";
jsonWfTypeChild.put("text",wfText);
jsonWfTypeChildrenArray.put(jsonWfTypeChild);
}
String wfText ="";
if(newwfCount0>0){
wfText+=newwfCount0+"<IMG src='/images/BDNew_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
}
if(newwfCount>0){
wfText+=newwfCount+"<IMG src='/images/BDNew2_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
}
jsonWfType.put("text","<a href=# onClick=javaScript:loadGrid('"+jsonWfType.get("paras").toString()+"',true) >"+typename+"&nbsp;</a>("+wfText+typecount+")");
jsonWfType.put("children",jsonWfTypeChildrenArray);
jsonWfTypeArray.put(jsonWfType);
}
session.setAttribute("handled",jsonWfTypeArray);
response.sendRedirect("/workflow/request/ext/Request.jsp?type=handled"); //type: view,表待办 handled表已办
return;
}
//共项
titlename+="&nbsp;&nbsp;("+SystemEnv.getHtmlLabelName(18609,user.getLanguage())+""+totalcount+""+SystemEnv.getHtmlLabelName(26302,user.getLanguage())+")";
if(date2during>0)
{
//最近个月
titlename+="("+SystemEnv.getHtmlLabelName(24515,user.getLanguage())+""+date2during+""+SystemEnv.getHtmlLabelName(26301,user.getLanguage())+")";
}
%>
<%@ include file="/systeminfo/leftMenuCommon.jsp" %>
<script type="text/javascript" src="/js/ecology8/request/requestView_wev8.js"></script>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<link rel="stylesheet" type="text/css" href="/css/weaver-ext-grid_wev8.css" />
<form name=frmmain method=post action="RequestView.jsp">
<div>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
if(date2during==0)
{
//显示部分
RCMenu += "{"+SystemEnv.getHtmlLabelName(89,user.getLanguage())+SystemEnv.getHtmlLabelName(15154,user.getLanguage())+",javascript:changeShowType(),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
else
{
//显示全部
RCMenu += "{"+SystemEnv.getHtmlLabelName(89,user.getLanguage())+SystemEnv.getHtmlLabelName(332,user.getLanguage())+",javascript:changeShowType(),_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
/* edited by wdl 2006-06-14 left menu advanced menu */
if(fromAdvancedMenu!=1){
RCMenuWidth = 160;
RCMenu += "{"+SystemEnv.getHtmlLabelName(16347,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=all&complete=0&viewType=1,_self}" ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(20271,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=all&complete=2&viewType=2,_self}" ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(16348,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=all&complete=1&viewType=3,_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
/* edited end */
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
</div>
</form>
<script type="text/javascript">
var demoLeftMenus = [];
function showloading()
{
if(jQuery(".leftTypeSearch").css("display") === "none");
else
e8_before2();
}
function onloadtree()
{
var ajax=ajaxinit();
ajax.open("POST", "/workflow/request/RequestHandled.jsp?offical=<%=offical%>&officalType=<%=officalType%>", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("loadtree=true");
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
var restr = ajax.responseText;
$("#overFlowDiv").attr("loadtree","true");
demoLeftMenus = jQuery.parseJSON(restr);
var needflowOut=true;
var needflowResponse=true;
var numberTypes={
flowNew:{hoverColor:"#EE5F5F",color:"#EE5F5F",title:"新的流程"}
};
if(needflowOut==true || needflowOut=="true"){
numberTypes.flowOut={hoverColor:"#CB9CF4",color:"#CB9CF4",title:"超时的流程"};
}
if(needflowResponse==true || needflowResponse=="true"){
numberTypes.flowResponse={hoverColor:"#FFC600",color:"#FFC600",title:"有反馈的流程"};
}
numberTypes.flowAll={hoverColor:"#A6A6A6",color:"black",title:"全部流程"};
if(demoLeftMenus != null)
{
$(".ulDiv").leftNumMenu(demoLeftMenus,{
numberTypes:numberTypes,
showZero:false,
deleteIfAllZero:true,
_callback:onloadtreeCount,
menuStyles:["menu_lv1",""],
clickFunction:function(attr,level,numberType){
leftMenuClickFn(attr,level,numberType);
}
});
}
var sumCount=0;
$(".e8_level_2").each(function(){
sumCount+=parseInt($(this).find(".e8_block:last").html());
});
e8_after2();
}catch(e){e8_after2();}
}
}
}
function onloadtreeCount(obj,menus,options,level,customparams){
jQuery(obj).leftNumMenu("/workflow/request/RequestHandledAjaxCount.jsp?offical=<%=offical%>&officalType=<%=officalType%>&flag="+Math.random(),"update");
}
function leftMenuClickFn(attr,level,numberType){
var doingTypes={
"flowAll":{complete:0}, //全部
"flowNew":{complete:4}, //未读
"flowResponse":{complete:3} //反馈
};
var url;
var typeid=attr.typeid;
var fromAdvancedMenu=attr.fromAdvancedMenu;
var infoId=attr.infoId;
var selectedContent=attr.selectedContent;
var menuType=attr.menuType;
var date2during=attr.date2during;
var workflowid=attr.workflowid;
if(numberType == null)
numberType="flowAll";
var viewcondition=doingTypes[numberType].complete;
if(level==1){
window.typeid=typeid;
window.workflowid=null;
window.nodeids=null;
if(fromAdvancedMenu=="1"){
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=reqeustbywftype&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=2&selectedContent="+selectedContent +"&menuType="+menuType +"&date2during="+date2during +"&viewType=2&wftypes=<%=_wftypes %>";
}else{
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=reqeustbywftype&wftype="+typeid+"&complete=2&viewcondition="+viewcondition+"&date2during="+date2during +"&viewType=2&wftypes=<%=_wftypes %>";
}
}else{
if(numberType==null){
numberType="flowAll";
}
window.typeid=null;
window.workflowid=workflowid;
window.nodeids=nodeids;
url="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=reqeustbywfid&workflowid="+workflowid+"&complete=2&viewcondition="+viewcondition+"&date2during="+date2during+"&viewType=2&wftypes=<%=_wftypes %>";
}
url+="&viewScope=done&numberType="+numberType;
$(".flowFrame").attr("src",url);
}
function WfSearchAll(){
/*清除已选项样式*/
jQuery(".leftSearchInput").val("");
if(window.e8_search && window.oldtree!=false){
if(jQuery(".webfx-tree-item").length>0){
jQuery(".webfx-tree-item_selected").find("img[src*='w_']").each(function(){
var lastSrc = jQuery(this).attr("src");
jQuery(this).attr("src",lastSrc.replace("w_",""));
});
jQuery(".webfx-tree-item_selected").removeClass("webfx-tree-item_selected");
}else{
jQuery(".curSelectedNode").removeClass("curSelectedNode");
}
format("",true);
}else{
jQuery(".e8_li_selected").find(".e8menu_icon_close_select").removeClass("e8menu_icon_close_select").addClass("e8menu_icon_close");
jQuery(".e8_li_selected").find(".e8menu_icon_open_select").removeClass("e8menu_icon_open_select").addClass("e8menu_icon_open");
jQuery(".e8_li_selected").removeClass("e8_li_selected");
format2("",true);
}
/*清除右侧查询条件并重新查询*/
document.getElementById("myFrame").src ="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=all&viewType=2&viewScope=done&complete=2&wftypes=<%=_wftypes %>";
}
</script>
<table cellspacing="0" cellpadding="0" class="flowsTable" >
<tr>
<td class="leftTypeSearch">
<span class="leftType" onclick="WfSearchAll()">
<span><img style="vertical-align:middle;" src="/images/ecology8/request/alltype_wev8.png" width="18"/></span>
<span><%=SystemEnv.getHtmlLabelName(21979,user.getLanguage()) %></span>
</span>
<span class="leftSearchSpan">
&nbsp;<input type="text" class="leftSearchInput" />
</span>
</td>
<td rowspan="2">
<iframe id="myFrame" name="myFrame" src="/workflow/search/wfTabNewFrame.jsp?offical=<%=offical%>&officalType=<%=officalType%>&method=all&viewType=2&viewScope=done&complete=2&wftypes=<%=_wftypes %>" class="flowFrame" frameborder="0" ></iframe>
</td>
</tr>
<tr>
<td style="width:23%;" class="flowMenusTd">
<div class="flowMenuDiv" >
<!--<div class="flowMenuAll"><span class="allText">全部&nbsp;</span></div>-->
<div style="overflow:hidden;height:300px;position:relative;" id="overFlowDiv">
<div class="ulDiv" ></div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,428 @@
<%@page import="weaver.systeminfo.SystemEnv"%>
<%@page import="weaver.hrm.User"%>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<%@ page import="weaver.general.BaseBean" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<%
/*用户验证*/
User user = HrmUserVarify.getUser (request , response) ;
if(user==null) {
return;
}
Enumeration em = request.getParameterNames();
boolean isinit = true;
while(em.hasMoreElements())
{
String paramName = (String)em.nextElement();
if(!paramName.equals(""))
isinit = false;
break;
}
String loadtree = Util.null2String(request.getParameter("loadtree"));
int date2during = Util.getIntValue(request.getParameter("date2during"),0);
String resourceid= Util.null2String(request.getParameter("resourceid"));
String logintype = ""+user.getLogintype();
int usertype = 0;
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?offical="+offical+"&officalType="+officalType+"&fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
if(resourceid.equals("")) {
resourceid = ""+user.getUID();
if(logintype.equals("2")) usertype= 1;
session.removeAttribute("RequestViewResource") ;
}
else {
session.setAttribute("RequestViewResource",resourceid) ;
}
char flag = Util.getSeparator();
String username = Util.toScreen(ResourceComInfo.getResourcename(resourceid),user.getLanguage());
if(logintype.equals("2")) username = Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(""+user.getUID()),user.getLanguage()) ;
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(17991,user.getLanguage()) + ": "+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
int olddate2during = 0;
BaseBean baseBean = new BaseBean();
String date2durings = "";
try
{
date2durings = Util.null2String(baseBean.getPropValue("wfdateduring", "wfdateduring"));
}
catch(Exception e)
{}
String[] date2duringTokens = Util.TokenizerString2(date2durings,",");
if(date2duringTokens.length>0)
{
olddate2during = Util.getIntValue(date2duringTokens[0],0);
}
if(olddate2during<0||olddate2during>36)
{
olddate2during = 0;
}
if(isinit)
{
date2during = olddate2during;
}
%>
<%
String typeid="";
String typecount="";
String typename="";
String workflowid="";
String workflowcount="";
String newremarkwfcount0="";
String newremarkwfcount="";
String workflowname="";
ArrayList wftypes=new ArrayList();
ArrayList wftypecounts=new ArrayList();
ArrayList workflows=new ArrayList();
ArrayList workflowcounts=new ArrayList();//反馈
ArrayList newremarkwfcount0s=new ArrayList();//未读
ArrayList newremarkwfcounts=new ArrayList();
int totalcount=0;
String _wftypes = "";
String demoLeftMenus = "";
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select workflowtype, ");
sqlsb.append(" workflowid, ");
sqlsb.append(" viewtype, ");
sqlsb.append(" count(distinct requestid) workflowcount ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where (isremark in('2','4') or (isremark=0 and takisremark =-2)) ");
sqlsb.append(" and islasttimes = 1 ");
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype).append(WorkflowComInfo.getDateDuringSql(date2during));
sqlsb.append(" and exists ");
sqlsb.append(" (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = workflow_currentoperator.workflowid ");
sqlsb.append(" and c.requestid = workflow_currentoperator.requestid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
if(offical.equals("1")){
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
sqlsb.append(" group by workflowtype, workflowid, viewtype ");
sqlsb.append(" order by workflowtype, workflowid");
//RecordSet.executeSql("select workflowtype, workflowid, viewtype, count(distinct requestid) workflowcount from workflow_currentoperator where isremark='2' and iscomplete=0 and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" group by workflowtype, workflowid, viewtype order by workflowtype, workflowid " ) ;
RecordSet.executeSql(sqlsb.toString()) ;
//System.out.println(sqlsb.toString());
while(RecordSet.next()){
String theworkflowid = Util.null2String(RecordSet.getString("workflowid")) ;
String theworkflowtype = Util.null2String(RecordSet.getString("workflowtype")) ;
int theworkflowcount = Util.getIntValue(RecordSet.getString("workflowcount"),0) ;
int viewtype = Util.getIntValue(RecordSet.getString("viewtype"),-2) ;
theworkflowid = WorkflowVersion.getActiveVersionWFID(theworkflowid);
if(WorkflowComInfo.getIsValid(theworkflowid).equals("1")){
/* added by wdl 2006-06-14 left menu advanced menu */
if(selectedworkflow.indexOf("T"+theworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+theworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
/* added end */
int wfindex = workflows.indexOf(theworkflowid) ;
if(wfindex != -1) {
workflowcounts.set(wfindex,""+(Util.getIntValue((String)workflowcounts.get(wfindex),0)+theworkflowcount)) ;
if(viewtype==-1){
newremarkwfcounts.set(wfindex,""+(Util.getIntValue((String)newremarkwfcounts.get(wfindex),0)+theworkflowcount)) ;
}
}else{
workflows.add(theworkflowid) ;
workflowcounts.add(""+theworkflowcount) ;
if(viewtype==-1){
newremarkwfcounts.add(""+theworkflowcount);
newremarkwfcount0s.add(""+0);
}else{
newremarkwfcounts.add(""+0);
newremarkwfcount0s.add(""+0);
}
}
int wftindex = wftypes.indexOf(theworkflowtype) ;
if(wftindex != -1) {
wftypecounts.set(wftindex,""+(Util.getIntValue((String)wftypecounts.get(wftindex),0)+theworkflowcount)) ;
}
else {
wftypes.add(theworkflowtype) ;
wftypecounts.add(""+theworkflowcount) ;
}
totalcount += theworkflowcount;
}
}
sqlsb = new StringBuffer();
sqlsb.append("select workflowtype, ");
sqlsb.append(" workflowid, ");
sqlsb.append(" viewtype, ");
sqlsb.append(" count(distinct requestid) workflowcount ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where (isremark in('2','4') or (isremark=0 and takisremark =-2)) ");
//sqlsb.append(" and iscomplete = 0 ");
sqlsb.append(" and islasttimes = 1 ");
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
sqlsb.append(" and viewtype = 0 ");
sqlsb.append(" and (agentType <> '1' or agentType is null) ").append(WorkflowComInfo.getDateDuringSql(date2during));
sqlsb.append(" and exists (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = workflow_currentoperator.workflowid ");
sqlsb.append(" and c.requestid = workflow_currentoperator.requestid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
if(offical.equals("1")){
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and isvalid=1)");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and isvalid=1)");
}
}
sqlsb.append(" group by workflowtype, workflowid, viewtype ");
sqlsb.append(" order by workflowtype, workflowid");
//System.out.println("sqlsb====>:"+sqlsb.toString());
//已办/办结事宜红色new标记
//RecordSet.executeSql("select workflowtype, workflowid, viewtype, count(distinct requestid) workflowcount from workflow_currentoperator where isremark='2' and iscomplete=0 and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and viewtype=0 and (agentType<>'1' or agentType is null) group by workflowtype, workflowid, viewtype order by workflowtype, workflowid " ) ;
RecordSet.executeSql(sqlsb.toString()) ;
while(RecordSet.next()){
String theworkflowid = Util.null2String(RecordSet.getString("workflowid")) ;
String theworkflowtype = Util.null2String(RecordSet.getString("workflowtype")) ;
int theworkflowcount = Util.getIntValue(RecordSet.getString("workflowcount"),0) ;
int viewtype = Util.getIntValue(RecordSet.getString("viewtype"),-2) ;
if(WorkflowComInfo.getIsValid(theworkflowid).equals("1")){
/* added by wdl 2006-06-14 left menu advanced menu */
if(selectedworkflow.indexOf("T"+theworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+theworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
/* added end */
int wfindex = workflows.indexOf(theworkflowid) ;
if(wfindex != -1) {
newremarkwfcount0s.set(wfindex,""+(Util.getIntValue((String)newremarkwfcount0s.get(wfindex),0)+theworkflowcount)) ;
}
}
}
/*******************************/
demoLeftMenus="[";
for(int i=0;i<wftypes.size();i++){
typeid=(String)wftypes.get(i);
typecount=(String)wftypecounts.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
demoLeftMenus+="{";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
List<Map> maps=new ArrayList(0);
int flowNew=0;
int flowResponse=0;
int flowAll=0;
for(int j=0;j<workflows.size();j++){
workflowid=(String)workflows.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)){
continue;
}
workflowcount=(String)workflowcounts.get(j);
newremarkwfcount0=(String)newremarkwfcount0s.get(j);
newremarkwfcount=(String)newremarkwfcounts.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
Map map=new HashMap();
map.put("name",Util.toScreen(workflowname,user.getLanguage()));
map.put("workflowid",workflowid);
map.put("flowResponse",Util.toScreen(newremarkwfcount,user.getLanguage()));//
map.put("flowNew",newremarkwfcount0);
map.put("flowAll",Util.toScreen(workflowcount,user.getLanguage()));//
flowNew+=Integer.valueOf(newremarkwfcount0);
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowAll+=Integer.valueOf(Util.toScreen(workflowcount,user.getLanguage()));
maps.add(map);
}
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowNew\":"+flowNew+",";
demoLeftMenus+="\"flowResponse\":"+flowResponse+",";
demoLeftMenus+="\"flowAll\":"+flowAll;
demoLeftMenus+="}";
demoLeftMenus+="}";
if (maps.size() > 0) {
demoLeftMenus += ",";
}
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowAll+=Integer.valueOf(map.get("flowAll")+"");
demoLeftMenus+="{";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus+="\"numbers\":{";
demoLeftMenus+="\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus+="\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus+="\"flowAll\":"+map.get("flowAll");
demoLeftMenus+="}";
demoLeftMenus+="}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
// demoLeftMenus+="],";
if (i < wftypes.size() - 1) {
demoLeftMenus += ",";
}
}
RecordSet rs = new RecordSet();
RecordSet rs1 = new RecordSet();
//EAS流程类型查询里列表
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select a.FCategoryID,a.FCategory,a.FCategorySeq,(select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' AND FWorkFlowID in (SELECT fworkflowid FROM "+eas_workflowinfo+" WHERE FCategoryID=a.FCategoryID) and FState=''16'') from "+eas_workflowinfo+" a group by a.FCategoryID,a.FCategory,a.FCategorySeq order by a.FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
int wfcountall = 0 ;
while(rs.next()){
String _typeid = rs.getString(1);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",";
}
wfcountall = rs.getInt(4);
demoLeftMenus += "{";
demoLeftMenus+=" \"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+"";
demoLeftMenus += "}";
demoLeftMenus += "},";
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String fworkflowid = Util.null2String(RecordSet.getString("fworkflowid"));
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' AND FWorkFlowID=''"+fworkflowid+"'' and FState=''16'' ') ");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
//if(wfcount>0){
demoLeftMenus += "{";
//demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
//demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+"";
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += ",";
//}
}
if(demoLeftMenus.endsWith(",")){
demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
}
//demoLeftMenus += ",";
}
demoLeftMenus += "]";
//out.clear();
out.print(demoLeftMenus);
//System.out.print(demoLeftMenus);
/*******************************/
%>

View File

@ -0,0 +1,751 @@
<%@ page import="weaver.general.Util,java.net.*,weaver.workflow.field.FieldComInfo"%>
<%@ page import="java.util.*" %>
<%@ page import="weaver.WorkPlan.WorkPlanLogMan" %>
<%@ page import="weaver.workflow.request.RequestManager" %>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@page import="weaver.hrm.User"%>
<%@page import="weaver.systeminfo.SystemEnv"%>
<%@page import="weaver.general.GCONST"%>
<jsp:useBean id="RequestManager" class="weaver.workflow.request.RequestManager" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="RecordSet1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs2" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs_1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="PoppupRemindInfoUtil" class="weaver.workflow.msg.PoppupRemindInfoUtil" scope="page" />
<jsp:useBean id="DocManager" class="weaver.docs.docs.DocManager" scope="page" />
<jsp:useBean id="WorkPlanViewer" class="weaver.WorkPlan.WorkPlanViewer" scope="page"/>
<jsp:useBean id="WFLinkInfo" class="weaver.workflow.request.WFLinkInfo" scope="page"/>
<jsp:useBean id="Requestlog" class="weaver.workflow.request.RequestLog" scope="page"/>
<jsp:useBean id="basebean" class="weaver.general.BaseBean" scope="page" />
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%
/*用户验证*/
User user = HrmUserVarify.getUser (request , response) ;
if(user==null) {
response.sendRedirect("/login/Login.jsp");
return;
}
// 操作的用户信息
int userid=user.getUID(); //当前用户id
int usertype = 0; //用户在工作流表中的类型 0: 内部 1: 外部
String logintype = user.getLogintype(); //当前用户类型 1: 类别用户 2:外部用户
String username = "";
if(logintype.equals("1"))
username = Util.toScreen(ResourceComInfo.getResourcename(""+userid),user.getLanguage()) ;
if(logintype.equals("2"))
username = Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(""+userid),user.getLanguage());
String dateSql = "";
if(rs.getDBType().equalsIgnoreCase("oracle")){
dateSql = "select to_char(sysdate,'yyyy-mm-dd') as currentdate, to_char(sysdate,'hh24:mi:ss') as currenttime from dual";
}else{
dateSql = "select convert(char(10),getdate(),20) as currentdate, convert(char(8),getdate(),108) as currenttime";
}
String currentdate = "";
String currenttime = "";
rs.execute(dateSql);
if(rs.next()){
currentdate = Util.null2String(rs.getString(1));
currenttime = Util.null2String(rs.getString(2));
}else{
Calendar today = Calendar.getInstance();
currentdate = Util.add0(today.get(Calendar.YEAR), 4) + "-" +
Util.add0(today.get(Calendar.MONTH) + 1, 2) + "-" +
Util.add0(today.get(Calendar.DAY_OF_MONTH), 2) ;
currenttime = Util.add0(today.get(Calendar.HOUR_OF_DAY), 2) + ":" +
Util.add0(today.get(Calendar.MINUTE), 2) + ":" +
Util.add0(today.get(Calendar.SECOND), 2) ;
}
String src = "submit";
String iscreate = "0";
int isremark = 0;
//添加支持批注内容从前台传递
String remark = Util.null2String(request.getParameter("remark"));
if(remark.equals("")) remark = "\n"+username+" "+currentdate+" "+currenttime;
String workflowtype = "";
int formid = -1;
int isbill = -1;
int billid = -1;
String messageType = "";
int nodeid = -1;
String nodetype = "";
String requestname = "";
String requestlevel = "";
//modify by xhheng @20050524 for TD 2023
String requestidlist=Util.null2String(request.getParameter("multiSubIds"));
String easrequestidlist = Util.null2String(request.getParameter("EASmultiSubIds"));
String wfid = Util.null2String(request.getParameter("workflowid"));
String wftypes = "";
String method = Util.null2String(request.getParameter("method"));
String wftype=Util.null2String(request.getParameter("wftype"));
int flowAll=Util.getIntValue(Util.null2String(request.getParameter("flowAll")), 0);
int flowNew=Util.getIntValue(Util.null2String(request.getParameter("flowNew")), 0);
String viewcondition = Util.null2String(request.getParameter("viewcondition"));
////System.out.println("RequestListOperation.jsp:===>>>>requestidlist:"+requestidlist);
String [] requestids=Util.TokenizerString2(requestidlist,",");
for (int i=0; i<requestids.length; i++){
//Date d1 = new Date();
//System.out.println("1:流程" + i + "开始执行,初始时间:" + d1.getTime());
RequestManager = new RequestManager();
int requestid = Util.getIntValue(requestids[i],-1) ;
/*----------xwj for td3098 20051202 begin -----*/
src = "submit";
isremark = 0;
RecordSet.executeSql("select min(isremark) from workflow_currentoperator where requestid = " + requestid + " and userid = "+user.getUID());
if(RecordSet.next()){
int isremarkCheck = RecordSet.getInt(1);
if(isremarkCheck==1){
src = "save";
isremark = 1;
}
}
RecordSet.executeSql("select isremark,isreminded,preisremark,id,groupdetailid,nodeid,(CASE WHEN isremark=9 THEN '7.5' ELSE isremark END) orderisremark from workflow_currentoperator where requestid="+requestid+" and userid="+userid+" and usertype="+usertype+" order by orderisremark,id ");
boolean istoManagePage=false; //add by xhheng @20041217 for TD 1438
while(RecordSet.next()) {
String t_isremark = Util.null2String(RecordSet.getString("isremark")) ;
int tmpnodeid=Util.getIntValue(RecordSet.getString("nodeid"));
//modify by mackjoe at 2005-09-29 td1772 转发特殊处理,转发信息本人未处理一直需要处理即使流程已归档
if( t_isremark.equals("1")||t_isremark.equals("5") || t_isremark.equals("7")|| t_isremark.equals("9") ||(t_isremark.equals("0") && !nodetype.equals("3")) ) {
//modify by xhheng @20041217 for TD 1438
if (t_isremark.equals("9")) {
isremark = 9;
}
break;
}
}
//判断当前流程是否还为当前操作者的待办事宜
//判断当前流程是否还为当前操作者的待办事宜
if(RecordSet.getDBType().equals("sqlserver")){
RecordSet.executeSql("select t1.requestid from workflow_requestbase t1, workflow_currentoperator t2 " +
"where t1.requestid = t2.requestid and t2.userid = "+user.getUID()+" and t2.usertype = 0 and (isnull(t1.currentstatus, -1) = -1 or (isnull(t1.currentstatus, -1) = 0 and t1.creater = "+user.getUID()+")) "+
"and t2.isremark in ('0', '1', '5', '8', '9', '7') and t2.islasttimes = 1 and t1.requestid = " + requestid);
if(!RecordSet.next()){
continue;
}
}else{
RecordSet.executeSql("select t1.requestid from workflow_requestbase t1, workflow_currentoperator t2 " +
"where t1.requestid = t2.requestid and t2.userid = "+user.getUID()+" and t2.usertype = 0 and (nvl(t1.currentstatus, -1) = -1 or (nvl(t1.currentstatus, -1) = 0 and t1.creater = "+user.getUID()+")) "+
"and t2.isremark in ('0', '1', '5', '8', '9', '7') and t2.islasttimes = 1 and t1.requestid = " + requestid);
if(!RecordSet.next()){
continue;
}
}
//System.out.println("2:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
/*----------xwj for td3098 20051202 end -----*/
int workflowid=-1;
if(requestid!=-1 ){
boolean isStart = false;
RecordSet.executeSql("select currentnodeid,currentnodetype,requestname,requestlevel,workflowid,status from workflow_requestbase where requestid="+requestid);
if(RecordSet.next()){
requestname = RecordSet.getString("requestname");
requestlevel = RecordSet.getString("requestlevel");
workflowid = RecordSet.getInt("workflowid");
isStart = (RecordSet.getString("status")!=null && !"".equals(RecordSet.getString("status")));
}
//System.out.println("3:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
nodeid=WFLinkInfo.getCurrentNodeid(requestid,userid,Util.getIntValue(logintype,1)); //节点id
nodetype=WFLinkInfo.getNodeType(nodeid); //节点类型 0:创建 1:审批 2:实现 3:归档
boolean isTrack = true;
RecordSet.executeSql("select workflowtype,formid,isbill,messageType,isModifyLog from workflow_base where id="+workflowid);
if(RecordSet.next()){
workflowtype = RecordSet.getString("workflowtype");
formid = RecordSet.getInt("formid");
isbill = RecordSet.getInt("isbill");
//billid = RecordSet.getInt("formid");
messageType = RecordSet.getString("messageType");
isTrack = (RecordSet.getString("ismodifylog")!=null && "1".equals(RecordSet.getString("ismodifylog")));
}
//System.out.println("4:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
if(isbill == 1){
RecordSet.execute("select tablename from workflow_bill where id="+formid);
if(RecordSet.next()){
String tablename = Util.null2String(RecordSet.getString(1));
if(!"".equals(tablename)){
RecordSet.execute("select id from "+tablename+" where requestid="+requestid);
if(RecordSet.next()){
billid = RecordSet.getInt("id");
}
}else{
continue;
}
}
}
//System.out.println("5:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
if( src.equals("") || workflowid == -1 || formid == -1 || isbill == -1 || nodeid == -1 || nodetype.equals("") ) {
response.sendRedirect("/notice/RequestError.jsp");
return ;
}
if (isremark == 9) {
char flag = Util.getSeparator();
RecordSet.executeProc("workflow_CurOpe_UbySendNB", "" + requestid + flag + userid + flag + usertype+flag+isremark);
String isfeedback="";
String isnullnotfeedback="";
RecordSet.executeSql("select isfeedback,isnullnotfeedback from workflow_flownode where workflowid="+workflowid+" and nodeid="+nodeid);
if(RecordSet.next()){
isfeedback=Util.null2String(RecordSet.getString("isfeedback"));
isnullnotfeedback=Util.null2String(RecordSet.getString("isnullnotfeedback"));
}
String ifchangstatus=Util.null2String(basebean.getPropValue(GCONST.getConfigFile() , "ecology.changestatus"));
if (!ifchangstatus.equals("")&&isfeedback.equals("1")&&((isnullnotfeedback.equals("1")&&!Util.replace(remark, "\\<script\\>initFlashVideo\\(\\)\\;\\<\\/script\\>", "", 0, false).equals(""))||!isnullnotfeedback.equals("1"))){
RecordSet.executeSql("update workflow_currentoperator set viewtype =-1 where needwfback='1' and requestid=" + requestid + " and userid<>" + userid + " and viewtype=-2");
}
String curnodetype = "";
RecordSet.executeSql("select currentnodetype from workflow_Requestbase where requestid="+requestid);
if(RecordSet.next()) curnodetype = Util.null2String(RecordSet.getString(1));
if(curnodetype.equals("3"))//归档流程转发后,转发人或抄送人提交后到办结事宜。
RecordSet.executeSql("update workflow_currentoperator set iscomplete=1 where userid="+userid+" and usertype="+usertype+" and requestid="+requestid);
//Requestlog.setRequest(fu) ;
Requestlog.saveLog(workflowid,requestid,nodeid,"9",remark,user) ;
continue;
}
int requestKey = 0;
RecordSet.executeSql("select id from workflow_currentoperator where requestid="+requestid+" and nodeid='"+nodeid+"' and userid="+userid+" and usertype="+usertype+" order by isremark,id");
if(RecordSet.next()){
requestKey = RecordSet.getInt("id");
}
//System.out.println("6:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
RequestManager.setSrc(src) ;
RequestManager.setIscreate(iscreate) ;
RequestManager.setRequestid(requestid) ;
RequestManager.setWorkflowid(workflowid) ;
RequestManager.setWorkflowtype(workflowtype) ;
RequestManager.setIsremark(isremark) ;
RequestManager.setFormid(formid) ;
RequestManager.setIsbill(isbill) ;
RequestManager.setBillid(billid) ;
RequestManager.setNodeid(nodeid) ;
RequestManager.setNodetype(nodetype) ;
RequestManager.setRequestname(requestname) ;
RequestManager.setRequestlevel(requestlevel) ;
RequestManager.setRemark(remark) ;
RequestManager.setRequest(request) ;
RequestManager.setMessageType(messageType) ;
RequestManager.setUser(user) ;
RequestManager.setRequestKey(requestKey);
/**Start 批量提交时也必须做节点附加操作 by alan on 2009-04-23**/
if(!src.equals("save")){
try {
//由于objtype为"1: 节点自动赋值",不为"0 :出口自动赋值"不用改变除状态外的文档相关信息故可不用给user、clienIp、src赋值 fanggsh TD5121
weaver.workflow.request.RequestCheckAddinRules requestCheckAddinRules = new weaver.workflow.request.RequestCheckAddinRules();
requestCheckAddinRules.resetParameter();
//add by cyril on 2008-07-28 for td:8835 事务无法开启查询,只能传入
requestCheckAddinRules.setTrack(isTrack);
requestCheckAddinRules.setStart(isStart);
requestCheckAddinRules.setNodeid(nodeid);
//end by cyril on 2008-07-28 for td:8835
requestCheckAddinRules.setRequestid(requestid);
requestCheckAddinRules.setWorkflowid(workflowid);
requestCheckAddinRules.setObjid(nodeid);
requestCheckAddinRules.setObjtype(1); // 1: 节点自动赋值 0 :出口自动赋值
requestCheckAddinRules.setIsbill(isbill);
requestCheckAddinRules.setFormid(formid);
requestCheckAddinRules.setIspreadd("0");//xwj for td3130 20051123
requestCheckAddinRules.setRequestManager(RequestManager);
requestCheckAddinRules.setUser(user);
requestCheckAddinRules.checkAddinRules();
} catch (Exception e) {
response.sendRedirect("/notice/RequestError.jsp");
return ;
}
}
//System.out.println("7:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
/**End 批量提交时也必须做节点附加操作 by alan on 2009-04-23**/
//TD10974 处理流程批量提交的时候,文档、客户、资产、项目无法附权下一节点操作者的问题 Start
int docRightByOperator=0;
rs.execute("select docRightByOperator from workflow_base where id="+workflowid);
if(rs.next()){
docRightByOperator=Util.getIntValue(rs.getString("docRightByOperator"),0);
}
String maintable = "workflow_form";
if (isbill == 1) {
rs.execute("select tablename from workflow_bill where id = " + formid);
if(rs.next()){
maintable = Util.null2String(rs.getString("tablename"));
}
rs.executeProc("workflow_billfield_Select", formid + "");
} else {
rs.executeSql("select t2.fieldid,t2.fieldorder,t2.isdetail,t1.fieldlable,t1.langurageid from workflow_fieldlable t1,workflow_formfield t2 where t1.formid=t2.formid and t1.fieldid=t2.fieldid and (t2.isdetail<>'1' or t2.isdetail is null) and t2.formid="+formid+" and t1.langurageid="+user.getLanguage()+" order by t2.fieldorder");
}
//System.out.println("8:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
ArrayList fieldidList = new ArrayList();
ArrayList fieldnameList = new ArrayList();
ArrayList fielddbtypeList = new ArrayList();
ArrayList fieldhtmltypeList = new ArrayList();
ArrayList fieldtypeList = new ArrayList();
String fieldnames = "";
String fieldid = "";
String fieldname = "";
String fielddbtype = "";
String fieldhtmltype = "";
String fieldtype = "";
FieldComInfo fieldComInfo = new FieldComInfo();
String hrmids = "";
String crmids = "";
String prjids = "";
String docids = "";
String cptids = "";
boolean hasmanager=false;
char separarorFlag = Util.getSeparator();
while (rs.next()) {
if (isbill == 1) {
String viewtype = Util.null2String(rs.getString("viewtype")); // 如果是单据的从表字段,不进行操作
if (viewtype.equals("1")) continue;
fieldid = Util.null2String(rs.getString("id"));
fieldname = Util.null2String(rs.getString("fieldname"));
fielddbtype = Util.null2String(rs.getString("fielddbtype"));
fieldhtmltype = Util.null2String(rs.getString("fieldhtmltype"));
fieldtype = Util.null2String(rs.getString("type"));
} else {
fieldid = Util.null2String(rs.getString(1));
fieldname = Util.null2String(fieldComInfo.getFieldname(fieldid));
fielddbtype = Util.null2String(fieldComInfo.getFielddbtype(fieldid));
fieldhtmltype = Util.null2String(fieldComInfo.getFieldhtmltype(fieldid));
fieldtype = Util.null2String(fieldComInfo.getFieldType(fieldid));
}
if(fieldname.toLowerCase().equals("manager")){
hasmanager=true;
}
fieldidList.add(fieldid);
fieldnameList.add(fieldname);
fielddbtypeList.add(fielddbtype);
fieldhtmltypeList.add(fieldhtmltype);
fieldtypeList.add(fieldtype);
fieldnames = fieldnames + fieldname + ",";
}
//System.out.println("9:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
if(hasmanager){
String beagenter=""+userid;
//获得被代理人
RecordSet.executeSql("select agentorbyagentid from workflow_currentoperator where usertype=0 and isremark='0' and requestid="+requestid+" and userid="+userid+" and nodeid="+nodeid+" order by id desc");
if(RecordSet.next()){
int tembeagenter=RecordSet.getInt(1);
if(tembeagenter>0) beagenter=""+tembeagenter;
}
String tmpmanagerid = ResourceComInfo.getManagerID(beagenter);
rs2.executeSql("update " + maintable + " set manager="+tmpmanagerid+" where requestid=" + requestid);
}
if(fieldnames.length() > 0){
fieldnames = fieldnames.substring(0, fieldnames.length()-1);
rs2.execute("select " + fieldnames + " from " + maintable + " where requestid=" + requestid);
if(rs2.next()){
for(int j=0; j<fieldidList.size(); j++){
fieldid = Util.null2String((String)fieldidList.get(j));
fieldname = Util.null2String((String)fieldnameList.get(j));
fielddbtype = Util.null2String((String)fielddbtypeList.get(j));
fieldhtmltype = Util.null2String((String)fieldhtmltypeList.get(j));
fieldtype = Util.null2String((String)fieldtypeList.get(j));
if (fieldhtmltype.equals("3") && (fieldtype.equals("1") || fieldtype.equals("17"))) { // 人力资源字段
String tempvalueid="";
tempvalueid = Util.null2String(rs2.getString(fieldname));
if (!tempvalueid.equals("")) hrmids += "," + tempvalueid;
} else if (fieldhtmltype.equals("3") && (fieldtype.equals("7") || fieldtype.equals("18"))) { // 客户字段
String tempvalueid ="";
tempvalueid = Util.null2String(rs2.getString(fieldname));
if (!tempvalueid.equals("")) crmids += "," + tempvalueid;
} else if (fieldhtmltype.equals("3") && (fieldtype.equals("8")|| fieldtype.equals("135"))) { // 项目字段
String tempvalueid ="";
tempvalueid = Util.null2String(rs2.getString(fieldname));
if (!tempvalueid.equals("")) prjids += "," + tempvalueid;
} else if (fieldhtmltype.equals("3") && (fieldtype.equals("9") || fieldtype.equals("37"))) { // 文档字段
String tempvalueid ="";
tempvalueid = Util.null2String(rs2.getString(fieldname));
if (!tempvalueid.equals("")) docids += "," + tempvalueid;
//跟随文档关联人赋权
if(docRightByOperator==1){
//在Workflow_DocSource表中删除当前字段被删除的文档
if (!tempvalueid.equals("")){
rs1.execute("delete from Workflow_DocSource where requestid =" + requestid + " and fieldid =" + fieldid + " and docid not in (" + tempvalueid + ")");
}else{
rs1.execute("delete from Workflow_DocSource where requestid =" + requestid + " and fieldid =" + fieldid);
}
//在Workflow_DocSource表中添加当前字段新增加的文档
String[] mdocid=Util.TokenizerString2(tempvalueid,",");
for(int cx=0;cx<mdocid.length; cx++){
if(mdocid[cx]!=null && !mdocid[cx].equals("")){
rs1.executeProc("Workflow_DocSource_Insert",""+requestid + separarorFlag + nodeid + separarorFlag + fieldid + separarorFlag + mdocid[cx] + separarorFlag + userid + separarorFlag + "1");//由于usertype不一致这里的usertype直接指定为1只处理内部用户
}
}
}
} else if (fieldhtmltype.equals("3") && fieldtype.equals("23")) { // 资产字段
String tempvalueid ="";
tempvalueid = Util.null2String(rs2.getString(fieldname));
if (!tempvalueid.equals("")) cptids += "," + tempvalueid;
}
}
if (!hrmids.equals("")) hrmids = hrmids.substring(1);
if (!crmids.equals("")) crmids = crmids.substring(1);
if (!prjids.equals("")) prjids = prjids.substring(1);
if (!docids.equals("")) docids = docids.substring(1);
if (!cptids.equals("")) cptids = cptids.substring(1);
RequestManager.setHrmids(hrmids);
RequestManager.setCrmids(crmids);
RequestManager.setPrjids(prjids);
RequestManager.setDocids(docids);
RequestManager.setCptids(cptids);
}
}
//TD10974 End
//System.out.println("10:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
boolean flowstatus = RequestManager.flowNextNode() ;
//System.out.println("11:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
if (flowstatus) {
//added by mackjoe at 2007-01-10 TD5567
//增加文档,项目,客户批量审批处理
if (RequestManager.getNextNodetype().equals("3") && isbill == 1) {
//文档
if (formid == 28) {
RecordSet.executeSql("update bill_Approve set status='1' where requestid=" + requestid);
RecordSet.executeSql("select approveid from bill_Approve where requestid=" + requestid);
if(RecordSet.next()){
String approveid=Util.null2String(RecordSet.getString("approveid"));
int intapproveid=Util.getIntValue(approveid,0);
RecordSet.executeSql("select max(b.id) from DocDetail a,DocDetail b where a.docEditionId=b.docEditionId and a.docEditionId>0 and a.id="+intapproveid);
if(RecordSet.next()){
intapproveid=Util.getIntValue(RecordSet.getString(1),intapproveid);
if(intapproveid>0){
approveid=""+intapproveid;
}
}
DocManager.approveDocFromWF("approve", approveid, currentdate, currenttime, userid + "");
}
}
//项目
if (formid == 74) {
RecordSet.executeSql("select approveid from Bill_ApproveProj where requestid=" + requestid);
if(RecordSet.next()){
char flag = 2 ;
String approveid=RecordSet.getString("approveid");
RecordSet.executeProc("Prj_Plan_Approve",approveid);
String tmpsql="update prj_taskprocess set isactived=2 where prjid="+approveid ;
RecordSet.executeSql(tmpsql);
tmpsql = "update Prj_ProjectInfo set status = 5 where id = "+ approveid;
RecordSet.executeSql(tmpsql);
//更新工作计划中该项目的经理的时间Begin
String begindate01 = "";
String enddate01 = "";
RecordSet.executeProc("Prj_TaskProcess_Sum",""+approveid);
if(RecordSet.next() && !RecordSet.getString("workday").equals("")){
if(!RecordSet.getString("begindate").equals("x")) begindate01 = RecordSet.getString("begindate");
if(!RecordSet.getString("enddate").equals("-")) enddate01 = RecordSet.getString("enddate");
}
if (!begindate01.equals("")){
RecordSet.executeSql("update workplan set status = '0',begindate = '" + begindate01 + "',enddate = '" + enddate01 + "' where type_n = '2' and projectid = '" + approveid + "' and taskid = -1");
}
//更新工作计划中该项目的经理的时间End
//添加工作计划Begin
String para = "";
String workid = "";
String manager="";
String TaskID="";
RecordSet.executeProc("Prj_ProjectInfo_SelectByID",approveid);
if (RecordSet.next()){
manager=RecordSet.getString("manager");
}
tmpsql = "SELECT * FROM Prj_TaskProcess WHERE prjid = " + approveid + " and isdelete<>'1' order by id";
RecordSet.executeSql(tmpsql);
while (RecordSet.next()) {
TaskID = RecordSet.getString("id");
para = "2"; //type_n
para +=flag+Util.toScreen(RecordSet.getString("subject"),user.getLanguage());
para +=flag+Util.toScreen(RecordSet.getString("hrmid"),user.getLanguage());
para +=flag+Util.toScreen(RecordSet.getString("begindate"),user.getLanguage());
para +=flag+""; //BeginTime
para +=flag+Util.toScreen(RecordSet.getString("enddate"),user.getLanguage());
para +=flag+""; //EndTime
para +=flag+Util.toScreen(RecordSet.getString("content"),user.getLanguage());
para +=flag+"0";//requestid
para +=flag+approveid;//projectid
para +=flag+"0";//crmid
para +=flag+"0";//docid
para +=flag+"0";//meetingid
para +=flag+"0";//status;
para +=flag+"1";//isremind;
para +=flag+"0";//waketime;
para +=flag+manager;//createid;
para +=flag+currentdate;
para +=flag+currenttime;
para +=flag+"0";
para += flag + "0"; //taskid
para += flag + "1"; //urgent level
para += flag + "0"; //agentId level
RecordSet1.executeProc("WorkPlan_Insert",para);
if (RecordSet1.next()) workid = RecordSet1.getString("id");
//write "add" of view log
String[] logParams = new String[] {workid,
WorkPlanLogMan.TP_CREATE,
String.valueOf(userid),
request.getRemoteAddr()};
WorkPlanLogMan logMan = new WorkPlanLogMan();
logMan.writeViewLog(logParams);
//end
RecordSet1.executeSql("update workplan set taskid = " + TaskID + " where id =" + workid);
WorkPlanViewer.setWorkPlanShareById(workid);
}
//添加工作计划End
}
}
//客户
if (formid == 79) {
String sql= "select approveid,approvevalue,approvetype from bill_ApproveCustomer where requestid="+requestid;
RecordSet.executeSql(sql);
String approveid="";
String approvetype="";
String approvevalue="";
if(RecordSet.next()){
approveid=RecordSet.getString("approveid");
approvetype=RecordSet.getString("approvetype");
approvevalue = RecordSet.getString("approvevalue");
}
//更改单据的状态1已经归档
RecordSet.executeSql("update bill_ApproveCustomer set status=1 where requestid="+requestid);
RecordSet.executeProc("CRM_CustomerInfo_SelectByID",approveid);
RecordSet.first();
String statusTemp = RecordSet.getString("status");
String Manager2 = RecordSet.getString("manager");
String name = RecordSet.getString("name");
String ProcPara="";
char flag = 2 ;
String fieldName="";
if(approvetype.equals("1")){
ProcPara = approveid;
ProcPara += flag+approvevalue;
ProcPara += flag+"1";
RecordSet.executeProc("CRM_CustomerInfo_Approve",ProcPara);
ProcPara = approveid;
ProcPara += flag+"a";
ProcPara += flag+"0";
ProcPara += flag+"a";
ProcPara += flag+currentdate;
ProcPara += flag+currenttime;
ProcPara += flag+""+user.getUID();
ProcPara += flag+""+user.getLogintype();
ProcPara += flag+request.getRemoteAddr();
RecordSet.executeProc("CRM_Log_Insert",ProcPara);
fieldName = SystemEnv.getHtmlLabelName(23247,user.getLanguage());
ProcPara = approveid+flag+"1"+flag+"0"+flag+"0";
ProcPara += flag+fieldName+flag+currentdate+flag+currenttime+flag+statusTemp+flag+approvevalue;
ProcPara += flag+""+user.getUID()+flag+""+user.getLogintype()+flag+request.getRemoteAddr();
RecordSet.executeProc("CRM_Modify_Insert",ProcPara);
}else if(approvetype.equals("2")){
ProcPara = approveid;
ProcPara += flag+approvevalue;
RecordSet.executeProc("CRM_CustomerInfo_Portal",ProcPara);
String PortalLoginid = "";
String PortalPassword = "";
if(approvevalue.equals("2")){
if (approveid.length()<5){
PortalLoginid = "U" + Util.add0(Util.getIntValue(approveid),5);
}else{
PortalLoginid = "U" + approveid;
}
PortalPassword = Util.getPortalPassword();
ProcPara = approveid;
ProcPara += flag+PortalLoginid;
ProcPara += flag+PortalPassword;
RecordSet.executeProc("CRM_CustomerInfo_PortalPasswor",ProcPara);
}
ProcPara = approveid;
ProcPara += flag+"p";
ProcPara += flag+"0";
ProcPara += flag+"p";
ProcPara += flag+currentdate;
ProcPara += flag+currenttime;
ProcPara += flag+""+user.getUID();
ProcPara += flag+""+user.getLogintype();
ProcPara += flag+request.getRemoteAddr();
RecordSet.executeProc("CRM_Log_Insert",ProcPara);
fieldName = SystemEnv.getHtmlLabelName(23249,user.getLanguage());
ProcPara = approveid+flag+"1"+flag+"0"+flag+"0";
ProcPara += flag+fieldName+flag+currentdate+flag+currenttime+flag+statusTemp+flag+approvevalue;
ProcPara += flag+""+user.getUID()+flag+""+user.getLogintype()+flag+request.getRemoteAddr();
RecordSet.executeProc("CRM_Modify_Insert",ProcPara);
}else if(approvetype.equals("3")){
String PortalLoginid = "";
String PortalPassword = "";
if(approvevalue.equals("2")){
if (approveid.length()<5){
PortalLoginid = "U" + Util.add0(Util.getIntValue(approveid),5);
}else{
PortalLoginid = "U" + approveid;
}
PortalPassword = Util.getPortalPassword();
ProcPara = approveid;
ProcPara += flag+PortalLoginid;
ProcPara += flag+PortalPassword;
RecordSet.executeProc("CRM_CustomerInfo_PortalPasswor",ProcPara);
}
}
}
}
PoppupRemindInfoUtil.updatePoppupRemindInfo(userid, 0, (logintype).equals("1") ? "0" : "1", requestid); //add by sean for td3999
int takisremark = -1;
int handleforwardid = -1;
String zsql = "select * from workflow_currentoperator where requestid= "+ requestid + "and nodeid = "+ nodeid +" and userid = "+ userid;
RecordSet.executeSql(zsql);
if(RecordSet.next()){
takisremark = Util.getIntValue(RecordSet.getString("takisremark"));
handleforwardid = Util.getIntValue(RecordSet.getString("handleforwardid"));
}
if(takisremark==2){
RecordSet.executeSql("update workflow_requestlog set logtype='b' where requestid= "+ requestid + " and nodeid = "+ nodeid +" and operator = "+ userid);
}
if(handleforwardid>0){
RecordSet.executeSql("update workflow_requestlog set logtype='j' where requestid= "+ requestid + "and nodeid = "+ nodeid +" and operator = "+ userid);
}
if(takisremark!=2 && handleforwardid<0){
boolean logstatus = RequestManager.saveRequestLog();
}
String taksql = "select * from workflow_currentoperator where requestid= "+ requestid + "and nodeid = "+ nodeid +" and userid = "+ userid +" and takisremark = 2";
RecordSet.executeSql(taksql);
if(RecordSet.next()){
String taksql1 = "select count(*) as cou from workflow_currentoperator where requestid= "+ requestid + "and nodeid = "+ nodeid +" and takisremark = 2 and isremark=1";
RecordSet.executeSql(taksql1);
if(RecordSet.next()){
if(RecordSet.getInt("cou")==0){
String taksql2 = "select * from workflow_currentoperator where requestid= "+ requestid + "and nodeid = "+ nodeid +" and isremark = 0 and takisremark = -2";
RecordSet.executeSql(taksql2);
if(RecordSet.next()){
String uptaksql2 = "update workflow_currentoperator set takisremark=0 where requestid= "+ requestid + "and nodeid = "+ nodeid +" and isremark = 0 and takisremark = -2";
RecordSet.executeSql(uptaksql2);
}
}
}
}
/*
RecordSet.execute("select * from workflow_currentoperator where requestid = " + requestid + "and workflowid = " +workflowid+ "and userid = "+ userid + "and nodeid = "+nodeid+"and takisremark = 2 ");
if(RecordSet.next()){
int tkisremark = RecordSet.getInt("isremark");
System.out.println("--588--tkisremark----"+tkisremark);
if(tkisremark ==2){
RecordSet.execute("update workflow_currentoperator set takisremark = 0 where requestid = " + requestid + "and workflowid = " +workflowid+ "and nodeid = "+nodeid+"and takisremark = -2 ");
}
}*/
}
//System.out.println("12:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
if(requestid > 0){
int _wfid = 0;
int _currNodeType = -1;
int _formid = 0;
rs_1.executeProc("workflow_Requestbase_SByID", "" + requestid + "");
//当前节点
if (rs_1.next()) {
_wfid = rs_1.getInt("workflowid");
_currNodeType = Util.getIntValue(rs_1.getString("currentnodetype"), 0);
}
/*
rs_1.executeSql("select formid from workflow_base where id = "+_wfid);
if (rs_1.next()) {
_formid = rs_1.getInt("formid");
}
*/
if(_currNodeType==3){
String update_sql="update FnaExpenseInfo set status = 1 where requestid="+requestid;
rs_1.executeSql(update_sql);
}
}
//System.out.println("13:流程" + i + "时间:" + (new Date().getTime() - d1.getTime()));
}
}
//EAS流程提交
if(!easrequestidlist.equals("")){
//先判断用户是否登录
weaver.eas.EASUtil EASUtil = new weaver.eas.EASUtil();
String sessionid = Util.null2String(EASUtil.EasLogin(user.getUID()+""));
String loginid = EASUtil.getLoginid(user);
if(!sessionid.equals("")&&!sessionid.equals("0")){
EASUtil.EASMultiDoSubmit(easrequestidlist,loginid,remark);
}else{
//弹出账户设置页面
//alert("EAS系统登陆异常请检查EAS账号设置");
//window.open("/interface/AccountSetting.jsp");
//return ;
response.getWriter().write("2");
return;
}
}
String pagefromtype = Util.null2String(request.getParameter("pagefromtype"));
if ("1".equals(pagefromtype)) {
response.getWriter().write("1");
return;
}
if(method.equals("reqeustByWfTypeAndComplete")){
response.sendRedirect("/workflow/search/WFSearchTemp.jsp?method="+method+"&wftype="+wftype+"&flowAll="+flowAll+"&flowNew="+flowNew+"&viewScope=doing&complete=0&numberType=flowAll&viewcondition="+viewcondition);
}else if(method.equals("reqeustbywfidNode")){
response.sendRedirect("/workflow/search/WFSearchTemp.jsp?method="+method+"&workflowid="+wfid+"&flowAll="+flowAll+"&flowNew="+flowNew+"&viewScope=doing&complete=0&numberType=flowAll&viewcondition="+viewcondition);
}else{
response.sendRedirect("/workflow/search/WFSearchTemp.jsp?method=all&viewScope=doing&complete=0&wftypes="+wftypes+"&flowAll="+flowAll+"&flowNew="+flowNew+"&viewcondition="+viewcondition);
}
%>

View File

@ -0,0 +1,884 @@
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="org.json.JSONArray"%>
<%@page import="org.json.JSONObject"%>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<!DOCTYPE html>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="WrokflowOverTimeTimer" class="weaver.system.WrokflowOverTimeTimer" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<jsp:useBean id="AllManagers" class="weaver.hrm.resource.AllManagers" scope="page"/>
<jsp:useBean id="HrmListValidate" class="weaver.hrm.resource.HrmListValidate" scope="page" />
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
</head>
<script language="javascript">
try{
window.opener.btnWfCenterReload.onclick();
}catch(e){}
try{
parent.window.taskCallBack(2);
}catch(e){}
</script>
<%
int isfrom = Util.getIntValue(request.getParameter("isfrom"),-1);
boolean isUseOldWfMode=sysInfo.isUseOldWfMode();
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
String loadtree = Util.null2String(request.getParameter("loadtree"));
//System.out.println("loadtree:"+loadtree);
boolean isfromtab = Util.null2String(request.getParameter("isfromtab")).equals("true")?true:false;
int requestid = Util.getIntValue((String)session.getAttribute("requestidForAllBill"),0);
String topage_ForAllBill = Util.null2String((String)session.getAttribute("topage_ForAllBill"));
if(!"".equals(topage_ForAllBill)){
if(topage_ForAllBill.indexOf("/proj/process/ViewTask.jsp") == 0 || topage_ForAllBill.indexOf("/proj/plan/ViewTask.jsp") == 0){
response.sendRedirect(topage_ForAllBill+"&requestid="+requestid);
session.setAttribute("topage_ForAllBill","");
return;
}else if(topage_ForAllBill.indexOf("RequestOperation.jsp") > 0){
int tempInt = topage_ForAllBill.lastIndexOf("3D");
String tempString = topage_ForAllBill.substring(tempInt+2);
response.sendRedirect("/proj/process/ViewTask.jsp?taskrecordid="+tempString+"&requestid="+requestid);
session.setAttribute("topage_ForAllBill","");
return;
}
}
String resourceid= Util.null2String(request.getParameter("resourceid"));
AllManagers.getAll(resourceid);
if("".equals(resourceid)){
resourceid = ""+user.getUID();
}
boolean isSelf = false;
boolean isManager = false;
RecordSet.executeProc("HrmResource_SelectByID",resourceid);
RecordSet.next();
String departmentid = Util.toScreen(RecordSet.getString("departmentid"),user.getLanguage()) ; /*所属部门*/
if (resourceid.equals(""+user.getUID()) ){
isSelf = true;
}
while(AllManagers.next()){
String tempmanagerid = AllManagers.getManagerID();
if (tempmanagerid.equals(""+user.getUID())) {
isManager = true;
}
}
if(!(((isSelf || isManager || HrmUserVarify.checkUserRight("HrmResource:Workflow",user,departmentid))))){
//response.sendRedirect("/notice/noright.jsp") ;
}
String logintype = ""+user.getLogintype();
int usertype = 0;
if(logintype.equals("2")) usertype= 1;
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
String userID = String.valueOf(user.getUID());
if(resourceid.equals("")) {
session.removeAttribute("RequestViewResource") ;
}
else {
session.setAttribute("RequestViewResource",resourceid) ;
}
boolean superior = false; //是否为被查看者上级或者本身
if("".equals(resourceid) || userID.equals(resourceid))
{
resourceid = userID;
superior = true;
}
else
{
rs.executeSql("SELECT * FROM HrmResource WHERE ID = " + resourceid + " AND managerStr LIKE '%," + userID + ",%'");
if(rs.next())
{
superior = true;
}
}
char flag = Util.getSeparator();
String username = Util.toScreen(ResourceComInfo.getResourcename(resourceid),user.getLanguage());
if(logintype.equals("2")) username = Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(""+user.getUID()),user.getLanguage()) ;
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(1207,user.getLanguage()) + ": "+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
String tworkflowNodeIDs = "";
%>
<%
String typeid="";
String typecount="";
String typename="";
String workflowid="";
String workflowcount="";
String newremarkwfcount0="";
String newremarkwfcount1="";
String wfsupedcount="";
String workflowname="";
ArrayList wftypeList=new ArrayList();
ArrayList wftypecountList=new ArrayList();
ArrayList workflowList=new ArrayList();
ArrayList workflowcountList=new ArrayList();
ArrayList newremarkwfcount0List=new ArrayList();//待办数量
ArrayList newremarkwfcount1List=new ArrayList();//反馈数量
ArrayList wftypeworkflowList=new ArrayList();
ArrayList wfovertimecountList=new ArrayList();//超时数量
ArrayList wfsupedcountList = new ArrayList(); //被督办数量
Hashtable wfNodeHahstable = new Hashtable();
Map newremarkwfcount0Map=new Hashtable();//待办数量
Map newremarkwfcount1Map=new Hashtable();//反馈数量
Map wftypeworkflowMap=new Hashtable();
Map wfovertimecountMap=new Hashtable();//超时数量
Map wfsupedcountMap = new Hashtable(); //被督办数量
int totalcount=0;
String wftypes = "";
String demoLeftMenus = "";
//String SQL = "";
//SQL = "select workflowtype, workflowid from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5' or isremark='8' or isremark='9' or isremark='7') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and exists (select 1 from workflow_requestbase c where c.workflowid=workflow_currentoperator.workflowid and c.requestid=workflow_currentoperator.requestid)";
if(loadtree.equals("true")){
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select workflowtype, workflowid ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where ((isremark = '0' and (takisremark is null or takisremark=0)) or isremark = '1' or isremark = '5' or ");
sqlsb.append(" isremark = '8' or isremark = '9' or isremark = '7') ");
sqlsb.append(" and islasttimes = 1 ");
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
//sqlsb.append(" and workflowid in (select id from workflow_base where (isvalid=1 or isvalid=3) ) ");
sqlsb.append(" and exists (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = workflow_currentoperator.workflowid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(" and c.requestid = workflow_currentoperator.requestid)");
//RecordSet.executeSql("select workflowtype, workflowid, viewtype, count(distinct requestid) workflowcount from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5') and islasttimes=1 and (isprocessed is null or (isprocessed<>'2' and isprocessed<>'3')) and userid=" + resourceid + " and usertype= " + usertype +" group by workflowtype, workflowid, viewtype order by workflowtype, workflowid " ) ;
//System.out.print("select workflowtype, workflowid from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and exists (select 1 from workflow_requestbase c where c.requestid=workflow_currentoperator.requestid) group by workflowtype, workflowid order by workflowtype, workflowid " ) ;
//RecordSet.executeSql("select distinct a.workflowtype, a.workflowid from workflow_currentoperator a ,workflow_requestbase b where a.requestid=b.requestid and (b.currentnodetype <> '3' or (a.isremark ='1' and b.currentnodetype = '3')) and (a.isremark='0' or a.isremark='1' or a.isremark='5') and a.userid=" + resourceid + " and a.usertype= " + usertype +" group by a.workflowtype, a.workflowid order by a.workflowtype, a.workflowid " ) ;
if(!superior)
{
//SQL += " AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE workflow_currentoperator.workflowid = b.workflowid AND workflow_currentoperator.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ";
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE workflow_currentoperator.workflowid = b.workflowid AND workflow_currentoperator.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
//SQL += " group by workflowtype, workflowid order by workflowtype, workflowid";
sqlsb.append(" group by workflowtype, workflowid order by workflowtype, workflowid ");
RecordSet.executeSql(sqlsb.toString());
//System.out.println(sqlsb.toString());
while(RecordSet.next()){
String theworkflowid = Util.null2String(RecordSet.getString("workflowid")) ;
String theworkflowtype = Util.null2String(RecordSet.getString("workflowtype")) ;
theworkflowid = WorkflowVersion.getActiveVersionWFID(theworkflowid);
if(WorkflowComInfo.getIsValid(theworkflowid).equals("1"))
{
/* added by wdl 2006-06-14 left menu advanced menu */
if(selectedworkflow.indexOf("T"+theworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+theworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
/* added end */
if(wftypeworkflowList.indexOf(theworkflowtype+","+theworkflowid)<0){
wftypeworkflowList.add(theworkflowtype+","+theworkflowid);
}
int wftindex = wftypeList.indexOf(theworkflowtype) ;
if(wftindex == -1) {
wftypeList.add(theworkflowtype) ;
wftypecountList.add("0") ;
}
wftindex = workflowList.indexOf(theworkflowid) ;
if(wftindex == -1) {
workflowList.add(theworkflowid) ;
workflowcountList.add("0") ;
}
if(selectedworkflow.indexOf("PW"+theworkflowid+"N")!=-1 && fromAdvancedMenu==1){
int bx = selectedworkflow.indexOf("PW"+theworkflowid+"N");
String tmp = selectedworkflow.substring(bx+("PW"+theworkflowid+"N").length());
bx = tmp.indexOf("SP^AN");
tmp = tmp.substring(0, bx);
//System.out.println("theworkflowid = " + theworkflowid + " tmp = " + tmp);
wfNodeHahstable.put(theworkflowid, tmp);
}
}
}
// newremarkwfcount0List.add(""+newcount);
//newremarkwfcount1List.add(""+newcount1);
/*
wfovertimecountList.add(""+overtimecount);
int wfindex = workflowList.indexOf(tworkflowid) ;
if(wfindex != -1) {
workflowcountList.set(wfindex,""+(Util.getIntValue((String)workflowcountList.get(wfindex),0)+overtimecount)) ;
}
int wftindex = wftypeList.indexOf(tworkflowtype) ;
if(wftindex != -1) {
wftypecountList.set(wftindex,""+(Util.getIntValue((String)wftypecountList.get(wftindex),0)+overtimecount)) ;
}
totalcount += overtimecount;
*/
//左侧树拼接 json
demoLeftMenus = "[";
if(wftypeList.size()>0){
for (int i = 0,typerowcounts=wftypeList.size(); i < typerowcounts; i++) {
typeid = (String) wftypeList.get(i);
typecount = (String) wftypecountList.get(i);
typename = WorkTypeComInfo.getWorkTypename(typeid);
String workFlowIDsRequest = "";
String workFlowNodeIDsRequest = "";
for (int j = 0; j < workflowList.size(); j++) {
workflowid = (String) workflowList.get(j);
String curtypeid = WorkflowComInfo.getWorkflowtype(workflowid);
if (!curtypeid.equals(typeid)) {
continue;
}
workFlowIDsRequest += workflowid + ",";
String t_workFlowNodeIDRequest = Util.null2String((String) wfNodeHahstable.get(workflowid));
if (!"".equals(t_workFlowNodeIDRequest)) {
workFlowNodeIDsRequest += t_workFlowNodeIDRequest + ",";
}
}
if (!"".equals(workFlowIDsRequest)) {
workFlowIDsRequest = workFlowIDsRequest.substring(0, workFlowIDsRequest.length());
}
if (!"".equals(workFlowNodeIDsRequest)) {
workFlowNodeIDsRequest = workFlowNodeIDsRequest.substring(0, workFlowNodeIDsRequest.length());
}
demoLeftMenus +="{";
demoLeftMenus += "\"name\":\""+Util.toScreenForJs(Util.toScreen(typename, user.getLanguage()))+"\",";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
demoLeftMenus += "\"hasChildren\":"+true+",";
demoLeftMenus += "\"isOpen\":"+true+",";
demoLeftMenus += "\"submenus\":[";
List<Map> maps=new ArrayList(0);
for (int j = 0; j < workflowList.size(); j++) {
workflowid = (String) workflowList.get(j);
String curtypeid = WorkflowComInfo.getWorkflowtype(workflowid);
if (!curtypeid.equals(typeid))
continue;
workflowcount = (String) workflowcountList.get(j);
workflowname = WorkflowComInfo.getWorkflowname(workflowid);
int tempind = wftypeworkflowList.indexOf(typeid + "," + workflowid);
int ovtimenum = 0;
newremarkwfcount1 = "0";
newremarkwfcount0 = "0";
wfsupedcount = "0";
if (tempind > -1) {
Object tempovtimenumObj = wfovertimecountMap.get(workflowid);
if (tempovtimenumObj != null) {
ovtimenum = (Integer)tempovtimenumObj;
} else {
ovtimenum = 0;
}
Object tempnewremarkwfcount0Obj = newremarkwfcount0Map.get(workflowid);
if (tempnewremarkwfcount0Obj != null) {
newremarkwfcount0 = (Integer)tempnewremarkwfcount0Obj + "";
} else {
newremarkwfcount0 = "0";
}
Object tempnewremarkwfcount1Obj = newremarkwfcount1Map.get(workflowid);
if (tempnewremarkwfcount1Obj != null) {
newremarkwfcount1 = (Integer)tempnewremarkwfcount1Obj + "";
} else {
newremarkwfcount1 = "0";
}
Object tempwfsupedcountObj = wfsupedcountMap.get(workflowid);
if (tempwfsupedcountObj != null) {
wfsupedcount = (Integer)tempwfsupedcountObj + "";
} else {
wfsupedcount = "0";
}
//newremarkwfcount1 = Util.getIntValue(Util.null2String((String) newremarkwfcount1Map.get(workflowid)), 0) + "";
//(String) newremarkwfcount1Map.get(workflowid);
//wfsupedcount = Util.getIntValue(Util.null2String((String) wfsupedcountMap.get(workflowid)), 0) + "";
//(String) wfsupedcountMap.get(workflowid);
}
// System.out.println("====================================************=newremarkwfcount1=" + newremarkwfcount1+ ", " + Util.toScreen(newremarkwfcount1, user.getLanguage()));
String t_nodeids = Util.null2String((String) wfNodeHahstable.get(workflowid));
Map map=new HashMap();
map.put("name", Util.toScreenForJs(Util.toScreen(workflowname, user.getLanguage())));
map.put("workflowid",workflowid);
map.put("nodeids",t_nodeids);
//map.put("flowNew",Util.toScreen(newremarkwfcount0, user.getLanguage()));
//map.put("flowResponse",Util.toScreen(newremarkwfcount1, user.getLanguage()));
map.put("flowNew","0");
map.put("flowResponse","0");
map.put("flowOut",ovtimenum);
//map.put("flowAll",Util.toScreen(workflowcount,user.getLanguage()));
//map.put("flowSup",Util.toScreen(wfsupedcount, user.getLanguage()));
map.put("flowAll","0");
map.put("flowSup","0");
maps.add(map);
}
int flowNew=0;
int flowResponse=0;
int flowOut=0;
int flowAll=0;
int flowSup=0;
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowOut+=Integer.valueOf(map.get("flowOut")+"");
flowAll+=Integer.valueOf(map.get("flowAll")+"");
flowSup+=Integer.valueOf(map.get("flowSup")+"");
demoLeftMenus += "{";
demoLeftMenus += "\"name\":\""+map.get("name")+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"workflowid\":"+map.get("workflowid")+",";
demoLeftMenus += "\"nodeids\":\""+map.get("nodeids")+"\",";
demoLeftMenus += "\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus += "\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus += "\"flowOut\":"+map.get("flowOut")+",";
demoLeftMenus += "\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus += "\"flowSup\":"+map.get("flowSup");
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus += "\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus += "\"flowOut\":"+map.get("flowOut")+",";
demoLeftMenus += "\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus += "\"flowSup\":"+map.get("flowSup");
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
demoLeftMenus += "],";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"typeid\":"+typeid+",";
demoLeftMenus += "\"flowNew\":"+flowNew+",";
demoLeftMenus += "\"flowResponse\":"+flowResponse+",";
demoLeftMenus += "\"flowOut\":"+flowOut+",";
demoLeftMenus += "\"flowAll\":"+flowAll+",";
demoLeftMenus += "\"flowSup\":"+flowSup;
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":"+flowNew+",";//新到
demoLeftMenus += "\"flowResponse\":"+flowResponse+",";//反馈
demoLeftMenus += "\"flowOut\":"+flowOut+",";//超时
demoLeftMenus += "\"flowAll\":"+flowAll+",";//所有
demoLeftMenus += "\"flowSup\":"+flowSup;//督办
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += (i==typerowcounts-1)?"":",";
wftypes += typeid+",";
}}
//EAS流程类型查询里列表
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
String loginid = eu.getLoginid(user);
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select FCategoryID,FCategory,FCategorySeq from "+eas_workflowinfo+" group by FCategoryID,FCategory,FCategorySeq order by FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
while(rs.next()){
String _typeid = rs.getString(1);
String _typename = rs.getString(2);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",{";
}else{
demoLeftMenus +="{";
}
System.out.println("_typeid = "+_typeid+" _typename="+_typename);
demoLeftMenus += "\"name\":\""+_typename+"\",";
demoLeftMenus+="\"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"hasChildren\":"+true+",";
demoLeftMenus += "\"isOpen\":"+true+",";
demoLeftMenus += "\"submenus\":[";
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
int wfcountall = 0 ;
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String _wfname = RecordSet.getString(2);
String _fworkflowid = RecordSet.getString(3);
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' AND FWorkFlowID=''"+_fworkflowid+"'' and FState=''1''')");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
wfcountall += wfcount ;
demoLeftMenus += "{";
demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"workflowid\":"+_wfid+",";
demoLeftMenus += "\"nodeids\":\"\",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += ",";
}
if(eas_wf_count>0){
demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
}
demoLeftMenus += "],";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"typeid\":"+_typeid+",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
}
demoLeftMenus += "]";
out.clear();
out.print(demoLeftMenus);
//System.out.println(demoLeftMenus);
return;
}
if(!isUseOldWfMode){
int typerowcounts=wftypeList.size();
JSONArray jsonWfTypeArray = new JSONArray();
for(int i=0;i<typerowcounts;i++){
typeid=(String)wftypeList.get(i);
JSONObject jsonWfType = new JSONObject();
jsonWfType.put("draggable",false);
jsonWfType.put("leaf",false);
jsonWfType.put("cls","wfTreeFolderNode");
typecount=(String)wftypecountList.get(i);
typename=WorkTypeComInfo.getWorkTypename(typeid);
String workFlowIDsRequest = "";
String workFlowNodeIDsRequest = "";
for(int j=0;j<workflowList.size();j++){
workflowid=(String)workflowList.get(j);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)){
continue;
}
workFlowIDsRequest += workflowid + ",";
String t_workFlowNodeIDRequest = Util.null2String((String)wfNodeHahstable.get(workflowid));
if(!"".equals(t_workFlowNodeIDRequest)){
workFlowNodeIDsRequest += t_workFlowNodeIDRequest + ",";
}
}
if(!"".equals(workFlowIDsRequest)){
workFlowIDsRequest = workFlowIDsRequest.substring(0, workFlowIDsRequest.length());
}
if(!"".equals(workFlowNodeIDsRequest)){
workFlowNodeIDsRequest = workFlowNodeIDsRequest.substring(0, workFlowNodeIDsRequest.length());
}
if(fromAdvancedMenu==1){
jsonWfType.put("paras","method=reqeustbywftypeNode&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=0&workFlowIDsRequest="+workFlowIDsRequest+"&workFlowNodeIDsRequest="+workFlowNodeIDsRequest+"&selectedContent="+selectedContent+"&menuType="+menuType);
}
else{
jsonWfType.put("paras","method=reqeustbywftype&wftype="+typeid+"&complete=0");
}
int newremark1 = 0;
int newremark2 = 0;
int over = 0;
JSONArray jsonWfTypeChildrenArray = new JSONArray();
for(int j=0;j<workflowList.size();j++){
String wfText = "";
workflowid=(String)workflowList.get(j);
JSONObject jsonWfTypeChild = new JSONObject();
jsonWfTypeChild.put("draggable",false);
jsonWfTypeChild.put("leaf",true);
String curtypeid=WorkflowComInfo.getWorkflowtype(workflowid);
if(!curtypeid.equals(typeid)) continue;
workflowcount=(String)workflowcountList.get(j);
workflowname=WorkflowComInfo.getWorkflowname(workflowid);
int tempind=wftypeworkflowList.indexOf(typeid+","+workflowid);
int ovtimenum=0;
if(tempind>-1){
ovtimenum=Util.getIntValue((String)wfovertimecountList.get(tempind),0);
//newremarkwfcount0=(String)newremarkwfcount0List.get(tempind);
//newremarkwfcount1=(String)newremarkwfcount1List.get(tempind);
newremarkwfcount0="0";
newremarkwfcount1="0";
wfsupedcount=(String)wfsupedcountList.get(tempind);
}
String t_nodeids = Util.null2String((String)wfNodeHahstable.get(workflowid));
jsonWfTypeChild.put("iconCls","btn_dot");
jsonWfTypeChild.put("cls","wfTreeLeafNode");
jsonWfTypeChild.put("paras","method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+t_nodeids+"&complete=0");
wfText +="<a href=# onClick=javaScript:loadGrid('"+jsonWfTypeChild.get("paras").toString()+"',true) >"+workflowname+" </a>&nbsp(";
if(ovtimenum>0){
String paras = "method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+t_nodeids+"&complete=8";
wfText+="<a href = # onClick=javaScript:loadGrid('"+paras+"',true) >"+ovtimenum+"</a><IMG src='/images/BDOut_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
over=ovtimenum+over;;
}
if(!newremarkwfcount0.equals("0")){
String paras = "method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+t_nodeids+"&complete=3";
wfText+="<a href =# onClick=javaScript:loadGrid('"+paras+"',true) >"+Util.toScreen(newremarkwfcount0,user.getLanguage())+"</a><IMG src='/images/BDNew_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
newremark1=Util.getIntValue(newremarkwfcount0)+newremark1;
}
if(!newremarkwfcount1.equals("0")){
String paras = "method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+t_nodeids+"&complete=4";
wfText+="<a href=# onClick=javaScript:loadGrid('"+paras+"',true) >"+Util.toScreen(newremarkwfcount1,user.getLanguage())+"</a><IMG src='/images/BDNew2_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
newremark2=Util.getIntValue(newremarkwfcount1)+newremark2;
}
wfText+=Util.toScreen(workflowcount,user.getLanguage())+")";
jsonWfTypeChild.put("text",wfText);
jsonWfTypeChildrenArray.put(jsonWfTypeChild);
}
String wfText ="";
if(over>0){
wfText+=over+"<IMG src='/images/BDOut_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
}
if(newremark1>0){
wfText+=newremark1+"<IMG src='/images/BDNew_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
}
if(newremark2>0){
wfText+=newremark2+"<IMG src='/images/BDNew2_wev8.gif' align=center BORDER=0> &nbsp;/&nbsp;";
}
//wfText+=")";
jsonWfType.put("text","<a href=# onClick=javaScript:loadGrid('"+jsonWfType.get("paras").toString()+"',true)>"+WorkTypeComInfo.getWorkTypename(typeid)+"&nbsp;</a>("+wfText+(String)wftypecountList.get(i)+")");
//jsonWfType.put("text","");
jsonWfType.put("children",jsonWfTypeChildrenArray);
jsonWfTypeArray.put(jsonWfType);
}
session.setAttribute("view",jsonWfTypeArray);
response.sendRedirect("/workflow/request/ext/Request.jsp?type=view&isfromtab="+isfromtab); //type: view,表待办 handled表已办
return;
}
if(workflowcountList.size() == 1 && !superior){
String workflowid1 = (String)workflowList.get(0);
String nodeids1 = Util.null2String((String)wfNodeHahstable.get(workflowid1));
String href1 = "/workflow/search/WFSearchTemp.jsp?method=reqeustbywfidNode&workflowid="+workflowid1+"&nodeids="+nodeids1+"&complete=0";
//response.sendRedirect(href1);
%>
<script language=javascript>
location.href ="<%=href1%>";
</script>
<%
}
titlename+="&nbsp;&nbsp;("+SystemEnv.getHtmlLabelName(18609,user.getLanguage())+totalcount+SystemEnv.getHtmlLabelName(26302,user.getLanguage())+")";
%>
<body>
<%@ include file="/systeminfo/leftMenuCommon.jsp" %>
<script type="text/javascript" src="/js/ecology8/request/requestView_wev8.js"></script>
<script type="text/javascript" src="/js/ecology8/request/wf_search_requestView_wev8.js"></script>
<form name=frmmain method=post action="RequestView.jsp?offical=<%=offical %>&officalType=<%=officalType %>">
<div>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
/* edited by wdl 2006-06-14 left menu advanced menu */
if(fromAdvancedMenu!=1){
RCMenuWidth = 160;
//RCMenu += "{"+SystemEnv.getHtmlLabelName(16347,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?method=all&complete=0&viewType=1,_self}" ;
//RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(20271,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=all&complete=2&viewType=2,_self}" ;
RCMenuHeight += RCMenuHeightStep ;
RCMenu += "{"+SystemEnv.getHtmlLabelName(16348,user.getLanguage())+",/workflow/search/WFSearchTemp.jsp?offical="+offical+"&officalType="+officalType+"&method=all&complete=1&viewType=3,_self}" ;
RCMenuHeight += RCMenuHeightStep ;
}
/* edited end */
%>
</div>
</form>
<script type="text/javascript">
function showloading()
{
if(jQuery(".leftTypeSearch").css("display") === "none");
else
e8_before2();
}
var demoLeftMenus = [];
function onloadtree()
{
var ajax=ajaxinit();
ajax.open("POST", "/workflow/request/RequestView.jsp?<%=request.getQueryString() %>", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("loadtree=true");
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
var restr = ajax.responseText;
$("#overFlowDiv").attr("loadtree","false");
demoLeftMenus = jQuery.parseJSON(restr);
var needflowOut=true;
var needflowResponse=true;
var system = "0";//0:ecology 1:eas
var numberTypes={
flowNew:{hoverColor:"#EE5F5F",color:"#EE5F5F",title:"新的流程"}
};
if(needflowOut==true || needflowOut=="true"){
numberTypes.flowOut={hoverColor:"#CB9CF4",color:"#CB9CF4",title:"超时的流程"};
}
if(needflowResponse==true || needflowResponse=="true"){
numberTypes.flowResponse={hoverColor:"#FFC600",color:"#FFC600",title:"有反馈的流程"};
}
numberTypes.flowAll={hoverColor:"#A6A6A6",color:"black",title:"全部流程"};
if(demoLeftMenus != null)
{
$(".ulDiv").leftNumMenu(demoLeftMenus,{
numberTypes:numberTypes,
showZero:false,
_callback:onloadtreeCount,
deleteIfAllZero:true,
menuStyles:["menu_lv1",""],
clickFunction:function(attr,level,numberType){
leftMenuClickFn(attr,level,numberType);
}
});
}
var sumCount=0;
$(".e8_level_2").each(function(){
sumCount+=parseInt($(this).find(".e8_block:last").html());
});
e8_after2();
}catch(e){e8_after2();}
}
}
}
function onloadtreeCount(obj,menus,options,level,customparams){
jQuery(obj).leftNumMenu("/workflow/request/RequestViewAjaxCount.jsp?<%=request.getQueryString() %>","update");
}
function getajaxcounturl() {
return "/workflow/request/RequestViewAjaxCount.jsp?resourceid=<%=Util.null2String(request.getParameter("resourceid")) %>";
}
function leftMenuClickFn(attr,level,numberType){
var doingTypes={
"flowAll":{complete:0}, //全部 //wfTabFrame.jsp中的viewcondition 相匹配
"flowNew":{complete:1}, //未读的
"flowResponse":{complete:2}, //反馈的
"flowOut":{complete:3}, //超时的
"flowSup":{complete:4} //督办的
};
if(numberType==null){
numberType="flowAll";
}
var viewcondition=doingTypes[numberType].complete;
var flowAll=attr.flowAll;
var flowNew=attr.flowNew;
var flowResponse=attr.flowResponse;
var flowOut=attr.flowOut;
var flowSup=attr.flowSup;
var url;
if(level==1){
var typeid=attr.typeid;
window.typeid=typeid;
window.workflowid=null;
window.nodeids=null;
var fromAdvancedMenu=attr.fromAdvancedMenu;
var infoId=attr.infoId;
var workFlowIDsRequest=attr.workFlowIDsRequest;
var workFlowNodeIDsRequest=attr.workFlowNodeIDsRequest;
var selectedContent=attr.selectedContent;
var menuType=attr.menuType;
if(fromAdvancedMenu=="1"){
url="/workflow/search/wfTabFrame.jsp?isfrom=<%=isfrom%>&offical=<%=offical %>&officalType=<%=officalType%>&method=reqeustByWfTypeAndComplete&fromadvancedmenu="+fromAdvancedMenu+"&infoId="+infoId+"&wftype="+typeid+"&complete=0&workFlowIDsRequest="+workFlowIDsRequest+"&workFlowNodeIDsRequest="+workFlowNodeIDsRequest+"&selectedContent="+selectedContent +"&menuType="+menuType+"&wftypes=<%=wftypes %>";
}else{
url="/workflow/search/wfTabFrame.jsp?isfrom=<%=isfrom%>&offical=<%=offical %>&officalType=<%=officalType%>&method=reqeustByWfTypeAndComplete&wftype="+typeid+"&complete=0&viewcondition="+viewcondition+"&wftypes=<%=wftypes %>";
}
}else{
var workflowid=attr.workflowid;
var nodeids=attr.nodeids;
window.typeid=null;
window.workflowid=workflowid;
window.nodeids=nodeids;
url="/workflow/search/wfTabFrame.jsp?isfrom=<%=isfrom%>&offical=<%=offical %>&officalType=<%=officalType%>&method=reqeustbywfidNode&workflowid="+workflowid+"&nodeids="+nodeids+"&complete=0&viewcondition="+viewcondition+"&wftypes=<%=wftypes %>";
}
url+="&viewScope=doing&numberType="+numberType+"&flowAll="+flowAll+"&flowNew="+flowNew+"&flowResponse="+flowResponse+"&flowOut="+flowOut+"&flowSup="+flowSup;
$(".flowFrame").attr("src",url);
}
function WfSearchAll(){
/*清除已选项样式*/
jQuery(".leftSearchInput").val("");
if(window.e8_search && window.oldtree!=false){
if(jQuery(".webfx-tree-item").length>0){
jQuery(".webfx-tree-item_selected").find("img[src*='w_']").each(function(){
var lastSrc = jQuery(this).attr("src");
jQuery(this).attr("src",lastSrc.replace("w_",""));
});
jQuery(".webfx-tree-item_selected").removeClass("webfx-tree-item_selected");
}else{
jQuery(".curSelectedNode").removeClass("curSelectedNode");
}
format("",true);
}else{
jQuery(".e8_li_selected").find(".e8menu_icon_close_select").removeClass("e8menu_icon_close_select").addClass("e8menu_icon_close");
jQuery(".e8_li_selected").find(".e8menu_icon_open_select").removeClass("e8menu_icon_open_select").addClass("e8menu_icon_open");
jQuery(".e8_li_selected").removeClass("e8_li_selected");
format2("",true);
}
/*清除右侧查询条件并重新查询*/
document.getElementById("myFrame").src ="/workflow/search/wfTabFrame.jsp?isfrom=<%=isfrom%>&offical=<%=offical %>&officalType=<%=officalType %>&method=all&viewScope=doing&complete=0&wftypes=<%=wftypes %>";
}
</script>
<table cellspacing="0" cellpadding="0" class="flowsTable" >
<tr>
<td class="leftTypeSearch">
<span class="leftType" onclick="WfSearchAll()">
<span><img style="vertical-align:middle;" src="/images/ecology8/request/alltype_wev8.png" width="18"/></span>
<span><%=SystemEnv.getHtmlLabelName(21979,user.getLanguage()) %></span>
</span>
<span class="leftSearchSpan">
&nbsp;<input type="text" class="leftSearchInput" />
</span>
</td>
<td rowspan="2">
<iframe id="myFrame" name="myFrame" src="/workflow/search/wfTabFrame.jsp?isfrom=<%=isfrom%>&offical=<%=offical %>&officalType=<%=officalType %>&method=all&viewScope=doing&complete=0&wftypes=<%=wftypes %>"
class="flowFrame" frameborder="0" frameborder="0" width="100%"></iframe>
</td>
</tr>
<tr>
<td style="width:23%;" class="flowMenusTd">
<div class="flowMenuDiv" >
<!--<div class="flowMenuAll"><span class="allText">全部&nbsp;</span></div>-->
<div style="overflow:hidden;height:300px;position:relative;" loadtree="false" id="overFlowDiv">
<div class="ulDiv" ></div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,865 @@
<%@page import="weaver.systeminfo.SystemEnv"%>
<%@page import="weaver.hrm.User"%>
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@ page import="weaver.conn.*" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="org.json.JSONArray"%>
<%@page import="org.json.JSONObject"%>
<%@page import="weaver.workflow.workflow.WorkflowVersion"%>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfoHandler" %>
<%@ page import="weaver.systeminfo.menuconfig.LeftMenuInfo" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="CustomerInfoComInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page" />
<jsp:useBean id="WrokflowOverTimeTimer" class="weaver.system.WrokflowOverTimeTimer" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="sysInfo" class="weaver.system.SystemComInfo" scope="page"/>
<jsp:useBean id="AllManagers" class="weaver.hrm.resource.AllManagers" scope="page"/>
<jsp:useBean id="HrmListValidate" class="weaver.hrm.resource.HrmListValidate" scope="page" />
<%
User user = HrmUserVarify.getUser (request , response) ;
if(user==null) {
return;
}
boolean isUseOldWfMode=sysInfo.isUseOldWfMode();
String cursltwftypeid = Util.null2String(request.getParameter("wftype"));
String cursltwfid = Util.null2String(request.getParameter("workflowid"));
String curoptwfid = Util.null2String(request.getParameter("optkeys"));
if(!"".equals(cursltwfid) && "".equals(cursltwftypeid)){
cursltwftypeid = WorkflowComInfo.getWorkflowtype(cursltwfid);
} else if (!"".equals(curoptwfid)) {
String optwfid = "";
String optkeysql = "select distinct workflowid from workflow_requestbase where requestid in (" + curoptwfid + ")";
RecordSet rs9 = new RecordSet();
rs9.executeSql(optkeysql);
while (rs9.next()) {
cursltwftypeid += "," + WorkflowComInfo.getWorkflowtype(WorkflowVersion.getActiveVersionWFID(rs9.getString(1)));
}
if (cursltwftypeid.length() > 1) {
cursltwftypeid = cursltwftypeid.substring(1, cursltwftypeid.length());
}
}
//System.out.println("cursltwftypeid = "+cursltwftypeid);
//System.out.println("cursltwfid = "+cursltwfid);
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
String loadtree = Util.null2String(request.getParameter("loadtree"));
//System.out.println("loadtree:"+loadtree);
boolean isfromtab = Util.null2String(request.getParameter("isfromtab")).equals("true")?true:false;
int requestid = Util.getIntValue((String)session.getAttribute("requestidForAllBill"),0);
String topage_ForAllBill = Util.null2String((String)session.getAttribute("topage_ForAllBill"));
if(!"".equals(topage_ForAllBill)){
if(topage_ForAllBill.indexOf("/proj/process/ViewTask.jsp") == 0 || topage_ForAllBill.indexOf("/proj/plan/ViewTask.jsp") == 0){
response.sendRedirect(topage_ForAllBill+"&requestid="+requestid);
session.setAttribute("topage_ForAllBill","");
return;
}else if(topage_ForAllBill.indexOf("RequestOperation.jsp") > 0){
int tempInt = topage_ForAllBill.lastIndexOf("3D");
String tempString = topage_ForAllBill.substring(tempInt+2);
response.sendRedirect("/proj/process/ViewTask.jsp?taskrecordid="+tempString+"&requestid="+requestid);
session.setAttribute("topage_ForAllBill","");
return;
}
}
String resourceid= Util.null2String(request.getParameter("resourceid"));
AllManagers.getAll(resourceid);
if("".equals(resourceid)){
resourceid = ""+user.getUID();
}
boolean isSelf = false;
boolean isManager = false;
RecordSet.executeProc("HrmResource_SelectByID",resourceid);
RecordSet.next();
String departmentid = Util.toScreen(RecordSet.getString("departmentid"),user.getLanguage()) ; /*所属部门*/
if (resourceid.equals(""+user.getUID()) ){
isSelf = true;
}
while(AllManagers.next()){
String tempmanagerid = AllManagers.getManagerID();
if (tempmanagerid.equals(""+user.getUID())) {
isManager = true;
}
}
if(!(((isSelf || isManager || HrmUserVarify.checkUserRight("HrmResource:Workflow",user,departmentid))))){
//response.sendRedirect("/notice/noright.jsp") ;
}
String logintype = ""+user.getLogintype();
int usertype = 0;
if(logintype.equals("2")) usertype= 1;
/* edited by wdl 2006-06-14 left menu advanced menu */
int fromAdvancedMenu = Util.getIntValue(request.getParameter("fromadvancedmenu"),0);
String selectedContent = Util.null2String(request.getParameter("selectedContent"));
String menuType = Util.null2String(request.getParameter("menuType"));
int infoId = Util.getIntValue(request.getParameter("infoId"),0);
if(selectedContent!=null && selectedContent.startsWith("key_")){
String menuid = selectedContent.substring(4);
RecordSet.executeSql("select * from menuResourceNode where contentindex = '"+menuid+"'");
selectedContent = "";
while(RecordSet.next()){
String keyVal = RecordSet.getString(2);
selectedContent += keyVal +"|";
}
if(selectedContent.indexOf("|")!=-1)
selectedContent = selectedContent.substring(0,selectedContent.length()-1);
}
if(fromAdvancedMenu == 1){
response.sendRedirect("/workflow/search/WFSearchCustom.jsp?fromadvancedmenu=1&infoId="+infoId+"&selectedContent="+selectedContent+"&menuType="+menuType);
return;
}
String selectedworkflow = "";
LeftMenuInfoHandler infoHandler = new LeftMenuInfoHandler();
LeftMenuInfo info = infoHandler.getLeftMenuInfo(infoId);
if(info!=null){
selectedworkflow = info.getSelectedContent();
}
if(!"".equals(selectedContent))
{
selectedworkflow = selectedContent;
}
selectedworkflow+="|";
/* edited end */
String userID = String.valueOf(user.getUID());
if(resourceid.equals("")) {
session.removeAttribute("RequestViewResource") ;
}
else {
session.setAttribute("RequestViewResource",resourceid) ;
}
boolean superior = false; //是否为被查看者上级或者本身
if("".equals(resourceid) || userID.equals(resourceid))
{
resourceid = userID;
superior = true;
}
else
{
rs.executeSql("SELECT * FROM HrmResource WHERE ID = " + resourceid + " AND managerStr LIKE '%," + userID + ",%'");
if(rs.next())
{
superior = true;
}
}
char flag = Util.getSeparator();
String username = Util.toScreen(ResourceComInfo.getResourcename(resourceid),user.getLanguage());
if(logintype.equals("2")) username = Util.toScreen(CustomerInfoComInfo.getCustomerInfoname(""+user.getUID()),user.getLanguage()) ;
String imagefilename = "/images/hdReport_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(1207,user.getLanguage()) + ": "+SystemEnv.getHtmlLabelName(367,user.getLanguage());
String needfav ="1";
String needhelp ="";
String tworkflowNodeIDs = "";
String typeid="";
String typecount="";
String typename="";
String workflowid="";
String workflowcount="";
String newremarkwfcount0="";
String newremarkwfcount1="";
String wfsupedcount="";
String workflowname="";
ArrayList wftypeList=new ArrayList();
ArrayList wftypecountList=new ArrayList();
ArrayList workflowList=new ArrayList();
ArrayList workflowcountList=new ArrayList();
ArrayList newremarkwfcount0List=new ArrayList();//待办数量
ArrayList newremarkwfcount1List=new ArrayList();//反馈数量
ArrayList wftypeworkflowList=new ArrayList();
ArrayList wfovertimecountList=new ArrayList();//超时数量
ArrayList wfsupedcountList = new ArrayList(); //被督办数量
Hashtable wfNodeHahstable = new Hashtable();
Map newremarkwfcount0Map=new Hashtable();//待办数量
Map newremarkwfcount1Map=new Hashtable();//反馈数量
Map wftypeworkflowMap=new Hashtable();
Map wfovertimecountMap=new Hashtable();//超时数量
Map wfsupedcountMap = new Hashtable(); //被督办数量
int totalcount=0;
String wftypes = "";
String demoLeftMenus = "";
//String SQL = "";
//SQL = "select workflowtype, workflowid from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5' or isremark='8' or isremark='9' or isremark='7') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and exists (select 1 from workflow_requestbase c where c.workflowid=workflow_currentoperator.workflowid and c.requestid=workflow_currentoperator.requestid)";
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select workflowtype, workflowid ");
sqlsb.append(" from workflow_currentoperator ");
sqlsb.append(" where ( (isremark = '0' and (takisremark is null or takisremark=0)) or ");
sqlsb.append(" isremark = '1' or isremark = '5' or isremark = '8' or isremark = '9' or isremark = '7') ");
sqlsb.append(" and islasttimes = 1 ");
if(!"".equals(cursltwftypeid)){
sqlsb.append(" and workflowtype in ( ").append(cursltwftypeid).append(")");
}
//if(!"".equals(cursltwfid)){
// sqlsb.append(" and workflowid = ").append(cursltwfid);
//}
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
sqlsb.append(" and workflowid in (select id from workflow_base where (isvalid=1 or isvalid=3) ) ");
sqlsb.append(" and exists (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = workflow_currentoperator.workflowid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(" and c.requestid = workflow_currentoperator.requestid)");
//RecordSet.executeSql("select workflowtype, workflowid, viewtype, count(distinct requestid) workflowcount from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5') and islasttimes=1 and (isprocessed is null or (isprocessed<>'2' and isprocessed<>'3')) and userid=" + resourceid + " and usertype= " + usertype +" group by workflowtype, workflowid, viewtype order by workflowtype, workflowid " ) ;
//System.out.print("select workflowtype, workflowid from workflow_currentoperator where (isremark='0' or isremark='1' or isremark='5') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and exists (select 1 from workflow_requestbase c where c.requestid=workflow_currentoperator.requestid) group by workflowtype, workflowid order by workflowtype, workflowid " ) ;
//RecordSet.executeSql("select distinct a.workflowtype, a.workflowid from workflow_currentoperator a ,workflow_requestbase b where a.requestid=b.requestid and (b.currentnodetype <> '3' or (a.isremark ='1' and b.currentnodetype = '3')) and (a.isremark='0' or a.isremark='1' or a.isremark='5') and a.userid=" + resourceid + " and a.usertype= " + usertype +" group by a.workflowtype, a.workflowid order by a.workflowtype, a.workflowid " ) ;
if(!superior)
{
//SQL += " AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE workflow_currentoperator.workflowid = b.workflowid AND workflow_currentoperator.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ";
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE workflow_currentoperator.workflowid = b.workflowid AND workflow_currentoperator.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
//SQL += " group by workflowtype, workflowid order by workflowtype, workflowid";
sqlsb.append(" group by workflowtype, workflowid order by workflowtype, workflowid ");
RecordSet.executeSql(sqlsb.toString());
while(RecordSet.next()){
String theworkflowid = Util.null2String(RecordSet.getString("workflowid")) ;
String theworkflowtype = Util.null2String(RecordSet.getString("workflowtype")) ;
theworkflowid = WorkflowVersion.getActiveVersionWFID(theworkflowid);
if(WorkflowComInfo.getIsValid(theworkflowid).equals("1"))
{
/* added by wdl 2006-06-14 left menu advanced menu */
if(selectedworkflow.indexOf("T"+theworkflowtype+"|")==-1 && fromAdvancedMenu==1) continue;
if(selectedworkflow.indexOf("W"+theworkflowid+"|")==-1 && fromAdvancedMenu==1) continue;
/* added end */
if(wftypeworkflowList.indexOf(theworkflowtype+","+theworkflowid)<0){
wftypeworkflowList.add(theworkflowtype+","+theworkflowid);
}
int wftindex = wftypeList.indexOf(theworkflowtype) ;
if(wftindex == -1) {
wftypeList.add(theworkflowtype) ;
wftypecountList.add("0") ;
}
wftindex = workflowList.indexOf(theworkflowid) ;
if(wftindex == -1) {
workflowList.add(theworkflowid) ;
workflowcountList.add("0") ;
}
if(selectedworkflow.indexOf("PW"+theworkflowid+"N")!=-1 && fromAdvancedMenu==1){
int bx = selectedworkflow.indexOf("PW"+theworkflowid+"N");
String tmp = selectedworkflow.substring(bx+("PW"+theworkflowid+"N").length());
bx = tmp.indexOf("SP^AN");
tmp = tmp.substring(0, bx);
//System.out.println("theworkflowid = " + theworkflowid + " tmp = " + tmp);
wfNodeHahstable.put(theworkflowid, tmp);
}
}
}
StringBuffer wftypesb = new StringBuffer();
StringBuffer wfsb = new StringBuffer();
StringBuffer wfnodesb = new StringBuffer();
for(int i=0;i<wftypeworkflowList.size();i++){
ArrayList templist=Util.TokenizerString((String)wftypeworkflowList.get(i),",");
String tworkflowtype=(String)templist.get(0);
String tworkflowid=(String)templist.get(1);
int newcount=0;
int newcount1=0;
tworkflowNodeIDs = Util.null2String((String)wfNodeHahstable.get(tworkflowid));
wftypesb.append(",").append(tworkflowtype);
wfsb.append(",").append(WorkflowVersion.getAllVersionStringByWFIDs(tworkflowid));
String tempnodeid = WorkflowVersion.getAllRelationNodeStringByNodeIDs(tworkflowNodeIDs);
if (tempnodeid != null && !"".equals(tempnodeid)) {
wfnodesb.append(",").append(tempnodeid);
}
}
if (wftypesb.length() > 0) {
wftypesb = wftypesb.delete(0, 1);
wfsb = wfsb.delete(0, 1);
}
if (wfnodesb.indexOf(",") == 0) {
wfnodesb = wfnodesb.delete(0, 1);
}
int newcount=0;
int newcount1=0;
//System.out.println("tworkflowNodeIDs = " + tworkflowNodeIDs);
sqlsb = new StringBuffer();
sqlsb.append("select a.workflowtype, a.workflowid, a.viewtype, count(distinct a.requestid) workflowcount ");
sqlsb.append(" from workflow_currentoperator a ");
sqlsb.append(" where (((isremark=0 and (takisremark is null or takisremark=0 )) and isprocessed is null) ");
sqlsb.append(" or isremark = '1' or ");
sqlsb.append(" isremark = '8' or isremark = '9' or isremark = '7') ");
sqlsb.append(" and islasttimes = 1 ");
if(!"".equals(cursltwftypeid)){
sqlsb.append(" and workflowtype in (").append(cursltwftypeid).append(")");
}
//if(!"".equals(cursltwfid)){
// sqlsb.append(" and workflowid = ").append(cursltwfid);
//}
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
if(!"".equals(wftypesb.toString())){
sqlsb.append(" and a.workflowtype in ( ").append(wftypesb).append(") ");
}
if(!"".equals(wfsb.toString())){
sqlsb.append(" and a.workflowid in (").append(wfsb).append(")");
}
sqlsb.append(" and exists (select c.requestid ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.requestid = a.requestid");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
//SQL = "select a.viewtype, count(distinct a.requestid) workflowcount from workflow_currentoperator a where ((isremark='0' and (isprocessed is null or (isprocessed<>'2' and isprocessed<>'3'))) or isremark='1' or isremark='8' or isremark='9' or isremark='7') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and a.workflowtype="+tworkflowtype+" and a.workflowid="+tworkflowid+" and exists (select c.requestid from workflow_requestbase c where c.requestid=a.requestid) ";
if(!"".equals(tworkflowNodeIDs)){
sqlsb.append(" and a.nodeid in (" + WorkflowVersion.getAllRelationNodeStringByNodeIDs(tworkflowNodeIDs) + ") ");
}
if(!superior)
{
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE a.workflowid = b.workflowid AND a.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
sqlsb.append(" group by a.viewtype, a.workflowtype, a.workflowid");
//System.out.println("************" + sqlsb.toString());
rs.executeSql(sqlsb.toString()) ;
while(rs.next()){
String tworkflowtype = Util.null2String(rs.getString("workflowtype"));
String tworkflowid = WorkflowVersion.getActiveVersionWFID(Util.null2String(rs.getString("workflowid")));
int theworkflowcount = Util.getIntValue(rs.getString("workflowcount"),0) ;
int viewtype = Util.getIntValue(rs.getString("viewtype"),2) ;
int wfindex = workflowList.indexOf(tworkflowid) ;
if(wfindex != -1) {
workflowcountList.set(wfindex,""+(Util.getIntValue((String)workflowcountList.get(wfindex),0)+theworkflowcount)) ;
if(viewtype==0){
newcount=theworkflowcount;
//newremarkwfcount0Map.put(tworkflowid, newcount);
Object tempobj = newremarkwfcount0Map.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
newremarkwfcount0Map.put(tworkflowid, wf0countindex + newcount);
} else {
newremarkwfcount0Map.put(tworkflowid, newcount);
}
//newremarkwfcount0List.add(""+newcount);
}
if(viewtype==-1){
newcount1=theworkflowcount;
Object tempobj = newremarkwfcount1Map.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
newremarkwfcount1Map.put(tworkflowid, wf0countindex + newcount1);
} else {
newremarkwfcount1Map.put(tworkflowid, newcount1);
}
//newremarkwfcount1List.add(""+newcount1);
}
}
int wftindex = wftypeList.indexOf(tworkflowtype) ;
if(wftindex != -1) {
wftypecountList.set(wftindex,""+(Util.getIntValue((String)wftypecountList.get(wftindex), 0)+theworkflowcount)) ;
}
totalcount += theworkflowcount;
}
// newremarkwfcount0List.add(""+newcount);
//newremarkwfcount1List.add(""+newcount1);
int overtimecount=0;
// if(templist.size()==2){
sqlsb = new StringBuffer();
sqlsb.append("select a.workflowtype,a.workflowid, count(distinct a.requestid) overcount ");
sqlsb.append(" from workflow_currentoperator a ");
sqlsb.append(" where ((((isremark=0 and (takisremark is null or takisremark=0 )) and (isprocessed = '2' or isprocessed = '3')) or ");
sqlsb.append(" isremark = '5') ");
sqlsb.append(" and islasttimes = 1 ");
if(!"".equals(cursltwftypeid)){
sqlsb.append(" and workflowtype in (").append(cursltwftypeid).append(")");
}
//if(!"".equals(cursltwfid)){
// sqlsb.append(" and workflowid = ").append(cursltwfid);
//}
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
if(!"".equals(wftypesb.toString())){
sqlsb.append(" and a.workflowtype in (").append(wftypesb).append(")");
}
if(!"".equals(wfsb.toString())){
sqlsb.append(" and a.workflowid in (").append(wfsb).append(")");
}
sqlsb.append(" and exists (select 1 ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.workflowid = a.workflowid ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(" and c.requestid = a.requestid)");
//SQL = "select count(distinct a.requestid) overcount from workflow_currentoperator a where ((isremark='0' and (isprocessed='2' or isprocessed='3')) or isremark='5') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and a.workflowtype="+tworkflowtype+" and a.workflowid ="+tworkflowid+" and exists (select 1 from workflow_requestbase c where c.workflowid=a.workflowid and c.requestid=a.requestid)" ;
if(!"".equals(tworkflowNodeIDs)){
sqlsb.append(" and a.nodeid in (" + WorkflowVersion.getAllRelationNodeStringByNodeIDs(tworkflowNodeIDs) + ") ");
}
if(!superior)
{
// sqlsb.append(" AND EXISTS (SELECT 1 FROM workFlow_CurrentOperator b WHERE b.islasttimes='1' AND b.userid=" + user.getUID() + " and b.usertype= " + usertype + ") ");
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE a.workflowid = b.workflowid AND a.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
sqlsb.append(" GROUP BY a.workflowtype, a.workflowid ");
RecordSet.executeSql(sqlsb.toString()) ;
//System.out.println("3 = "+sqlsb.toString());
while (RecordSet.next()) {
String tworkflowtype = Util.null2String(RecordSet.getString("workflowtype"));
String tworkflowid = WorkflowVersion.getActiveVersionWFID(Util.null2String(RecordSet.getString("workflowid")));
overtimecount=RecordSet.getInt("overcount");
int wfindex = workflowList.indexOf(tworkflowid) ;
if(wfindex != -1) {
workflowcountList.set(wfindex,""+(Util.getIntValue((String)workflowcountList.get(wfindex),0) + overtimecount)) ;
}
int wftindex = wftypeList.indexOf(tworkflowtype) ;
if(wftindex != -1) {
wftypecountList.set(wftindex,""+(Util.getIntValue((String)wftypecountList.get(wftindex),0)+overtimecount)) ;
}
Object tempobj = wfovertimecountMap.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
wfovertimecountMap.put(tworkflowid, wf0countindex + overtimecount);
} else {
wfovertimecountMap.put(tworkflowid, overtimecount);
}
totalcount += overtimecount;
}
//求被督办的流程,和其他查询不冲突
sqlsb = new StringBuffer();
sqlsb.append("select a.workflowtype, a.workflowid, count(0) workflowcount ");
sqlsb.append(" from workflow_currentoperator a ");
sqlsb.append(" where ((isremark = '0' and (isprocessed is null or ");
sqlsb.append(" (isprocessed <> '2' and isprocessed <> '3'))) or isremark = '1' or ");
sqlsb.append(" isremark = '8' or isremark = '9' or isremark = '7') ");
sqlsb.append(" and islasttimes = 1 ");
if(!"".equals(cursltwftypeid)){
sqlsb.append(" and workflowtype in (").append(cursltwftypeid).append(")");
}
sqlsb.append(" and userid = ").append(resourceid);
sqlsb.append(" and usertype = ").append(usertype);
if(!"".equals(wftypesb.toString())){
sqlsb.append(" and a.workflowtype in (").append(wftypesb).append(")");
}
if(!"".equals(wfsb.toString())){
sqlsb.append(" and a.workflowid in (").append(wfsb).append(")");
}
sqlsb.append(" and exists (select c.requestid ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.requestid = a.requestid");
sqlsb.append(" and ( select count(0) from workflow_requestlog where requestid = a.requestid and logtype='s') > 0");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
//SQL = "select a.viewtype, count(distinct a.requestid) workflowcount from workflow_currentoperator a where ((isremark='0' and (isprocessed is null or (isprocessed<>'2' and isprocessed<>'3'))) or isremark='1' or isremark='8' or isremark='9' or isremark='7') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and a.workflowtype="+tworkflowtype+" and a.workflowid="+tworkflowid+" and exists (select c.requestid from workflow_requestbase c where c.requestid=a.requestid) ";
if(!"".equals(tworkflowNodeIDs)){
sqlsb.append(" and a.nodeid in (" + WorkflowVersion.getAllRelationNodeStringByNodeIDs(tworkflowNodeIDs) + ") ");
}
if(!superior)
{
// sqlsb.append(" AND EXISTS (SELECT 1 FROM workFlow_CurrentOperator b WHERE b.islasttimes='1' AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE a.workflowid = b.workflowid AND a.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype + ") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
sqlsb.append(" GROUP BY a.workflowtype, a.workflowid");
RecordSet.executeSql(sqlsb.toString());
//System.out.println("4 = "+sqlsb.toString());
while (RecordSet.next()) {
String tworkflowtype = Util.null2String(RecordSet.getString("workflowtype"));
String tworkflowid = WorkflowVersion.getActiveVersionWFID(Util.null2String(RecordSet.getString("workflowid")));
overtimecount=RecordSet.getInt(3);
Object tempobj = wfsupedcountMap.get(tworkflowid);
if (tempobj != null) {
int wf0countindex = (Integer)tempobj ;
wfsupedcountMap.put(tworkflowid, wf0countindex + overtimecount);
} else {
wfsupedcountMap.put(tworkflowid, overtimecount);
}
}
for(int i=0; i<wftypecountList.size(); i++){
String t_wftypecount = (String)wftypecountList.get(i);
if("0".equals(t_wftypecount)){
wftypeList.remove(i);
wftypecountList.remove(i);
i--;
}
}
for(int i=0; i<workflowcountList.size(); i++){
String t_workflowcount = (String)workflowcountList.get(i);
if("0".equals(t_workflowcount)){
String tempworkflowid = (String)workflowList.get(i);
workflowcountList.remove(i);
//System.out.println((String)(workflowList.get(i)));
workflowList.remove(i);
newremarkwfcount0Map.remove(tempworkflowid);
newremarkwfcount1Map.remove(tempworkflowid);
//newremarkwfcount0List.remove(i);
//newremarkwfcount1List.remove(i);
wftypeworkflowList.remove(i);
i--;
}
}
/*******************************/
if (!"".equals(cursltwftypeid)) {
if (wftypeList.size() == 0) {
String[] curoptwfarrary = cursltwftypeid.split(",");
for (int i=0; i<curoptwfarrary.length; i++) {
wftypeList.add(curoptwfarrary[i]);
wftypecountList.add("0");
}
}
String _tempwfsql = "SELECT id FROM workflow_base WHERE workflowtype in (" + cursltwftypeid + ")";
RecordSet _temprs = new RecordSet();
_temprs.executeSql(_tempwfsql);
while (_temprs.next()) {
String _tempwfid = Util.null2String(_temprs.getString("id"));
if (!workflowList.contains(_tempwfid)) {
workflowList.add(_tempwfid);
workflowcountList.add("0");
}
}
}
//左侧树拼接 json
demoLeftMenus = "[";
for (int i = 0; i < wftypeList.size(); i++) {
typeid = (String) wftypeList.get(i);
typecount = (String) wftypecountList.get(i);
typename = WorkTypeComInfo.getWorkTypename(typeid);
String workFlowIDsRequest = "";
String workFlowNodeIDsRequest = "";
for (int j = 0; j < workflowList.size(); j++) {
workflowid = (String) workflowList.get(j);
String curtypeid = WorkflowComInfo.getWorkflowtype(workflowid);
if (!curtypeid.equals(typeid)) {
continue;
}
workFlowIDsRequest += workflowid + ",";
String t_workFlowNodeIDRequest = Util.null2String((String) wfNodeHahstable.get(workflowid));
if (!"".equals(t_workFlowNodeIDRequest)) {
workFlowNodeIDsRequest += t_workFlowNodeIDRequest + ",";
}
}
if (!"".equals(workFlowIDsRequest)) {
workFlowIDsRequest = workFlowIDsRequest.substring(0, workFlowIDsRequest.length());
}
if (!"".equals(workFlowNodeIDsRequest)) {
workFlowNodeIDsRequest = workFlowNodeIDsRequest.substring(0, workFlowNodeIDsRequest.length());
}
demoLeftMenus +="{";
demoLeftMenus+="\"__domid__\":\"__type_"+typeid+"\",";
int flowNew=0;
int flowResponse=0;
int flowOut=0;
int flowAll=0;
int flowSup=0;
List<Map> maps=new ArrayList(0);
for (int j = 0; j < workflowList.size(); j++) {
workflowid = (String) workflowList.get(j);
String curtypeid = WorkflowComInfo.getWorkflowtype(workflowid);
if (!curtypeid.equals(typeid))
continue;
workflowcount = (String) workflowcountList.get(j);
workflowname = WorkflowComInfo.getWorkflowname(workflowid);
int tempind = wftypeworkflowList.indexOf(typeid + "," + workflowid);
int ovtimenum = 0;
newremarkwfcount1 = "0";
newremarkwfcount0 = "0";
wfsupedcount = "0";
if (tempind > -1) {
Object tempovtimenumObj = wfovertimecountMap.get(workflowid);
if (tempovtimenumObj != null) {
ovtimenum = (Integer)tempovtimenumObj;
} else {
ovtimenum = 0;
}
Object tempnewremarkwfcount0Obj = newremarkwfcount0Map.get(workflowid);
if (tempnewremarkwfcount0Obj != null) {
newremarkwfcount0 = (Integer)tempnewremarkwfcount0Obj + "";
} else {
newremarkwfcount0 = "0";
}
Object tempnewremarkwfcount1Obj = newremarkwfcount1Map.get(workflowid);
if (tempnewremarkwfcount1Obj != null) {
newremarkwfcount1 = (Integer)tempnewremarkwfcount1Obj + "";
} else {
newremarkwfcount1 = "0";
}
Object tempwfsupedcountObj = wfsupedcountMap.get(workflowid);
if (tempwfsupedcountObj != null) {
wfsupedcount = (Integer)tempwfsupedcountObj + "";
} else {
wfsupedcount = "0";
}
}
String t_nodeids = Util.null2String((String) wfNodeHahstable.get(workflowid));
Map map=new HashMap();
map.put("name",Util.toScreen(workflowname, user.getLanguage()));
map.put("workflowid",workflowid);
map.put("nodeids",t_nodeids);
map.put("flowNew",Util.toScreen(newremarkwfcount0, user.getLanguage()));
map.put("flowResponse",Util.toScreen(newremarkwfcount1, user.getLanguage()));
map.put("flowOut",ovtimenum);
map.put("flowAll",Util.toScreen(workflowcount,user.getLanguage()));
map.put("flowSup",Util.toScreen(wfsupedcount, user.getLanguage()));
flowNew+=Integer.valueOf(map.get("flowNew")+"");
flowResponse+=Integer.valueOf(map.get("flowResponse")+"");
flowOut+=Integer.valueOf(map.get("flowOut")+"");
flowAll+=Integer.valueOf(map.get("flowAll")+"");
flowSup+=Integer.valueOf(map.get("flowSup")+"");
maps.add(map);
}
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":"+flowNew+",";
demoLeftMenus += "\"flowResponse\":"+flowResponse+",";
demoLeftMenus += "\"flowOut\":"+flowOut+",";
demoLeftMenus += "\"flowAll\":"+flowAll+",";
demoLeftMenus += "\"flowSup\":"+flowSup;
demoLeftMenus += "},";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"typeid\":"+typeid+",";
demoLeftMenus += "\"flowNew\":"+flowNew+",";
demoLeftMenus += "\"flowResponse\":"+flowResponse+",";
demoLeftMenus += "\"flowOut\":"+flowOut+",";
demoLeftMenus += "\"flowAll\":"+flowAll+",";
demoLeftMenus += "\"flowSup\":"+flowSup;
demoLeftMenus += "}";
demoLeftMenus += "}";
if (maps.size() > 0) {
demoLeftMenus += ",";
}
for(int x=0;x<maps.size();x++){
Map map=maps.get(x);
demoLeftMenus += "{";
demoLeftMenus+="\"__domid__\":\"__wf_"+map.get("workflowid")+"\",";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus += "\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus += "\"flowOut\":"+map.get("flowOut")+",";
demoLeftMenus += "\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus += "\"flowSup\":"+map.get("flowSup");
demoLeftMenus += "},";
demoLeftMenus += "\"attr\":{";
demoLeftMenus += "\"workflowid\":"+map.get("workflowid")+",";
demoLeftMenus += "\"flowNew\":"+map.get("flowNew")+",";
demoLeftMenus += "\"flowResponse\":"+map.get("flowResponse")+",";
demoLeftMenus += "\"flowOut\":"+map.get("flowOut")+",";
demoLeftMenus += "\"flowAll\":"+map.get("flowAll")+",";
demoLeftMenus += "\"flowSup\":"+map.get("flowSup");
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += (x==maps.size()-1)?"":",";
}
if (i < wftypeList.size() - 1) {
demoLeftMenus += ",";
}
}
RecordSet rs1 = new RecordSet();
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
//EAS流程类型查询里列表
String eas_workflowinfo = Util.null2String(rs.getPropValue("eas","workflowtypeview"));
String eas_requestinfo = Util.null2String(rs.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(rs.getPropValue("eas","linkname"));
String loginid = eu.getLoginid(user);
//查询EAS的流程分类数据
int eas_wftype_count = 0 ;
rs.executeSql("select * from openquery("+eas_linkname+",'select FCategoryID,FCategory,FCategorySeq from "+eas_workflowinfo+" group by FCategoryID,FCategory,FCategorySeq order by FCategorySeq')");
eas_wftype_count = rs.getCounts();
if(eas_wftype_count >0 ){
//demoLeftMenus+=",";
}
while(rs.next()){
String _typeid = rs.getString(1);
String _typename = rs.getString(2);
if(demoLeftMenus.length()>10){
demoLeftMenus +=",";
}
int eas_wf_count = 0 ;
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select fid,fname,fworkflowid from "+eas_workflowinfo+" where FCategoryID="+_typeid+" order by fseq')");//查询EAS流程
eas_wf_count = RecordSet.getCounts();
int wfcountall = 0 ;
while(RecordSet.next()){
String _wfid = RecordSet.getString(1);
String _wfname = RecordSet.getString(2);
String _fworkflowid = Util.null2String(RecordSet.getString("fworkflowid"));
rs1.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' AND FWorkFlowID=''"+_fworkflowid+"'' and FState=''1'' ')");
int wfcount = 0;
if(rs1.next()){
wfcount = Util.getIntValue(rs1.getString(1),0);
}
wfcountall += wfcount ;
//if(wfcount>0){
demoLeftMenus += "{";
//demoLeftMenus += "\"name\":\""+_wfname+"\",";
demoLeftMenus+="\"__domid__\":\"__wf_"+_wfid+"\",";
//demoLeftMenus += "\"hasChildren\":false,";
demoLeftMenus += "\"attr\":{";
//demoLeftMenus += "\"workflowid\":"+_wfid+",";
//demoLeftMenus += "\"nodeids\":\"\",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcount+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
demoLeftMenus += ",";
//}
}
//if(eas_wf_count>0){
// demoLeftMenus = demoLeftMenus.substring(0,demoLeftMenus.length()-1);
//}
//demoLeftMenus += ",";
demoLeftMenus += "{";
demoLeftMenus+=" \"__domid__\":\"__type_"+_typeid+"\",";
demoLeftMenus += "\"attr\":{";
//demoLeftMenus += "\"typeid\":"+_typeid+",";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "},";
demoLeftMenus += "\"numbers\":{";
demoLeftMenus += "\"flowNew\":0,";
demoLeftMenus += "\"flowResponse\":0,";
demoLeftMenus += "\"flowOut\":0,";
demoLeftMenus += "\"flowAll\":"+wfcountall+",";
demoLeftMenus += "\"flowSup\":0";
demoLeftMenus += "}";
demoLeftMenus += "}";
}
demoLeftMenus += "]";
out.print(demoLeftMenus);
//System.out.print(demoLeftMenus);
%>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,723 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea" %>
<%@ taglib uri="/browserTag" prefix="brow"%>
<!--added by xwj for td2023 on 2005-05-20-->
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.workflow.search.WfAdvanceSearchUtil" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.*,weaver.workflow.request.WFWorkflows,weaver.workflow.request.WFWorkflowTypes"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="WorkflowComInfo" class="weaver.workflow.workflow.WorkflowComInfo" scope="page"/>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page"/>
<jsp:useBean id="SearchClause" class="weaver.search.SearchClause" scope="session"/>
<jsp:useBean id="CustomerInfo" class="weaver.crm.Maint.CustomerInfoComInfo" scope="page"/>
<jsp:useBean id="WorkTypeComInfo" class="weaver.workflow.workflow.WorkTypeComInfo" scope="page"/>
<jsp:useBean id="WFUrgerManager" class="weaver.workflow.request.WFUrgerManager" scope="page" />
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<jsp:useBean id="ProjectInfoComInfo" class="weaver.proj.Maint.ProjectInfoComInfo" scope="page" />
<jsp:useBean id="DocComInfo" class="weaver.docs.docs.DocComInfo" scope="page" />
<jsp:useBean id="TimeUtil" class="weaver.general.TimeUtil" scope="page" />
<!--以下是显示定制组件所需的js -->
<script type="text/javascript" src="/js/dragBox/parentShowcol_wev8.js"></script>
<link rel="stylesheet" href="/css/ecology8/request/requestView_wev8.css" type="text/css" />
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<SCRIPT type="text/javascript" src="../../js/weaver_wev8.js"></script>
</head>
<%
String imagefilename = "/images/hdDOC_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ":" + SystemEnv.getHtmlLabelName(648, user.getLanguage());
String needfav = "1";
String needhelp = "";
%>
<BODY>
<FORM id=frmmain name=frmmain method=post action="WFSuperviseList.jsp">
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
String method = Util.null2String(request.getParameter("method"));
String objid = Util.null2String(request.getParameter("objid"));
String workflowid = Util.null2String(request.getParameter("workflowid"));
String nodetype = Util.null2String(request.getParameter("nodetype"));
String creatertype = Util.null2String(request.getParameter("creatertype"));
String requestlevel = Util.null2String(request.getParameter("requestlevel"));
//菜单点击workflow 点击的是流程 type 点击的是流程类型
String menutype = Util.null2String(request.getParameter("menutype"));
//菜单点击workflowid or worktypeid 依据menutype而定
String menuid = Util.null2String(request.getParameter("menuid"));
//菜单点击flowAll 所有流程;flowNew 未读流程;flowResponse 反馈的;flowOut 超时的
String complete = Util.null2String(request.getParameter("complete"));
//已督办2未督办1
String isdo = Util.null2String(request.getParameter("isdo"));
//创建日期标识
String datecondition=Util.null2String(request.getParameter("createdateselect"));
//接收日期标识
String recievedateselect = Util.null2String(request
.getParameter("recievedateselect"));
int ownerdepartmentid = Util.getIntValue(request.getParameter("ownerdepartmentid"),0);
int creatersubcompanyid=Util.getIntValue(request.getParameter("creatersubcompanyid"),0);
int createrid = Util.getIntValue(request.getParameter("createrid"),0);
int createrid2=Util.getIntValue(request.getParameter("createrid2"),0);
int unophrmid=Util.getIntValue(request.getParameter("unophrmid"),0);
String sqlwhere="";
boolean isnew = false;
//根据页面上(用户所输入的)查询方式来设置查询条件
if (method.equals("type")&&!objid.trim().equals("")) {
workflowid = "";
sqlwhere=" b.workflowtype="+objid;
}
if (method.equals("workflow")&&!objid.trim().equals("")) {
workflowid = objid;
sqlwhere=" b.id="+objid;
}
if (method.equals("request")&&!objid.trim().equals("")) {
String level = Util.null2String(request.getParameter("level"));
//类型级别
if (level.equals("1"))
{
workflowid = "";
sqlwhere=" b.workflowtype="+objid;
}else if (level.equals("2"))
{
workflowid = objid;
sqlwhere=" b.id="+objid;
}
isnew = true;
}
//如果当前流程ID列表为空则对其进行二次赋值
if(workflowid.equals("")){
//如果当前流程类型不为空则将流程类型的所有流程设置为流程ID列表
if(method.equals("type")&&!objid.trim().equals("")){
RecordSet.execute("select id from workflow_base where workflowtype="+objid);
while(RecordSet.next()){
int id_tmp = Util.getIntValue(RecordSet.getString(1), 0);
workflowid += (id_tmp+",");
}
if(!workflowid.equals("")){
workflowid = workflowid.substring(0, workflowid.length()-1);
}
}else{
//如果当前流程类型为空则从会话作用域中来获取流程ID列表
workflowid = SearchClause.getWorkflowId();
}
}
ArrayList flowList=Util.TokenizerString(workflowid,",");
//调用WFUrgerManager类获取当前用户的所有流程的流程督办的配置信息
int logintype = Util.getIntValue(user.getLogintype(),1);
int userID = user.getUID();
WFUrgerManager.setLogintype(logintype);
WFUrgerManager.setUserid(userID);
WFUrgerManager.setSqlwhere(sqlwhere);
WFUrgerManager.setWorkflowIDs(workflowid);
ArrayList wftypes=WFUrgerManager.getWrokflowTree();
String tmpTableName = WFUrgerManager.getTmpTableName();
String requestids = "";
String requestSql = "";
Map mapRequestIDs = new HashMap();
for(int i=0;i<wftypes.size();i++){
WFWorkflowTypes wftype=(WFWorkflowTypes)wftypes.get(i);
ArrayList workflows=wftype.getWorkflows();
for(int j=0;j<workflows.size();j++){
//if(j>0) break;
WFWorkflows wfObj=(WFWorkflows)workflows.get(j);
String tempWorkflow=wfObj.getWorkflowid()+"";
//查询的流程ID列表为空或者流程ID列表包含
if("".equals(workflowid) || flowList.contains(tempWorkflow)) {
ArrayList requests = null;
if(isnew){
requests=wfObj.getNewrequestids();
}else{
requests=wfObj.getReqeustids();
}
for(int k=0;k<requests.size();k++){
if(requestids.equals("")){
requestids=(String)requests.get(k);
}else{
requestids+=","+requests.get(k);
}
}
}
}
}
String newsql =" where (t1.currentnodetype is null or t1.currentnodetype<>'3') and t1.requestid=t2.requestid and t1.deleted<>1 ";
// =====================添加页面上的查询条件 Start =====================
if (!workflowid.equals("")){
//去掉最前边的逗号
while(workflowid.startsWith(",")){
workflowid = workflowid.substring(1);
}
newsql += " and t1.workflowid in(" + workflowid + ")";
}
//高级搜索条件
WfAdvanceSearchUtil conditionutil=new WfAdvanceSearchUtil(request,RecordSet);
String conditions=conditionutil.getAdVanceSearchCondition();
if(!conditions.equals(""))
{
newsql += conditions;
}
// =====================添加页面上的查询条件 END =====================
int perpage=10;
boolean hascreatetime =true;
boolean hascreater =true;
boolean hasworkflowname =true;
boolean hasrequestlevel =false;
boolean hasrequestname =true;
boolean hasreceivetime =false;
boolean hasstatus =false;
boolean hasreceivedpersons =true;
boolean hascurrentnode =true;
/*
RecordSet.executeProc("workflow_RUserDefault_Select",""+userID);
if(RecordSet.next()){
if(!Util.null2String(RecordSet.getString("hascreatetime")).equals("1")) hascreatetime=false;
if(!Util.null2String(RecordSet.getString("hascreater")).equals("1")) hascreater=false;
if(!Util.null2String(RecordSet.getString("hasworkflowname")).equals("1")) hasworkflowname=false;
if(!Util.null2String(RecordSet.getString("hasrequestlevel")).equals("1")) hasrequestlevel=false;
if(!Util.null2String(RecordSet.getString("hasrequestname")).equals("1")) hasrequestname=false;
if(!Util.null2String(RecordSet.getString("hasreceivetime")).equals("1")) hasreceivetime=false;
if(!Util.null2String(RecordSet.getString("hasstatus")).equals("1")) hasstatus=false;
if(!Util.null2String(RecordSet.getString("hasreceivedpersons")).equals("1")) hasreceivedpersons=false;
if(!Util.null2String(RecordSet.getString("hascurrentnode")).equals("1")) hascurrentnode=false;
perpage= RecordSet.getInt("numperpage");
}else{
RecordSet.executeProc("workflow_RUserDefault_Select","1");
if(RecordSet.next()){
if(!Util.null2String(RecordSet.getString("hascreatetime")).equals("1")) hascreatetime=false;
if(!Util.null2String(RecordSet.getString("hascreater")).equals("1")) hascreater=false;
if(!Util.null2String(RecordSet.getString("hasworkflowname")).equals("1")) hasworkflowname=false;
if(!Util.null2String(RecordSet.getString("hasrequestlevel")).equals("1")) hasrequestlevel=false;
if(!Util.null2String(RecordSet.getString("hasrequestname")).equals("1")) hasrequestname=false;
if(!Util.null2String(RecordSet.getString("hasreceivetime")).equals("1")) hasreceivetime=false;
if(!Util.null2String(RecordSet.getString("hasstatus")).equals("1")) hasstatus=false;
if(!Util.null2String(RecordSet.getString("hasreceivedpersons")).equals("1")) hasreceivedpersons=false;
if(!Util.null2String(RecordSet.getString("hascurrentnode")).equals("1")) hascurrentnode=false;
perpage= RecordSet.getInt("numperpage");
}
}
*/
perpage=10;
/*
if(!hascreatetime&&!hascreater&&!hasworkflowname&&!hasrequestlevel&&!hasrequestname&&!hasreceivetime&&!hasstatus&&!hasreceivedpersons&&!hascurrentnode){
hascreatetime =true;
hascreater =true;
hasworkflowname =true;
hasrequestlevel =true;
hasrequestname =true;
hasreceivetime =true;
hasstatus =true;
hasreceivedpersons =true;
hascurrentnode =true;
}
*/
//update by fanggsh 20060711 for TD4532 begin
boolean hasSubWorkflow =false;
//主要用于 显示定制列以及 表格 每页展示记录数选择
String pageIdStr = "7";
if(workflowid!=null&&!workflowid.equals("")&&workflowid.indexOf(",")==-1){
RecordSet.executeSql("select id from Workflow_SubWfSet where mainWorkflowId="+workflowid);
if(RecordSet.next()){
hasSubWorkflow=true;
}
}
// RCMenu += "{" + SystemEnv.getHtmlLabelName(18362, user.getLanguage()) + ",javascript:_table.lastPage(),_self}";
// RCMenuHeight += RCMenuHeightStep;
RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ",javascript:rightMenuSearch(),_self}";
RCMenuHeight += RCMenuHeightStep;
%>
<input type=hidden name=method value="<%=method%>">
<input type=hidden name=objid value="<%=objid%>">
<input type=hidden name=isdo value="<%=isdo %>">
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<link rel="stylesheet" href="/css/ecology8/request/requestTopMenu_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/ecology8/request/wfSearchResult_wev8.js"></script>
<table id="topTitle" cellpadding="0" cellspacing="0" >
<tr>
<td>
</td>
<td class="rightSearchSpan">
<input type="button" value="批量督办" style="font-size:12px" class="e8_btn_top middle" onclick="doReadFlagByBatch()">
<input type="text" class="searchInput" name="flowTitle" value="<%=Util.null2String(request.getParameter("requestname"))%>"/>
<span id="advancedSearch" class="advancedSearch">高级搜索</span>
<span title="菜单" class="cornerMenu"></span>
</td>
</tr>
</table>
<%
%>
<!--高级设置表单-->
<div class="advancedSearchDiv" id="advancedSearchDiv">
<wea:layout type="4col">
<wea:group context="<%=SystemEnv.getHtmlLabelName(32905,user.getLanguage())%>">
<wea:item><%=SystemEnv.getHtmlLabelName(229, user.getLanguage())%></wea:item>
<wea:item>
<input class=inputstyle type="text" name="requestname" style='width:80%' value="<%=Util.null2String(request.getParameter("requestname"))%>">
<input class=inputstyle type="hidden" name="pageId" id="pageId" value="<%= PageIdConst.getWFPageId(pageIdStr) %>"/>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(714, user.getLanguage())%></wea:item>
<wea:item> <input class=inputstyle type="text" name="workcode" style='width:80%' value="<%=Util.null2String(request.getParameter("workcode"))%>" ></wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15534, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle name=requestlevel size=1>
<option value=""></option>
<option value="0"
<% if(requestlevel.equals("0")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(225, user.getLanguage())%>
</option>
<option value="1"
<% if(requestlevel.equals("1")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(15533, user.getLanguage())%>
</option>
<option value="2"
<% if(requestlevel.equals("2")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(2087, user.getLanguage())%>
</option>
</select>
</wea:item>
<wea:item ><%=SystemEnv.getHtmlLabelName(882, user.getLanguage())%></wea:item>
<wea:item >
<span style="float:left;">
<select class=inputstyle name=creatertype onchange="changeType(this.value,'createridselspan','createrid2selspan');">
<%if (!user.getLogintype().equals("2")) {%>
<option value="0"
<% if(creatertype.equals("0")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(362, user.getLanguage())%>
</option>
<%}%>
<option value="1"
<% if(creatertype.equals("1")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(136, user.getLanguage())%>
</option>
</select>
</span>
<span id="createridselspan" style="<%=(creatertype.equals("0") || creatertype.equals(""))?"":"display:none;float:left;" %>">
<brow:browser viewType="0" name="createrid" browserValue="<%= createrid+"" %>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" width="150px" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" browserSpanValue="<%=Util.toScreen(ResourceComInfo.getResourcename(createrid+""),user.getLanguage())%>">
</brow:browser>
</span>
<span id="createrid2selspan" style="<%=!(creatertype.equals("0") || creatertype.equals(""))?"":"display:none;float:left;" %>">
<brow:browser viewType="0" name="createrid2" browserValue="<%= createrid2+"" %>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/CRM/data/CustomerBrowser.jsp" hasInput="true" width="150px" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=7" browserSpanValue="<%=Util.toScreen(CustomerInfo.getCustomerInfoname(createrid2+""),user.getLanguage())%>">
</brow:browser>
</span>
</wea:item>
</wea:group>
<wea:group context="<%=SystemEnv.getHtmlLabelName(32843,user.getLanguage())%>" attributes="{'itemAreaDisplay':'none'}">
<wea:item><%=SystemEnv.getHtmlLabelName(19225, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="ownerdepartmentid" browserValue="<%= ""+ownerdepartmentid %>" browserOnClick="" browserUrl="/hrm/company/DepartmentBrowser.jsp?selectedids=" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=4" width="80%" browserSpanValue="<%=ownerdepartmentid!=0?Util.toScreen(DepartmentComInfo.getDepartmentname(ownerdepartmentid+""),user.getLanguage()):""%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(22788, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="creatersubcompanyid" browserValue="<%= ""+creatersubcompanyid %>" browserOnClick="" browserUrl="/hrm/company/SubcompanyBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=164" width="80%" browserSpanValue="<%=creatersubcompanyid!=0?Util.toScreen(SubCompanyComInfo.getSubCompanyname(creatersubcompanyid+""),user.getLanguage()):""%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(17994, user.getLanguage())%></wea:item>
<wea:item attributes="{colspan:3}">
<span class="wuiDateSpan" selectId="recievedateselect" selectValue="">
<input class=wuiDateSel type="hidden" name="recievedatefrom" value="<%=Util.null2String(request.getParameter("recievedatefrom"))%>">
<input class=wuiDateSel type="hidden" name="recievedateto" value="<%=Util.null2String(request.getParameter("recievedateto"))%>">
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(722, user.getLanguage())%></wea:item>
<wea:item attributes="{colspan:3}">
<span class="wuiDateSpan" selectId="createdateselect" selectValue="">
<input class=wuiDateSel type="hidden" name="createdatefrom" value="<%=Util.null2String(request.getParameter("createdatefrom"))%>">
<input class=wuiDateSel type="hidden" name="createdateto" value="<%=Util.null2String(request.getParameter("createdateto"))%>">
</span>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(19061, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name=wfstatu>
<option value="">&nbsp;</option>
<option value="1"
<% if(Util.null2String(request.getParameter("wfstatu")).equals("1")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(2246, user.getLanguage())%>
</option>
<option value="0"
<% if(Util.null2String(request.getParameter("wfstatu")).equals("0")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(2245, user.getLanguage())%>
</option>
<option value="2"
<% if(Util.null2String(request.getParameter("wfstatu")).equals("2")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(332, user.getLanguage())%>
</option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(15536, user.getLanguage())%></wea:item>
<wea:item>
<select class=inputstyle size=1 name=nodetype>
<option value="">&nbsp;</option>
<option value="0"
<% if(nodetype.equals("0")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(125, user.getLanguage())%>
</option>
<option value="1"
<% if(nodetype.equals("1")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(142, user.getLanguage())%>
</option>
<option value="2"
<% if(nodetype.equals("2")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(725, user.getLanguage())%>
</option>
<option value="3"
<% if(nodetype.equals("3")) {%>selected<%}%>><%=SystemEnv.getHtmlLabelName(251, user.getLanguage())%>
</option>
</select>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(16354, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="unophrmid" browserValue="<%= ""+unophrmid %>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" width="80%" browserSpanValue="<%=unophrmid!=0?Util.toScreen(ResourceComInfo.getResourcename(unophrmid+""),user.getLanguage()):""%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(857, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="docids" browserValue="<%=Util.null2String(request.getParameter("docids"))%>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/docs/docs/DocBrowser.jsp?isworkflow=1" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=9" width="80%" browserSpanValue="<%=Util.toScreen(DocComInfo.getDocname(Util.null2String(request.getParameter("docids"))+""),user.getLanguage())%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(179, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="hrmids" browserValue="<%=Util.null2String(request.getParameter("hrmids"))%>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp" width="80%" browserSpanValue="<%=Util.toScreen(ResourceComInfo.getResourcename(Util.null2String(request.getParameter("hrmids"))+""),user.getLanguage())%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(783, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="crmids" browserValue="<%=Util.null2String(request.getParameter("crmids"))%>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/CRM/data/CustomerBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=18" width="80%" browserSpanValue="<%=Util.toScreen(CustomerInfo.getCustomerInfoname(Util.null2String(request.getParameter("crmids"))+""),user.getLanguage())%>"> </brow:browser>
</wea:item>
<wea:item><%=SystemEnv.getHtmlLabelName(782, user.getLanguage())%></wea:item>
<wea:item>
<brow:browser viewType="0" name="proids" browserValue="<%=Util.null2String(request.getParameter("proids"))%>" browserOnClick="" browserUrl="/systeminfo/BrowserMain.jsp?url=/proj/data/ProjectBrowser.jsp" hasInput="true" isSingle="true" hasBrowser = "true" isMustInput='1' completeUrl="/data.jsp?type=135" width="80%" browserSpanValue="<%=Util.toScreen(ProjectInfoComInfo.getProjectInfoname(Util.null2String(request.getParameter("proids"))+""),user.getLanguage())%>"> </brow:browser>
</wea:item>
<wea:item></wea:item>
</wea:group>
<wea:group context="">
<wea:item type="toolbar">
<input type="submit" value="<%=SystemEnv.getHtmlLabelName(197, user.getLanguage())%>" class="e8_btn_submit"/>
<span class="e8_sep_line">|</span>
<input type="button" type="reset" onclick="resetCondtion()"; name="reset" value="<%=SystemEnv.getHtmlLabelName(2022, user.getLanguage())%>" class="e8_btn_cancel" >
<span class="e8_sep_line">|</span>
<input type="button" value="<%=SystemEnv.getHtmlLabelName(201, user.getLanguage())%>" class="e8_btn_cancel" id="cancel"/>
</wea:item>
</wea:group>
</wea:layout>
</div>
<TABLE width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<%
String tableString = "";
String fromSql = "";
String sqlWhere = newsql;
String backfields = " t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid, t1.requestname,t1.requestnamenew, t1.status,t1.requestlevel,t1.currentnodeid,t2.receivedatetime";
if(RecordSet.getDBType().equals("oracle")){
fromSql = " from (select requestid,max(receivedate||' '||receivetime) as receivedatetime from workflow_currentoperator group by requestid) t2,workflow_requestbase t1 ";
}else{
fromSql = " from (select requestid,max(receivedate+' '+receivetime) as receivedatetime from workflow_currentoperator group by requestid) t2,workflow_requestbase t1 ";
}
if (!requestids.equals("")) {
if (isnew) {
sqlWhere += " AND t1.requestid in("+requestids+") ";
}
}else{
sqlWhere+=" and 1>2 ";
}
if(RecordSet.getDBType().equals("oracle"))
{
sqlWhere += " and (nvl(t1.currentstatus,-1) = -1 or (nvl(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ";
}
else
{
sqlWhere += " and (isnull(t1.currentstatus,-1) = -1 or (isnull(t1.currentstatus,-1)=0 and t1.creater="+user.getUID()+")) ";
}
String table1 = "select " + backfields + fromSql + sqlWhere;
backfields = " t1.requestid, t1.createdate, t1.createtime,t1.creater, t1.creatertype, t1.workflowid, t1.requestname, t1.requestnamenew, t1.status,t1.requestlevel,t1.currentnodeid,t1.receivedatetime";
fromSql =" from ("+table1+") t1 ";
if(tmpTableName != null) {
fromSql += " ,(Select requestId from "+tmpTableName+") t2 ";
sqlWhere = " where t1.requestid=t2.requestid ";
} else {
sqlWhere = "";
}
//已督办
if(isdo.equals("2"))
sqlWhere += " and (select count(0) from workflow_requestlog where requestid =t2.requestid and logtype='s' and operator="+user.getUID()+")>0 ";
//未督办
else if(isdo.equals("1"))
sqlWhere += " and (select count(0) from workflow_requestlog where requestid =t2.requestid and logtype='s' and operator="+user.getUID()+")=0 ";
if(menutype.equals("workflow"))
sqlWhere += " and t1.workflowid='"+menuid+"' ";
else if(menutype.equals("type"))
sqlWhere += " and (select count(0) from workflow_base where id=t1.workflowid and workflowtype='"+menuid+"')>0 ";
//未读流程
if(complete.equals("3"))
sqlWhere += " and (select count(0) from workflow_requestviewlog where id=t2.requestid and currentnodeid = t1.currentnodeid and viewer="+user.getUID()+")=0";
//反馈流程
else if(complete.equals("4"));
//超时流程
else if(complete.equals("8"));
String popeUrgepara = "column:requestid+column:workflowid+"+user.getUID()+"+"+(logintype-1)+"+"+ user.getLanguage();
String operateString= "";
operateString = "<operates>";
operateString +=" <popedom transmethod=\"weaver.general.WorkFlowTransMethod.getWfUrgerNewOperation\" otherpara=\""+popeUrgepara+"\" ></popedom> ";
//operateString +=" <operate href=\"javascript:doReadFlag();\" text=\"标记为已读\" index=\"0\"/>";
operateString +="</operates>";
String orderby = " t1.receivedatetime ";
String para2 = "column:requestid+column:workflowid+"+userID+"+"+(logintype-1)+"+"+ user.getLanguage();
String para4=user.getLanguage()+"+"+user.getUID();
System.out.println("selct "+backfields +" from "+fromSql+" where "+sqlWhere+" order by "+orderby);
tableString = " <table instanceid=\"workflowRequestListTable\" tabletype=\"checkbox\" pagesize=\"" +PageIdConst.getPageSize(PageIdConst.getWFPageId(pageIdStr),user.getUID())+ "\" >" +
" <sql backfields=\"" + backfields + "\" sqlform=\"" + Util.toHtmlForSplitPage(fromSql) + "\" sqlwhere=\"" + Util.toHtmlForSplitPage(sqlWhere) + "\" sqlorderby=\"" + orderby + "\" sqlprimarykey=\"t1.requestid\" sqlsortway=\"Desc\" sqlisdistinct=\"true\" />" +
operateString +
" <head>";
tableString += "<col width=\"19%\" display=\""+hasrequestname+"\" text=\"" + SystemEnv.getHtmlLabelName(1334, user.getLanguage()) + "\" column=\"requestname\" orderkey=\"t1.requestname\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_fullwindow\" transmethod=\"weaver.general.WorkFlowTransMethod.getWfNewLinkByUrger\" otherpara=\"" + para2 + "\"/>";
tableString += "<col width=\"10%\" display=\""+hasworkflowname+"\" text=\"" + SystemEnv.getHtmlLabelName(259, user.getLanguage()) + "\" column=\"workflowid\" orderkey=\"t1.workflowid\" transmethod=\"weaver.workflow.workflow.WorkflowComInfo.getWorkflowname\" />";
tableString += "<col width=\"6%\" display=\""+hascreater+"\" text=\"" + SystemEnv.getHtmlLabelName(882, user.getLanguage()) + "\" column=\"creater\" orderkey=\"t1.creater\" otherpara=\"column:creatertype\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultName\" />";
tableString += "<col width=\"10%\" display=\""+hascreatetime+"\" text=\"" + SystemEnv.getHtmlLabelName(722, user.getLanguage()) + "\" column=\"createdate\" orderkey=\"t1.createdate,t1.createtime\" otherpara=\"column:createtime\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultCreateTime\" />";
tableString += "<col width=\"8%\" display=\""+hasrequestlevel+"\" text=\"" + SystemEnv.getHtmlLabelName(15534, user.getLanguage()) + "\" column=\"requestlevel\" orderkey=\"t1.requestlevel\" transmethod=\"weaver.general.WorkFlowTransMethod.getWFSearchResultUrgencyDegree\" otherpara=\"" + user.getLanguage() + "\"/>";
tableString += "<col width=\"8%\" display=\""+hascurrentnode+"\" text=\"" + SystemEnv.getHtmlLabelName(524, user.getLanguage()) + SystemEnv.getHtmlLabelName(15586, user.getLanguage()) + "\" column=\"currentnodeid\" transmethod=\"weaver.general.WorkFlowTransMethod.getCurrentNode\"/>";
tableString += "<col width=\"10%\" display=\""+hasreceivetime+"\" text=\"" + SystemEnv.getHtmlLabelName(17994, user.getLanguage()) + "\" column=\"receivedatetime\" orderkey=\"t1.receivedatetime\" />";
tableString += "<col width=\"8%\" display=\""+hasstatus+"\" text=\"" + SystemEnv.getHtmlLabelName(1335, user.getLanguage()) + "\" column=\"status\" orderkey=\"t1.status\" />";
tableString += "<col width=\"15%\" display=\""+hasreceivedpersons+"\" text=\"" + SystemEnv.getHtmlLabelName(16354, user.getLanguage()) + "\" column=\"requestid\" otherpara=\"" + para4 + "\" transmethod=\"weaver.general.WorkFlowTransMethod.getUnOperators\"/>";
tableString += "<col width=\"6%\" display=\""+hasSubWorkflow+"\" text=\"" + SystemEnv.getHtmlLabelName(19363, user.getLanguage()) + "\" column=\"requestid\" orderkey=\"t1.requestid\" linkkey=\"requestid\" linkvaluecolumn=\"requestid\" target=\"_self\" transmethod=\"weaver.general.WorkFlowTransMethod.getSubWFLink\" otherpara=\"" + user.getLanguage() + "\"/>";
tableString += " </head>" +
"</table>";
%>
<wea:SplitPageTag tableString="<%=tableString%>" mode="run"/>
</td>
</tr>
</TABLE>
<div id='divshowreceivied' style='background:#FFFFFF;padding:3px;width:100%' valign='top'>
</div>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
</form>
</body>
<script type="text/javascript">
function rightMenuSearch(){
if(jQuery("#advancedSearchOuterDiv").css("display")!="none"){
document.frmmain.submit();
}else{
try{
jQuery("span#searchblockspan",parent.document).find("img:first").click();
}catch(e){
document.frmmain.submit();
}
}
}
function changeType(type,span1,span2){
if(type=="1"){
jQuery("#"+span1).hide();
jQuery("#"+span2).show();
}else{
jQuery("#"+span2).hide();
jQuery("#"+span1).show();
}
}
var dialog = null;
//批处理
function doReadFlagByBatch()
{
if(_xtable_CheckedCheckboxId()=="")
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(20149,user.getLanguage())%>");
else
{
//批量督办
var reqids = _xtable_CheckedCheckboxId();
dialog = new window.top.Dialog();
dialog.currentWindow = window;
var url = "/workflow/search/WFSuperviseSignature.jsp?reqids="+reqids;
dialog.Title = "<%=SystemEnv.getHtmlLabelName(26039,user.getLanguage())%>";
dialog.Width = 450;
dialog.Height = 227;
dialog.Drag = true;
dialog.URL = url;
dialog.show();
}
}
//标记为已读
function doReadFlag(requestid,params,obj){
var ajax=ajaxinit();
ajax.open("POST", "WFSuperviseDoFlag.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
var rsdata=$.trim(ajax.responseText);
if(rsdata==="success")
{
_table. reLoad();
}
}catch(e){
}
}
}
}
function onShowWorkFlow(inputname, spanname) {
onShowWorkFlowBase(inputname, spanname, false);
}
function onShowWorkFlowBase(inputname, spanname, needed) {
var retValue = window.showModalDialog("/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkflowBrowser.jsp", "", "dialogWidth:550px;dialogHeight:550px;");
if (retValue != null) {
if (wuiUtil.getJsonValueByIndex(retValue, 0) != "" ) {
$GetEle(spanname).innerHTML = wuiUtil.getJsonValueByIndex(retValue, 1);
$GetEle(inputname).value = wuiUtil.getJsonValueByIndex(retValue, 0);
$GetEle("objid").value = wuiUtil.getJsonValueByIndex(retValue, 0);
} else {
$GetEle(inputname).value = "";
if (needed) {
$GetEle(spanname).innerHTML = "<IMG src='/images/BacoError_wev8.gif' align=absMiddle>";
} else {
$GetEle(spanname).innerHTML = "";
}
$GetEle("objid").value = "";
}
}
}
</script>
<SCRIPT language="javascript">
jQuery("#topTitle").topMenuTitle({searchFn:searchItem});
var showTableDiv = document.getElementById('divshowreceivied');
var oIframe = document.createElement('iframe');
function showreceiviedPopup(content){
showTableDiv.style.display='';
var message_Div = document.createElement("div");
message_Div.id="message_Div";
message_Div.className="xTable_message";
showTableDiv.appendChild(message_Div);
var message_Div1 = document.getElementById("message_Div");
message_Div1.style.display="inline";
message_Div1.innerHTML=content;
var pTop= document.body.offsetHeight/2+document.body.scrollTop-50;
var pLeft= document.body.offsetWidth/2-50;
message_Div1.style.position="absolute"
message_Div1.style.top=pTop;
message_Div1.style.left=pLeft;
message_Div1.style.zIndex=1002;
oIframe.id = 'HelpFrame';
showTableDiv.appendChild(oIframe);
oIframe.frameborder = 0;
oIframe.style.position = 'absolute';
oIframe.style.top = pTop;
oIframe.style.left = pLeft;
oIframe.style.zIndex = message_Div1.style.zIndex - 1;
oIframe.style.width = parseInt(message_Div1.offsetWidth);
oIframe.style.height = parseInt(message_Div1.offsetHeight);
oIframe.style.display = 'block';
}
function ajaxinit(){
var ajax=false;
try {
ajax = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
ajax = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
ajax = false;
}
}
if (!ajax && typeof XMLHttpRequest!='undefined') {
ajax = new XMLHttpRequest();
}
return ajax;
}
function showallreceived(requestid,returntdid){
showreceiviedPopup("<%=SystemEnv.getHtmlLabelName(19205,user.getLanguage())%>");
var ajax=ajaxinit();
ajax.open("POST", "WorkflowUnoperatorPersons.jsp", true);
ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
ajax.send("requestid="+requestid+"&returntdid="+returntdid);
//获取执行状态
//alert(ajax.readyState);
//alert(ajax.status);
ajax.onreadystatechange = function() {
//如果执行状态成功,那么就把返回信息写到指定的层里
if (ajax.readyState==4&&ajax.status == 200) {
try{
document.getElementById(returntdid).innerHTML = ajax.responseText;
}catch(e){}
showTableDiv.style.display='none';
oIframe.style.display='none';
}
}
}
</script>
<SCRIPT language="javascript" src="/js/ecology8/request/wFCommonAdvancedSearch_wev8.js"></script>
<SCRIPT language="javascript" src="/js/datetime_wev8.js"></script>
<SCRIPT language="javascript" src="/js/JSDateTime/WdatePicker_wev8.js"></script>
</html>

View File

@ -0,0 +1,327 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="pack" class="weaver.general.ParameterPackage" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="ktm" class="weaver.general.KnowledgeTransMethod" scope="page" />
<script src="/js/tabs/jquery.tabs.extend_wev8.js"></script>
<link type="text/css" href="/js/tabs/css/e8tabs1_wev8.css" rel="stylesheet" />
<%
int isfrom = Util.getIntValue(request.getParameter("isfrom"),-1);
String navName = SystemEnv.getHtmlLabelName(1207, user.getLanguage());
String typeName="";
String workFlowName="";
String typeid=Util.null2String(request.getParameter("wftype"));
String workflowid=Util.null2String(request.getParameter("workflowid"));
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
if(offical.equals("1")){
if(officalType==1){
navName = SystemEnv.getHtmlLabelName(33769, user.getLanguage());
}else if(officalType==2){
navName = SystemEnv.getHtmlLabelName(33787, user.getLanguage());
}
}
//查询流程名
if(typeid!=null && typeid!=""){
StringBuffer typeSql= new StringBuffer();
typeSql.append("select typename from workflow_type where");
typeSql.append(" id= ").append(typeid);
RecordSet.execute(typeSql.toString());
if(RecordSet.next()){
typeName=Util.null2String(RecordSet.getString("typename"));
}
}
//查询工作流类型
if(workflowid!=null && workflowid!="" ){
StringBuffer workflowSql= new StringBuffer();
workflowSql.append("select workflowname from workflow_base where");
workflowSql.append(" id= ").append(workflowid);
RecordSet.execute(workflowSql.toString());
if(RecordSet.next()){
workFlowName=Util.null2String(RecordSet.getString("workflowname"));
}
}
if(workFlowName!="" ){
navName=workFlowName;
}else if(typeName!=""){
navName=typeName;
}
String currtab = Util.getIntValue(Util.null2String(request.getParameter("viewcondition")),0)+"";
%>
<script type="text/javascript">
//window.notExecute = true;
$(function(){
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
$('.e8_box').Tabs({
getLine:1,
mouldID:"<%= MouldIDConst.getID(offical.equals("1")?"offical":"workflow")%>",
staticOnLoad:true,
iframe:"tabcontentframe",
objName:"<%=Util.toScreenForJs(navName) %>"
});
attachUrl();
syloadTree();
showloading();
//$("#e8_tablogo,#e8TreeSwitch").bind("mouseover",syloadTree);
//$("#e8_tablogo,#e8TreeSwitch").bind("click",showloading);
});
function getNumCount(){
$.ajax({
type: "POST",
url: "/workflow/search/wfTabFrameCount.jsp",
data: { workflowid: "<%=workflowid%>", typeid: "<%=typeid%>",offical:"<%=offical%>",officalType:"<%=officalType%>" },
success:function(data){
if(!!data)
{
var __data = jQuery.trim(data)
if(__data != "")
{
var _dataJson = JSON.parse(__data);
$("#faNumSpn").text("("+_dataJson.flowAll+")");
$("#fnNumSpn").text("("+_dataJson.flowNew+")");
$("#frNumSpn").text("("+_dataJson.flowResponse+")");
$("#foNumSpn").text("("+_dataJson.flowOut+")");
$("#fsNumSpn").text("("+_dataJson.flowSup+")");
}
}
}
});
}
function attachUrl(){
var requestParameters=$(".requestParameterForm").serialize();
$("a[target='tabcontentframe']").each(function(){
var url = "/workflow/search/WFSearchTemp.jsp?"+requestParameters;
if($(this).attr("viewcondition")){
url += "&viewcondition="+$(this).attr("viewcondition");
}
if($(this).attr("sysId")){
url += "&sysId="+$(this).attr("sysId");
}
if($(this).attr("processId")){
url += "&processId="+$(this).attr("processId");
}
$(this).attr("href",url);
}).bind("click",function(){
var params = requestParameters;
if($(this).attr("viewcondition"))
params += "&viewcondition="+$(this).attr("viewcondition");
if($(this).attr("sysId")){
params += "&sysId="+$(this).attr("sysId");
}
if($(this).attr("processId")){
params += "&processId="+$(this).attr("processId");
}
});
$("[name='tabcontentframe']").attr("src",$("a[target='tabcontentframe'][viewcondition='<%=currtab%>']").attr("href"));
//if(window.console) console.log(""+$("[name='tabcontentframe']").attr("src"));
///workflow/search/WFSearchTemp.jsp?method=all&wftypes=&officalType=-1&viewScope=doing&isfrom=-1&offical=&complete=0&viewcondition=0
}
//异步加载树调用方法
function syloadTree()
{
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
if(loadtree === "true")
$("#e8_tablogo,#e8TreeSwitch").unbind("mouseover",syloadTree);
else if(loadtree === "loading"){}
else
{
window.parent.onloadtree();
$(window.parent.overFlowDiv).attr("loadtree","loading");
}
}
function showloading()
{
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
if(loadtree === "loading"){
window.parent.showloading();
}else if(loadtree === "true"){
$("#e8_tablogo,#e8TreeSwitch").unbind("click",showloading);
}
}
//回调刷新数量
function reloadLeftNum(){
var workflowid = "<%=workflowid%>";
var typeid = "<%=typeid%>";
var optkeys = window.__optkeys;
if(workflowid !="" || typeid !="" || (!!optkeys && optkeys != "")){
var url = "/workflow/request/RequestViewAjaxCount.jsp?<%=request.getQueryString() %>";
try {
url = parent.getajaxcounturl() + "&<%=request.getQueryString() %>";
} catch (e) {}
url += "&optkeys=" + optkeys;
parent.jQuery(".ulDiv").leftNumMenu(url,
"update",
null,
{
callback:function (menudata) {
for(var i=0;i<menudata.length;i++){
var menu = menudata[i];
var attr = menu.attr;
var __domid__ = menu.__domid__;
if(typeid != "" && __domid__.indexOf("type") > -1 ){
var __type_ = __domid__.split("type_")[1];
if(typeid == __type_){
$("#faNumSpn").text("("+attr.flowAll+")");
$("#fnNumSpn").text("("+attr.flowNew+")");
$("#frNumSpn").text("("+attr.flowResponse+")");
$("#foNumSpn").text("("+attr.flowOut+")");
$("#fsNumSpn").text("("+attr.flowSup+")");
}
}else if(workflowid != "" && __domid__.indexOf("wf") > -1 ){
var __wf_ = __domid__.split("wf_")[1];
if(workflowid == __wf_){
$("#faNumSpn").text("("+attr.flowAll+")");
$("#fnNumSpn").text("("+attr.flowNew+")");
$("#frNumSpn").text("("+attr.flowResponse+")");
$("#foNumSpn").text("("+attr.flowOut+")");
$("#fsNumSpn").text("("+attr.flowSup+")");
}
}
}
if (!!optkeys && optkeys.length > 0) {
getNumCount();
}
}
}
);
}else{
getNumCount();
}
}
</script>
</head>
<%
int flowNew=Util.getIntValue(Util.null2String(request.getParameter("flowNew")), 0);
int flowResponse=Util.getIntValue(Util.null2String(request.getParameter("flowResponse")), 0);
int flowAll=Util.getIntValue(Util.null2String(request.getParameter("flowAll")), 0);
int flowOut=Util.getIntValue(Util.null2String(request.getParameter("flowOut")), 0);
int flowSup = Util.getIntValue(Util.null2String(request.getParameter("flowSup")),0);
%>
<body scroll="no">
<div id="submitloaddingdiv_out" style="display:none;background:#000;width:100%;height:100%;top:0px;left:0px; bottom:0px;right:0px;position:absolute;top:0px;left:0px;z-index:9999;filter:alpha(opacity=20);-moz-opacity:0.2;opacity:0.2;">
</div>
<span id="submitloaddingdiv" style="display:none;height:48px;border:1px solid #9cc5db;background:#ebf8ff;color:#4c7c9f;line-height:48px;width:240px;position:absolute;z-index:9999;font-size:12px;">
<img src="/images/ecology8/workflow/multres/cg_lodding_wev8.gif" height="27px" width="57px" style="vertical-align:middle;"/><span style="margin-left:22px;">正在处理,请稍候...</span>
</span>
<div class="e8_box demo2">
<div class="e8_boxhead">
<div class="div_e8_xtree" id="div_e8_xtree"></div>
<div class="e8_tablogo" id="e8_tablogo"></div>
<div class="e8_ultab">
<div class="e8_navtab" id="e8_navtab">
<span id="objName"></span>
</div>
<div>
<ul class="tab_menu">
<li class="e8_tree">
<a onmouseover="syloadTree();"><%=SystemEnv.getHtmlLabelName(32452,user.getLanguage()) %></a>
</li>
<%if(offical.equals("1")){ %>
<li <%=(currtab.equals("0") || currtab.equals(""))?"class=current":"" %>>
<a href="" viewcondition='0' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(332, user.getLanguage()) %></a>
</li>
<%
String sql = "";
if(officalType==1){
sql = "select * from workflow_processdefine where status=1 and linktype in(1) order by sortorder";
}else if(officalType==2){
sql = "select * from workflow_processdefine where status=1 and linktype=2 order by sortorder";
}
RecordSet.executeSql(sql);
int vd = 6;
while(RecordSet.next()){
int processId = Util.getIntValue(RecordSet.getString("id"),0);
int sysId = Util.getIntValue(RecordSet.getString("sysid"),0);
String label = ktm.getLabel(RecordSet.getString("shownamelabel"),""+user.getLanguage());
if(label.equals(""))label = Util.null2String(RecordSet.getString("label"));
vd++;
%>
<li>
<a href="" viewcondition='<%=vd %>' sysId="<%=sysId %>" processId="<%=processId %>" target="tabcontentframe"><%=label %></a>
</li>
<%} %>
<%}else{ %>
<li <%=(currtab.equals("0") || currtab.equals(""))?"class=current":"" %>>
<a href="" viewcondition='0' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(332, user.getLanguage()) %><span id="faNumSpn">(<%=flowAll%>)</span></a>
</li>
<li <%=currtab.equals("1")?"class=current":"" %>>
<a href="" viewcondition='1' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(25426, user.getLanguage()) %><span id="fnNumSpn">(<%=flowNew%>)</span></a>
</li>
<li <%=currtab.equals("2")?"class=current":"" %>>
<a href="" viewcondition='2' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(21950, user.getLanguage()) %><span id="frNumSpn">(<%=flowResponse%>)</span></a>
</li>
<li <%=currtab.equals("3")?"class=current":"" %>>
<a href="" viewcondition='3' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(19081 , user.getLanguage()) %><span id="foNumSpn">(<%=flowOut%>)</span></a>
</li>
<li >
<a href="" viewcondition='4' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(33220 , user.getLanguage()) %><span id="fsNumSpn">(<%=flowSup%>)</span></a>
</li>
<%} %>
</ul>
<div id="rightBox" class="e8_rightBox">
</div>
</div>
</div>
</div>
<div class="tab_box">
<iframe src="" id="tabcontentframe" onload="update()" name="tabcontentframe" class="flowFrame" frameborder="0" height="100%" width="100%;"></iframe>
<form class="requestParameterForm">
<%
Enumeration<String> e=request.getParameterNames();
while(e.hasMoreElements()){
String paramenterName=e.nextElement();
String value=request.getParameter(paramenterName);
if(!paramenterName.equals("viewcondition")){
%>
<input type="hidden" name="<%=paramenterName %>" value="<%=value %>" class="requestParameters">
<% }
}
%>
</form>
</div>
</div>
</div>
</body>
<script type="text/javascript" defer>
var ttclick = self.setInterval("tempclick()",1000);
function tempclick(){
if($("#e8TreeSwitch").attr("id") != "undefined"){
$("#e8TreeSwitch").click();
window.clearInterval(ttclick);
}
}
</script>
</html>

View File

@ -0,0 +1,161 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.*" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<%@page import="weaver.hrm.HrmUserVarify"%>
<%@page import="weaver.hrm.User"%>
<%
String workflowid = Util.null2String(request.getParameter("workflowid"));
String typeid = Util.null2String(request.getParameter("typeid"));
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"));
User user = HrmUserVarify.getUser(request, response) ;
if (user == null ) return ;
List countArr = new ArrayList();
countArr.add("flowAll");
countArr.add("flowNew");
countArr.add("flowResponse");
countArr.add("flowOut");
countArr.add("flowSup");
if(typeid.equals("")&&workflowid.equals("") && !offical.equals("1")){
//开始进入
String logintype = ""+user.getLogintype();
int usertype = 0;
String resourceid= ""+Util.null2String((String) session.getAttribute("RequestViewResource"));
if(resourceid.equals("")) {
resourceid = ""+user.getUID();
if(logintype.equals("2")) usertype= 1;
session.removeAttribute("RequestViewResource") ;
}
else {
session.setAttribute("RequestViewResource",resourceid) ;
}
String CurrentUser = Util.null2String((String) request.getSession().getAttribute("RequestViewResource"));
if (logintype.equals("2"))
usertype = 1;
if (CurrentUser.equals("")) {
CurrentUser = "" + user.getUID();
}
boolean superior = false; //是否为被查看者上级或者本身
if ((user.getUID() + "").equals(CurrentUser)) {
superior = true;
} else {
RecordSet.executeSql("SELECT * FROM HrmResource WHERE ID = " + CurrentUser + " AND managerStr LIKE '%" + user.getUID() + "%'");
if (RecordSet.next()) {
superior = true;
}
}
if (superior)
CurrentUser = user.getUID() + "";
//System.out.println("superior=" + superior);
int flowNew = 0;
int flowResponse = 0;
int flowOut = 0;
int flowSup = 0;
int flowAll = 0;
for(int a=0;a<countArr.size();a++)
{
StringBuffer sqlsb = new StringBuffer();
sqlsb.append("select count(distinct a.requestid) wfCount ");
sqlsb.append(" from workflow_currentoperator a, workflow_base wb ");
if(countArr.get(a).equals("flowOut")){
sqlsb.append(" where (((isremark=0 and (takisremark is null or takisremark=0 )) and isprocessed <> '1' ) or isremark = '5') ");
}else if(countArr.get(a).equals("flowNew") || countArr.get(a).equals("flowResponse") || countArr.get(a).equals("flowSup")){
sqlsb.append(" where (((isremark=0 and (takisremark is null or takisremark=0 )) and (isprocessed is null or (isprocessed <> '2' and isprocessed <> '3'))) or isremark in('1','5','8','9','7')) ");
}else{
sqlsb.append(" where ((isremark=0 and (takisremark is null or takisremark=0 )) or isremark in('1','5','8','9','7')) ");
}
sqlsb.append(" and islasttimes = 1 ");
sqlsb.append(" and a.userid = ").append(resourceid);
sqlsb.append(" and a.usertype = ").append(usertype);
sqlsb.append(" and exists (select c.requestid ");
sqlsb.append(" from workflow_requestbase c ");
sqlsb.append(" where (c.deleted <> 1 or c.deleted is null or c.deleted='') and c.requestid = a.requestid");
sqlsb.append(" and a.workflowid=wb.id ");
sqlsb.append(" and wb.isvalid in (1, 3) ");
if(RecordSet.getDBType().equals("oracle"))
{
sqlsb.append(" and (nvl(c.currentstatus,-1) = -1 or (nvl(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
else
{
sqlsb.append(" and (isnull(c.currentstatus,-1) = -1 or (isnull(c.currentstatus,-1)=0 and c.creater="+user.getUID()+")) ");
}
sqlsb.append(")");
//SQL = "select a.viewtype, count(distinct a.requestid) workflowcount from workflow_currentoperator a where ((isremark='0' and (isprocessed is null or (isprocessed<>'2' and isprocessed<>'3'))) or isremark='1' or isremark='8' or isremark='9' or isremark='7') and islasttimes=1 and userid=" + resourceid + " and usertype= " + usertype +" and a.workflowtype="+tworkflowtype+" and a.workflowid="+tworkflowid+" and exists (select c.requestid from workflow_requestbase c where c.requestid=a.requestid) ";
if(!superior)
{
sqlsb.append(" AND EXISTS (SELECT NULL FROM workFlow_CurrentOperator b WHERE a.workflowid = b.workflowid AND a.requestid = b.requestid AND b.userid=" + user.getUID() + " and b.usertype= " + usertype +") ");
}
if(offical.equals("1")){//发文/收文/签报
if(officalType==1){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType in (1,3) and (isvalid=1 or isvalid=3))");
}else if(officalType==2){
sqlsb.append(" and workflowid in (select id from workflow_base where isWorkflowDoc=1 and officalType=2 and (isvalid=1 or isvalid=3))");
}
}
//sqlsb.append(" group by a.viewtype, a.workflowtype, a.workflowid");
String sql=sqlsb.toString();
if(countArr.get(a).equals("flowNew"))
sql += " and a.viewtype = '0' and a.isremark != '5' and a.isprocessed is null ";
else if(countArr.get(a).equals("flowResponse"))
sql += " and a.viewtype = '-1' ";
//else if(countArr.get(a).equals("flowOut"))
//sql += " and a.isremark = '5' ";
else if(countArr.get(a).equals("flowSup"))
sql += " and a.requestid in (select requestid from workflow_requestlog where logtype='s') ";
else
sql +="";
System.out.println("SLQ:::::::+++>>>>"+sql);
RecordSet.executeSql(sql);
if(RecordSet.first()){
//System.out.println(Util.getIntValue(RecordSet.getString("wfCount")));
if(countArr.get(a).equals("flowNew"))
flowNew = Util.getIntValue(RecordSet.getString("wfCount"));
else if(countArr.get(a).equals("flowResponse"))
flowResponse = Util.getIntValue(RecordSet.getString("wfCount"));
else if(countArr.get(a).equals("flowOut"))
flowOut = Util.getIntValue(RecordSet.getString("wfCount"));
else if(countArr.get(a).equals("flowSup"))
flowSup = Util.getIntValue(RecordSet.getString("wfCount"));
else
flowAll = Util.getIntValue(RecordSet.getString("wfCount"));
}
}
//加上EAS流程的数量
weaver.eas.EASUtil eu = new weaver.eas.EASUtil();
String loginid = eu.getLoginid(user);
String eas_requestinfo = Util.null2String(RecordSet.getPropValue("eas","VWorkFlowDo"));
String eas_linkname = Util.null2String(RecordSet.getPropValue("eas","linkname"));
RecordSet.executeSql("select * from openquery("+eas_linkname+",'select COUNT(FProcinstID) from "+eas_requestinfo+" where FPersonUserNumber=''"+loginid+"'' and fstate=''1'' ')");
if(RecordSet.next()){
flowAll+=Util.getIntValue(RecordSet.getString(1),0);
}
String data="{\"flowNew\":\""+flowNew+"\",\"flowResponse\":\""+flowResponse+"\",\"flowOut\":\""+flowOut+"\",\"flowSup\":\""+flowSup+"\",\"flowAll\":\""+flowAll+"\"}";
response.getWriter().write(data);
}
%>

View File

@ -0,0 +1,194 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="pack" class="weaver.general.ParameterPackage" scope="page"/>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<script src="/js/tabs/jquery.tabs.extend_wev8.js"></script>
<link type="text/css" href="/js/tabs/css/e8tabs1_wev8.css" rel="stylesheet" />
<%
String navName = "";
String viewType=Util.null2String(request.getParameter("viewType"));
String offical = Util.null2String(request.getParameter("offical"));
int officalType = Util.getIntValue(request.getParameter("officalType"),-1);
if(viewType.equals("2")){
navName=SystemEnv.getHtmlLabelName(17991,user.getLanguage());
if(officalType==1){
navName = SystemEnv.getHtmlLabelName(33530, user.getLanguage());
}else if(officalType==2){
navName = SystemEnv.getHtmlLabelName(33789, user.getLanguage());
}
}else if(viewType.equals("4")){
navName=SystemEnv.getHtmlLabelName(1210,user.getLanguage());
if(offical.equals("1")){
if(officalType==1){
navName = SystemEnv.getHtmlLabelName(33529, user.getLanguage());
}else if(officalType==2){
navName = SystemEnv.getHtmlLabelName(33790, user.getLanguage());
}
}
}
String typeName="";
String workFlowName="";
String typeid=Util.null2String(request.getParameter("wftype"));
String workflowid=Util.null2String(request.getParameter("workflowid"));
//查询流程名
if(typeid!=null && typeid!=""){
StringBuffer typeSql= new StringBuffer();
typeSql.append("select typename from workflow_type where");
typeSql.append(" id= ").append(typeid);
RecordSet.execute(typeSql.toString());
if(RecordSet.next()){
typeName=Util.null2String(RecordSet.getString("typename"));
}
}
//查询工作流类型
if(workflowid!=null && workflowid!="" ){
StringBuffer workflowSql= new StringBuffer();
workflowSql.append("select workflowname from workflow_base where");
workflowSql.append(" id= ").append(workflowid);
RecordSet.execute(workflowSql.toString());
if(RecordSet.next()){
workFlowName=Util.null2String(RecordSet.getString("workflowname"));
}
}
if(workFlowName!="" ){
navName=workFlowName;
}else if(typeName!=""){
navName=typeName;
}
String curTab = Util.getIntValue(Util.null2String(request.getParameter("viewcondition")),0)+"";
%>
<script type="text/javascript">
//window.notExecute = true;
$(function(){
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
$('.e8_box').Tabs({
getLine:1,
mouldID:"<%= MouldIDConst.getID(offical.equals("1")?"offical":"workflow")%>",
staticOnLoad:true,
iframe:"tabcontentframe",
objName:"<%=Util.toScreenForJs(navName)%>"
});
attachUrl();
syloadTree();
showloading();
//$("#e8_tablogo,#e8TreeSwitch").bind("mouseover",syloadTree);
//$("#e8_tablogo,#e8TreeSwitch").bind("click",showloading);
});
function attachUrl(){
var requestParameters=$(".requestParameterForm").serialize();
$("a[target='tabcontentframe']").each(function(){
var url = "/workflow/search/WFSearchTemp.jsp?"+requestParameters;
if($(this).attr("viewcondition")){
url += "&viewcondition="+$(this).attr("viewcondition");
}
$(this).attr("href",url);
}).bind("click",function(){
var params = requestParameters;
if($(this).attr("viewcondition"))
params += "&viewcondition="+$(this).attr("viewcondition");
});
var curtab = "<%=curTab%>";
if(curtab === "4" || curtab === "5")
{
var url = "/workflow/search/WFSearchTemp.jsp?"+requestParameters;
$("[name='tabcontentframe']").attr("src",url+"&viewcondition="+curtab);
}else
{
$("[name='tabcontentframe']").attr("src",$("a[target='tabcontentframe'][viewcondition='"+curtab+"']").attr("href"));
}
}
//异步加载树调用方法
function syloadTree()
{
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
if(loadtree === "true")
$("#e8_tablogo,#e8TreeSwitch").unbind("mouseover",syloadTree);
else if(loadtree === "loading"){}
else{
window.parent.onloadtree();
$(window.parent.overFlowDiv).attr("loadtree","loading");
}
}
function showloading()
{
var loadtree = $(window.parent.overFlowDiv).attr("loadtree");
if(loadtree === "loading"){
window.parent.showloading();
}else if(loadtree === "true")
$("#e8_tablogo,#e8TreeSwitch").unbind("click",showloading);
}
</script>
</head>
<body scroll="no">
<div class="e8_box demo2">
<div class="e8_boxhead">
<div class="div_e8_xtree" id="div_e8_xtree"></div>
<div class="e8_tablogo" id="e8_tablogo"></div>
<div class="e8_ultab">
<div class="e8_navtab" id="e8_navtab">
<span id="objName"></span>
</div>
<div>
<ul class="tab_menu">
<li class="e8_tree">
<a><%=SystemEnv.getHtmlLabelName(32452,user.getLanguage()) %></a>
</li>
<li <%=!curTab.equals("3")?"class=current":"" %>>
<a href="" viewcondition='0' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(332, user.getLanguage()) %></a>
</li>
<li >
<a href="" viewcondition='1' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(17999, user.getLanguage()) %></a>
</li>
<li >
<a href="" viewcondition='2' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(18800, user.getLanguage()) %></a>
</li>
<li <%=curTab.equals("3")?"class=current":"" %>>
<a href="" viewcondition='3' target="tabcontentframe"><%=SystemEnv.getHtmlLabelName(21950, user.getLanguage()) %></a>
</li>
</ul>
<div id="rightBox" class="e8_rightBox">
</div>
</div>
</div>
</div>
<div class="tab_box"><div>
<iframe src="" id="tabcontentframe" onload="update()" name="tabcontentframe" class="flowFrame" frameborder="0" height="100%" width="100%;"></iframe>
<form class="requestParameterForm">
<%
Enumeration<String> e=request.getParameterNames();
while(e.hasMoreElements()){
String paramenterName=e.nextElement();
String value=request.getParameter(paramenterName);
if(!paramenterName.equals("viewcondition")){
%>
<input type="hidden" name="<%=paramenterName %>" value="<%=value %>" class="requestParameters">
<% }
}
%>
</form>
</div>
</div>
</body>
</html>