expDataSet.jsp
6.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.conn.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="weaver.formmode.exttools.impexp.common.StringUtils"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="rs1" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="CommonConstant" class="weaver.formmode.service.CommonConstant" 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" />
</head>
<%
if(!HrmUserVarify.checkUserRight("WorkflowCustomManage:All", user))
{
response.sendRedirect("/notice/noright.jsp");
return;
}
String imagefilename = "/images/hdMaintenance_wev8.gif";
String titlename = SystemEnv.getHtmlLabelName(23799,user.getLanguage());
String needfav ="1";
String needhelp ="";
String concatS = CommonConstant.DB_CONCAT_SYMBOL;
String isnullFun=CommonConstant.DB_ISNULL_FUN;
String shortName = Util.null2String(request.getParameter("shortName"));
String appid = Util.null2String(request.getParameter("appid"));
String wheresql="and b.id in (select id from modeinfo where modetype in ("+
" select id from (select id,','"+concatS+"allSuperFieldId"+concatS+"',' as allSuperFieldId from modeTreeField"+
" ) A where A.id = "+appid+" or A.allSuperFieldId like '%,"+appid+",%'"+
" ) and "+isnullFun+"(isdelete,0)!=1 )AND a.id= b.formid AND "+isnullFun+"(b.isdelete,0)!=1 "+
"AND a.id NOT IN ( SELECT formid FROM ModeFormExtend m where m.isvirtualform = '1' )";
rs.executeSql("select a.tablename,b.id as modeid from workflow_bill a,modeinfo b where a.id=b.formid "+wheresql);
String spit="";
String formmodeid="";
int num=0;
while(rs.next()){
String tablename=StringUtils.null2String(rs.getString("tablename"));
String modeid=StringUtils.null2String(rs.getString("modeid"));
if(tablename!=""){
rs1.executeSql("select count(1) sum FROM "+tablename+" WHERE "+isnullFun+"(formmodeid,0)!=1 and formmodeid="+modeid);
while(rs1.next()){
int sum=StringUtils.getIntValue(rs1.getString("sum"),0);
if(sum>0){
if(formmodeid!=""){
spit=",";
}
formmodeid+=spit+modeid;
num++;
}
}
}
}
%>
<BODY>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<TABLE class=Shadow>
<tr>
<td valign="top">
<form name="frmSearch" method="post" action="expDataSet.jsp">
<input name="appid" id="appid" value="<%=appid%>" type="hidden">
<table id="topTitle" cellpadding="0" cellspacing="0">
<tr>
<td>
</td>
<td class="rightSearchSpan" style="text-align:right; width:500px!important">
<input type="text" class="searchInput" name="flowTitle" value="<%=shortName%>"/>
<span id="advancedSearch" class="advancedSearch"></span>
</td>
</tr>
</table>
<%
String sqlWhere="";
if(formmodeid!=""){
sqlWhere=" WHERE b.id IN( ";
sqlWhere+=formmodeid+" )AND a.id= b.formid AND "+isnullFun+"(b.isdelete,0)!=1 "+
"AND a.id NOT IN ( SELECT formid FROM ModeFormExtend m where m.isvirtualform = '1' )";
if(!"".equals(shortName)){
sqlWhere+="and (b.modename like '%"+shortName+"%' or a.tablename like '%"+shortName+"%' )" ;
}
}else {
sqlWhere="where 1=2";
}
String operateString= "";
String tabletype="checkbox";
String tableString=""+
"<table needPage=\"false\" instanceid=\"chooseSubWorkflow\" pagesize=\""+PageIdConst.getPageSize(PageIdConst.WF_WORKFLOW_FIELDTRIGGER,user.getUID())+"\" tabletype=\""+tabletype+"\">"+
" <checkboxpopedom id=\"checkbox\" showmethod=\"weaver.general.KnowledgeTransMethod.getMailCheckbox\" />"+
"<sql backfields=\"b.id as id,b.modename modename,a.tablename\" sqlwhere=\""+Util.toHtmlForSplitPage(sqlWhere)+"\" sqlform=\"workflow_bill a,modeinfo b \" sqlorderby=\"b.id\" sqlprimarykey=\"b.id\" sqlsortway=\"asc\" sqldistinct=\"true\" />"+
operateString+
"<head>"+
"<col width=\"30%\" text=\""+SystemEnv.getHtmlLabelName(28485,user.getLanguage())+"\" column=\"modeName\"/>"+
"<col width=\"30%\" column=\"tablename\" text=\""+SystemEnv.getHtmlLabelName(384336,user.getLanguage())+"\" />"+
"<col width=\"30%\" transmethod=\"weaver.formmode.exttools.impexp.exp.service.extttoolsTransMethod.getModeDataCount\" otherpara=\"column:tablename+column:id\" column=\"count\" text=\""+SystemEnv.getHtmlLabelName(384337,user.getLanguage())+"\"/>"+
"</head>"+
"</table>";
%>
<TABLE width="100%" cellspacing=0>
<tr>
<td valign="top">
<wea:SplitPageTag tableString='<%=tableString%>' mode="run" />
</td>
</tr>
</TABLE>
</td>
</tr>
</TABLE>
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout needImportDefaultJsAndCss="false">
<wea:group context="" attributes="{groupDisplay:none}">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(128844,user.getLanguage())%>" id="cancelBtn" class="zd_btn_cancle" onclick="expData()">
</wea:item>
</wea:group>
</wea:layout>
</div>
<script type="text/javascript">
function doSubmit(){
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.loadUp(<%=num%>);
});
function closeDialog(){
diag_vote.close();
}
function onBtnSearchClick(){
var typename=$("input[name='flowTitle']",parent.document).val();
var appid=$("#appid").val();
try{
typename = encodeURI(typename);
}catch(e){
if(window.console)console.log(e)
}
$("input[name='shortName']").val(typename);
window.location="CustomQuerySet.jsp?appid="+appid+"&shortName="+typename;
}
function onReset() {
jQuery('input[name="flowTitle"]', parent.document).val('');
jQuery('input[name="shortName"]').val('');
}
function expData(id){
if(!id){
id = _xtable_CheckedCheckboxId();
}
if(!id){
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(32568,user.getLanguage())%>");
return;
}
if(id.match(/,$/)){
id = id.substring(0,id.length-1);
}
parent.closDilog(id);
}
</script>
</HTML>