diff --git a/.gitignore b/.gitignore index b580d99..e4ee4f5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ bin-release/ # Executables -#.gitignore +#.gitigno re log *.swf *.air diff --git a/src/main/java/com/api/nonstandardext/zenner/utils/ZennerUtil.java b/src/main/java/com/api/nonstandardext/zenner/utils/ZennerUtil.java index af3749e..9182431 100644 --- a/src/main/java/com/api/nonstandardext/zenner/utils/ZennerUtil.java +++ b/src/main/java/com/api/nonstandardext/zenner/utils/ZennerUtil.java @@ -1,6 +1,5 @@ package com.api.nonstandardext.zenner.utils; -import com.api.nonstandardext.allist.utils.DefaultTmForAllist; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import org.apache.commons.httpclient.HttpClient; @@ -178,48 +177,48 @@ public class ZennerUtil { return result; } - public static String httpsGet(String baseUrl,String encoderNum) { - BufferedReader in = null; - BaseBean baseBean = new BaseBean(); - try { - SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); - javax.net.ssl.TrustManager[] truset = new javax.net.ssl.TrustManager[1]; - javax.net.ssl.TrustManager tm = new DefaultTmForAllist(); - truset[0] = tm; - sslContext.init(null, truset, null); - SSLSocketFactory factory = sslContext.getSocketFactory(); - URL u = new URL(baseUrl); - HttpsURLConnection huconn = (HttpsURLConnection) u.openConnection(); - huconn.setSSLSocketFactory(factory); - huconn.setRequestProperty("Authorization","Basic " + encoderNum); - StringBuilder result = new StringBuilder(); - huconn.connect(); -// baseBean.writeLog("httpsGet execute baseUrl..1." + baseUrl); - in = new BufferedReader(new InputStreamReader(huconn.getInputStream(), "UTF-8")); - String line; - while ((line = in.readLine()) != null) { - result.append(line); - } - if (in != null) { - in.close(); - } -// baseBean.writeLog("httpsGet execute result..1." + result.toString()); - // 打印返回结果 - return result.toString(); - } catch (Exception e) { - baseBean.writeLog("httpsGet execute exception...message:" + e.getMessage()); - if (in != null) { - try { - in.close(); - } catch (IOException ioException) { - ioException.printStackTrace(); - baseBean.writeLog("关闭报错"); - baseBean.writeLog(ioException.getMessage()); - } - } - return ""; - } - } +// public static String httpsGet(String baseUrl,String encoderNum) { +// BufferedReader in = null; +// BaseBean baseBean = new BaseBean(); +// try { +// SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); +// javax.net.ssl.TrustManager[] truset = new javax.net.ssl.TrustManager[1]; +// javax.net.ssl.TrustManager tm = new DefaultTmForAllist(); +// truset[0] = tm; +// sslContext.init(null, truset, null); +// SSLSocketFactory factory = sslContext.getSocketFactory(); +// URL u = new URL(baseUrl); +// HttpsURLConnection huconn = (HttpsURLConnection) u.openConnection(); +// huconn.setSSLSocketFactory(factory); +// huconn.setRequestProperty("Authorization","Basic " + encoderNum); +// StringBuilder result = new StringBuilder(); +// huconn.connect(); +//// baseBean.writeLog("httpsGet execute baseUrl..1." + baseUrl); +// in = new BufferedReader(new InputStreamReader(huconn.getInputStream(), "UTF-8")); +// String line; +// while ((line = in.readLine()) != null) { +// result.append(line); +// } +// if (in != null) { +// in.close(); +// } +//// baseBean.writeLog("httpsGet execute result..1." + result.toString()); +// // 打印返回结果 +// return result.toString(); +// } catch (Exception e) { +// baseBean.writeLog("httpsGet execute exception...message:" + e.getMessage()); +// if (in != null) { +// try { +// in.close(); +// } catch (IOException ioException) { +// ioException.printStackTrace(); +// baseBean.writeLog("关闭报错"); +// baseBean.writeLog(ioException.getMessage()); +// } +// } +// return ""; +// } +// } public static String httpGet(String baseUrl){ @@ -244,38 +243,38 @@ public class ZennerUtil { } } - public static String httpsPost(String httpUrl, String content) throws Exception { - BufferedReader in = null; - SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); - javax.net.ssl.TrustManager [] truset = new javax.net.ssl.TrustManager[1]; - javax.net.ssl.TrustManager tm = new DefaultTmForAllist(); - truset[0] = tm; - sslContext.init(null,truset,null); - SSLSocketFactory factory = sslContext.getSocketFactory(); -//https://blog.csdn.net/pk5454754/article/details/80092974?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase - URL u = new URL(httpUrl); - HttpsURLConnection conn = (HttpsURLConnection) u.openConnection(); - conn.setDoOutput(true); - conn.addRequestProperty("connection", "Keep-Alive"); - conn.setRequestMethod("POST"); - conn.setSSLSocketFactory(factory); - StringBuilder result = new StringBuilder(); - conn.connect(); - DataOutputStream out = new DataOutputStream(conn.getOutputStream()); - out.write(content.getBytes("utf-8")); - // 刷新、关闭 - out.flush(); - out.close(); - in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); - String line; - while ((line = in.readLine()) != null) { - result.append(line); - } - if (in != null) { - in.close(); - } - return result.toString(); - } +// public static String httpsPost(String httpUrl, String content) throws Exception { +// BufferedReader in = null; +// SSLContext sslContext = SSLContext.getInstance("TLSv1.2"); +// javax.net.ssl.TrustManager [] truset = new javax.net.ssl.TrustManager[1]; +// javax.net.ssl.TrustManager tm = new DefaultTmForAllist(); +// truset[0] = tm; +// sslContext.init(null,truset,null); +// SSLSocketFactory factory = sslContext.getSocketFactory(); +////https://blog.csdn.net/pk5454754/article/details/80092974?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-1.nonecase +// URL u = new URL(httpUrl); +// HttpsURLConnection conn = (HttpsURLConnection) u.openConnection(); +// conn.setDoOutput(true); +// conn.addRequestProperty("connection", "Keep-Alive"); +// conn.setRequestMethod("POST"); +// conn.setSSLSocketFactory(factory); +// StringBuilder result = new StringBuilder(); +// conn.connect(); +// DataOutputStream out = new DataOutputStream(conn.getOutputStream()); +// out.write(content.getBytes("utf-8")); +// // 刷新、关闭 +// out.flush(); +// out.close(); +// in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8")); +// String line; +// while ((line = in.readLine()) != null) { +// result.append(line); +// } +// if (in != null) { +// in.close(); +// } +// return result.toString(); +// } public static String httpPostForXwwwForm(String httpUrl, Map headParams, Map paramsMap){ String result = ""; diff --git a/src/main/resources/ContractList(2).jsp b/src/main/resources/ContractList(2).jsp deleted file mode 100644 index 9070046..0000000 --- a/src/main/resources/ContractList(2).jsp +++ /dev/null @@ -1,499 +0,0 @@ -<%@ 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="/WEB-INF/tld/browser.tld" prefix="brow"%> - -<%@ page import="weaver.file.Prop" %> -<%@ page import="weaver.hrm.HrmUserVarify" %> -<%@ page import="weaver.systeminfo.SystemEnv" %> - - - - - - - - - - - - - - - -<% - - String sqlwhere = " where 1=1 "; - - String subcompanyid1 = ResourceComInfo.getSubCompanyID(String.valueOf(user.getUID())); - - //是否采购部 - boolean isDep = false; - //是否是流程接收人 - boolean isShow = false; - //采购部的同事可以选择所有合同卡片;而本部门的人员(非采购部)只能选择本部门的合同卡片 - RecordSet_Dep.executeSql("select * from HrmDepartment where departmentname like '%采购%' and id="+user.getUserDepartment()); - if(RecordSet_Dep.next()) isDep = true; - - //是否合同流程接收人 - String sqlwhere_workflow = ""; - RecordSet_Dep.executeSql("select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID()); - if(RecordSet_Dep.next()) isShow = true; - - if(!HrmUserVarify.checkUserRight("ContactInfo:Manager", user) && !HrmUserVarify.checkUserRight("ContactInfo:User", user) && !isShow && !isDep){ - response.sendRedirect("/notice/noright.jsp"); - } - - //如果是合同管理权限,则直接1=1 - if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user)){ - sqlwhere += " and 1=1"; - }else if(isShow && HrmUserVarify.checkUserRight("ContactInfo:User", user)){ - //如果是流程接收人,并且有合同查看权限 - sqlwhere += " and (requestid in (select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID()+") or reqDeptId = '"+user.getUserDepartment()+"')"; - - }else if(HrmUserVarify.checkUserRight("ContactInfo:User", user)){ - //如果只有合同查看权限 - sqlwhere += " and reqDeptId = '"+user.getUserDepartment()+"'"; - - }else if(isShow){ - //如果只是流程接收人 - sqlwhere += " and requestid in (select distinct requestId from workflow_currentoperator where workflowid in (79,148,133,128,118,108,98,153,167,316,470,514,532,543,600,717,719,739,832,927,929) and userid="+user.getUID()+")"; - } - - //如果没有查看全部的权限,加分部条件 - if(!HrmUserVarify.checkUserRight("ContactInfoList:ALL", user)){ - if (!subcompanyid1.equals("0")) {sqlwhere += " and CrmContractInfo.subcompanyid1 = '"+subcompanyid1+"' ";} - } - String imagefilename = "/images/hdReport.gif"; - String titlename = SystemEnv.getHtmlLabelName(614, user.getLanguage()) + SystemEnv.getHtmlLabelName(527, user.getLanguage()); - String needfav = "1"; - String needhelp = ""; -%> - - <%@ include file="/systeminfo/TopTitle_wev8.jsp"%> - <%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp"%> - <% - RCMenu += "{" + SystemEnv.getHtmlLabelName(197, user.getLanguage()) + ",javascript:OnSearch(),_top} "; - RCMenuHeight += RCMenuHeightStep; - RCMenu += "{" + "Excel,javascript:ContractExport(),_top} "; - RCMenuHeight += RCMenuHeightStep; - RCMenu += "{" + SystemEnv.getHtmlLabelName(18363, user.getLanguage()) + ",javascript:_table.firstPage(),_self}"; - RCMenuHeight += RCMenuHeightStep; - RCMenu += "{" + SystemEnv.getHtmlLabelName(1258, user.getLanguage()) + ",javascript:_table.prePage(),_self}"; - RCMenuHeight += RCMenuHeightStep; - RCMenu += "{" + SystemEnv.getHtmlLabelName(1259, user.getLanguage()) + ",javascript:_table.nextPage(),_self}"; - RCMenuHeight += RCMenuHeightStep; - RCMenu += "{" + SystemEnv.getHtmlLabelName(18362, user.getLanguage()) + ",javascript:_table.lastPage(),_self}"; - RCMenuHeight += RCMenuHeightStep; - %> - <% - int pagenum = Util.getIntValue(request.getParameter("pagenum"), 1); - int perpage = Util.getPerpageLog(); - if (perpage <= 1) perpage = 10; - - String creator = Util.fromScreen(request.getParameter("creator"), user.getLanguage()); - String fromdate = Util.fromScreen(request.getParameter("fromdate"), user.getLanguage()); - String fromdate2 = Util.fromScreen(request.getParameter("fromdate2"), user.getLanguage()); - String enddate = Util.fromScreen(request.getParameter("enddate"), user.getLanguage()); - String enddate2 = Util.fromScreen(request.getParameter("enddate2"), user.getLanguage()); - String status_temp = Util.null2String(request.getParameter("status_temp")); - - String conNo = Util.fromScreen(request.getParameter("conNo"), user.getLanguage()); - String prNo = Util.fromScreen(request.getParameter("prNo"), user.getLanguage()); - String jpcNo = Util.fromScreen(request.getParameter("jpcNo"), user.getLanguage()); - String suppliersId = Util.fromScreen(request.getParameter("suppliersId"), user.getLanguage()); - String isOneSuppliers = Util.fromScreen(request.getParameter("isOneSuppliers"), user.getLanguage()); -// String reqDeptId = String.valueOf(user.getUserDepartment()); - String reqDeptId = Util.fromScreen(request.getParameter("reqDeptId"), user.getLanguage());; - //管理员组或采购部才能查询所有部门下合同,合同接收人查看接收的合同 -// if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user) || isShow) reqDeptId = Util.fromScreen(request.getParameter("reqDeptId"), user.getLanguage()); - String isOverdue = Util.fromScreen(request.getParameter("isOverdue"), user.getLanguage()); - String status = Util.fromScreen(request.getParameter("status"), user.getLanguage()); - String isOverdueNext = Util.fromScreen(request.getParameter("isOverdueNext"), user.getLanguage()); - String conType = Util.fromScreen(request.getParameter("conType"), user.getLanguage()); - - String name = Util.fromScreen(request.getParameter("name"), user.getLanguage()); - String subCompanyId = Util.fromScreen(request.getParameter("subCompanyId"), user.getLanguage()); - String reNewStatus = Util.fromScreen(request.getParameter("reNewStatus"), user.getLanguage()); - String conStatus = Util.fromScreen(request.getParameter("conStatus"), user.getLanguage()); - String contractName = Util.fromScreen(request.getParameter("contractName"), user.getLanguage()); - String csstatus = Util.fromScreen(request.getParameter("csstatus"), user.getLanguage()); - - int opentype = Util.getIntValue(request.getParameter("opentype"),-1); - - //String sqlwhere = " where status = '' "; - //if(!"".equals(status_temp)) sqlwhere += " and status in ("+status_temp+") "; - - if (!fromdate.equals("")) sqlwhere += " and startDate>='" + fromdate + "'"; - if (!fromdate2.equals("")) sqlwhere += " and startDate<='" + fromdate2 + "'"; - if (!enddate.equals("")) sqlwhere += " and enddate>='" + enddate + "'"; - if (!enddate2.equals("")) sqlwhere += " and enddate<='" + enddate2 + "'"; - if (!conNo.equals("")) sqlwhere += " and conNo like '%" + conNo + "%'"; - if (!prNo.equals("")) sqlwhere += " and prNo='" + prNo + "'"; - if (!jpcNo.equals("")) sqlwhere += " and jpcNo='" + jpcNo + "'"; - if(!"".equals(suppliersId)) sqlwhere += " and suppliersId=" + suppliersId; - if (!isOneSuppliers.equals("")) sqlwhere += " and isOneSuppliers='" + isOneSuppliers + "'"; - if (!"".equals(creator) && !"0".equals(creator)) sqlwhere += " and CrmContractInfo.creator=" + creator; - if (!reqDeptId.equals("")) sqlwhere += " and reqDeptId=" + reqDeptId; - if (!isOverdue.equals("")) sqlwhere += " and isOverdue='" + isOverdue + "'"; - if (!status.equals("")) sqlwhere += " and CrmContractInfo.status='" + status + "'"; - if (!isOverdueNext.equals("")) sqlwhere += " and isOverdueNext='" + isOverdueNext + "'"; - if (!conType.equals("")) sqlwhere += " and conType='" + conType + "'"; - if (!csstatus.equals("")) sqlwhere += " and CrmSalesContractInfo.status='" + csstatus + "'"; - - if (!name.equals("")) sqlwhere += " and name like '%" + name + "%'"; - if (!subCompanyId.equals("")) sqlwhere += " and CrmContractInfo.subcompanyid1 = '" + subCompanyId + "'"; - if (!reNewStatus.equals("")) sqlwhere += " and conStatus = '" + reNewStatus + "'"; - - if (!contractName.equals("")) sqlwhere += " and contractName like '%" + contractName + "%'"; - - //if (reNewStatus2.equals("待续签")) sqlwhere += " and dbo.getReNewStatus2(2,CrmContractInfo.saleContract) > 0"; - //else if (reNewStatus2.equals("已续签")) sqlwhere += " and dbo.getReNewStatus2(1,CrmContractInfo.saleContract) > 0"; - //else if (reNewStatus2.equals("无需续签")) sqlwhere += " and dbo.getReNewStatus2(3,CrmContractInfo.saleContract) > 0"; - //System.out.println("sqlwhere:"+sqlwhere); - - - if(opentype > -1){ - sqlwhere += " and isnull(CrmContractInfo.opentype,0) = " + opentype; - } - - String orderStr = " order by startDate desc, CrmContractInfo.id desc "; - -// out.println("sqlwhere:" + sqlwhere); -// out.println("orderStr:" + orderStr); - -// session.setAttribute("sqlwhere", sqlwhere); -// session.setAttribute("orderStr", orderStr); - %> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%if(HrmUserVarify.checkUserRight("ContactInfoList:ALL", user)){%> - - - <%}%> - - - - - - - - - - - - - - - - -
<%=SystemEnv.getHtmlLabelName(15774, user.getLanguage())%>
合同状态 - - <%=SystemEnv.getHtmlLabelName(1970, user.getLanguage())%> -   - <%=Util.toScreen(fromdate, user.getLanguage())%> -  -   - <%=Util.toScreen(fromdate2, user.getLanguage())%> - > - > - <%=SystemEnv.getHtmlLabelName(15236, user.getLanguage())%> -   - <%=Util.toScreen(enddate, user.getLanguage())%> -  -   - <%=Util.toScreen(enddate2, user.getLanguage())%> - > - > -
<%=SystemEnv.getHtmlLabelName(21282, user.getLanguage())%> - - PR<%=SystemEnv.getHtmlLabelName(403,user.getLanguage())%> - - JPC<%=SystemEnv.getHtmlLabelName(2171,user.getLanguage())%><%=SystemEnv.getHtmlLabelName(16992,user.getLanguage())%> - -
<%=SystemEnv.getHtmlLabelName(613002, user.getLanguage())%> - - - - - <%=SystemEnv.getHtmlLabelName(913, user.getLanguage())%> - - -
<%=SystemEnv.getHtmlLabelName(620002, user.getLanguage())%> - - - - -<%-- <%--%> -<%-- //管理员组才能查询所有部门下合同--%> -<%-- if(HrmUserVarify.checkUserRight("ContactInfo:Manager", user)){--%> -<%-- %>--%> -<%-- -<%-- id="reqDeptId"--%> -<%-- name="reqDeptId"--%> -<%-- browserValue="<%=reqDeptId %>"--%> -<%-- browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/company/DepartmentBrowser.jsp"--%> -<%-- hasInput="true"--%> -<%-- isSingle="true"--%> -<%-- hasBrowser = "true"--%> -<%-- isMustInput='1'--%> -<%-- width="165px"--%> -<%-- browserSpanValue="<%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage())%>">--%> -<%-- --%> - -<%-- <%––%>--%> -<%-- <%}else{ %>--%> -<%-- <%=Util.toScreen(DepartmentComInfo.getDepartmentname(reqDeptId),user.getLanguage()) %>--%> -<%-- <%} %>--%> - 付款状态 - - <%=SystemEnv.getHtmlLabelName(620017, user.getLanguage())%> - -
<%=SystemEnv.getHtmlLabelName(15775, user.getLanguage())%> - - <%=SystemEnv.getHtmlLabelName(15142, user.getLanguage())%> - - <%=SystemEnv.getHtmlLabelName(141,user.getLanguage())%>: - - - "> - - - - <%-- - <%--_url="/systeminfo/BrowserMain.jsp?url=/hrm/company/SubcompanyBrowser.jsp"--%> - <%--_displayText="<%=SubCompanyComInfo.getSubCompanyname(subCompanyId+"")%>"--%> - <%-->--%> -
<%=SystemEnv.getHtmlLabelName(16404, user.getLanguage())%><%=SystemEnv.getHtmlLabelName(195, user.getLanguage())%> - - 销售合同状态 - - 开闭口类型 - -
- -
- -
- - - - -
- <% - - String tableString = ""; - String backfields = " CrmContractInfo.id,case CrmContractInfo.opentype when '0' then '闭口' when '1' then '开口' when '2' then '周期性' end opentype, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '是' else '否' end as isOverdue, conAmount, content, ',' as str_temp, case isOverdueNext when 'Y' then '是' else '否' end as isOverdueNext, case CrmContractInfo.status when '0' then '执行中' when '1' then '已结清' end as status, CrmContractInfo.creator, CrmContractInfo.subcompanyid1, case conStatus when '0' then '执行' when '1' then '待续签' when '2' then '已续签' when '3' then '关闭' end as reNewStatus, contractName, saleContract, case when dbo.getReNewStatus2(1,CrmContractInfo.saleContract) > 0 then '已续签' when dbo.getReNewStatus2(2,CrmContractInfo.saleContract) > 0 then '待续签' when dbo.getReNewStatus2(3,CrmContractInfo.saleContract) > 0 then '无需续签' end as reNewStatus2,case CrmSalesContractInfo.status when '0' then '已签署' when '1' then '未签署' when '2' then '已续签' when '3' then '关闭' end as csstatus "; - String fromSql = " CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract "; - //out.print("select"+backfields+"from"+fromSql +sqlwhere); - String str_content = "content"+"str_temp"; - tableString = " " + "" + ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - //tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - //tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += ""; - tableString += "
"; - %> - - -
-
- <%@ include file="/systeminfo/RightClickMenu_wev8.jsp"%> - - - - - - - \ No newline at end of file diff --git a/src/main/resources/ContractReportExport(1).jsp b/src/main/resources/ContractReportExport(1).jsp deleted file mode 100644 index 2590773..0000000 --- a/src/main/resources/ContractReportExport(1).jsp +++ /dev/null @@ -1,127 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=GBK" %> -<%@ include file="/systeminfo/init.jsp" %> -<%@ page import="weaver.general.Util, weaver.file.ExcelSheet, weaver.file.ExcelRow" %> - - - - - - - - - - -<%! - public static String ToDBC(String input) { - char[] c = input.toCharArray(); - for (int i = 0; i < c.length; i++) { - if (c[i] == 12288) { - //ȫǿոΪ12288ǿոΪ32 - c[i] = (char) 32; - continue; - } - if (c[i] > 65280 && c[i] < 65375) - //ַ(33-126)ȫ(65281-65374)ĶӦϵǣ65248 - c[i] = (char) (c[i] - 65248); - } - return new String(c); - } - - -%> - -<% - // String sqlwhere=(String)session.getAttribute("sqlwhere"); -// String orderStr=(String)session.getAttribute("orderStr"); - - String sqlwhere = request.getParameter("sqlwhere"); - sqlwhere = ToDBC(sqlwhere); - String orderStr = request.getParameter("orderStr"); - orderStr = ToDBC(orderStr); - - String sqlstr = ""; - - if (RecordSet.getDBType().equals("oracle")) { - sqlstr = "select CrmContractInfo.id, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '' else '' end as isOverdue, conAmount, content, case isOverdueNext when 'Y' then '' else '' end as isOverdueNext, case CrmContractInfo.status when '0' then 'ִ' when '1' then 'ѽ' end as status, case isOneSuppliers when 'Y' then '' when 'N' then '' else '' end as isOneSuppliers, prRequestId,jpcNo,jpcFile,prNo,prAmount,prAmountSum,conAmount,managerId,subject,giveDate,giveRemark,payRemark,content,CrmContractInfo.createDate,CrmContractInfo.creator,CrmContractInfo.subcompanyid1, case conStatus when '0' then 'ִ' when '1' then 'ǩ' when '2' then 'ǩ' when '3' then 'ر' end as reNewStatus,contractName, saleContract, case CrmSalesContractInfo.status when '0' then 'ǩ' when '1' then 'δǩ' when '2' then 'ǩ' when '3' then 'ر' end as reNewStatus2 from CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract" + sqlwhere + orderStr; - } else { - sqlstr = "select CrmContractInfo.id, reqDeptId, suppliersId, conNo, name, startDate, endDate, case isOverdue when 'Y' then '' else '' end as isOverdue, conAmount, content, case isOverdueNext when 'Y' then '' else '' end as isOverdueNext, case CrmContractInfo.status when '0' then 'ִ' when '1' then 'ѽ' end as status, case isOneSuppliers when 'Y' then '' when 'N' then '' else '' end as isOneSuppliers, prRequestId,jpcNo,jpcFile,prNo,prAmount,prAmountSum,conAmount,managerId,subject,giveDate,giveRemark,payRemark,content,CrmContractInfo.createDate,CrmContractInfo.creator,CrmContractInfo.subcompanyid1, case conStatus when '0' then 'ִ' when '1' then 'ǩ' when '2' then 'ǩ' when '3' then 'ر' end as reNewStatus,contractName, saleContract, case CrmSalesContractInfo.status when '0' then 'ǩ' when '1' then 'δǩ' when '2' then 'ǩ' when '3' then 'ر' end as reNewStatus2 from CrmContractInfo Left Join CrmSalesContractInfo On CrmSalesContractInfo.id=CrmContractInfo.saleContract" + sqlwhere + orderStr; - } - new BaseBean().writeLog(">>>>>>>>"+sqlstr); - RecordSet.executeQuery(sqlstr); - - ExcelSheet es = new ExcelSheet(); - - ExcelRow er = es.newExcelRow(); - er.addStringValue(SystemEnv.getHtmlLabelName(141,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620002,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(613002,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(21282,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(15142,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(1970,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(15236,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620016,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(6146,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620015,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620017,user.getLanguage())); - er.addStringValue("״̬"); - er.addStringValue(SystemEnv.getHtmlLabelName(913,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620009,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620003,user.getLanguage())); - er.addStringValue("JPC"+SystemEnv.getHtmlLabelName(16992,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620004,user.getLanguage())); - er.addStringValue("PR"+SystemEnv.getHtmlLabelName(403,user.getLanguage())); - er.addStringValue("PR"+SystemEnv.getHtmlLabelName(856,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620010,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620011,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620006,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620012,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620013,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620014,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(620015,user.getLanguage())); - er.addStringValue(SystemEnv.getHtmlLabelName(614,user.getLanguage())+SystemEnv.getHtmlLabelName(722,user.getLanguage())); - er.addStringValue("ͬ״̬"); - er.addStringValue("ۺͬ"); - er.addStringValue("ۺͬ״̬"); - - while (RecordSet.next()) { - ExcelRow erdetail = es.newExcelRow(); - erdetail.addStringValue(SubCompanyComInfo.getSubCompanyname(RecordSet.getString("subcompanyid1"))); - erdetail.addStringValue(DepartmentComInfo.getDepartmentname(RecordSet.getString("reqDeptId"))); - erdetail.addStringValue(CrmSupplierComInfo.getSuppliername(RecordSet.getString("suppliersId"))); - erdetail.addStringValue(RecordSet.getString("conNo")); - erdetail.addStringValue(RecordSet.getString("name")); - erdetail.addStringValue(RecordSet.getString("startDate")); - erdetail.addStringValue(RecordSet.getString("endDate")); - erdetail.addStringValue(RecordSet.getString("isOverdue")); - erdetail.addStringValue(RecordSet.getString("conAmount")); - erdetail.addStringValue(Util.toScreen(SptmForDoc.getDocName(RecordSet.getString("content")), user.getLanguage())); - erdetail.addStringValue(RecordSet.getString("isOverdueNext")); - erdetail.addStringValue(RecordSet.getString("status")); - erdetail.addStringValue(Util.toScreen(ResourceComInfo.getResourcename(RecordSet.getString("creator")), user.getLanguage())); - erdetail.addStringValue(RecordSet.getString("isOneSuppliers")); - erdetail.addStringValue(RequestComInfo.getRequestname(RecordSet.getString("prRequestId"))); - erdetail.addStringValue(RecordSet.getString("jpcNo")); - erdetail.addStringValue(DocComInfo.getDocname(RecordSet.getString("jpcFile"))); - erdetail.addStringValue(RecordSet.getString("prNo")); - erdetail.addStringValue(RecordSet.getString("prAmount")); - erdetail.addStringValue(RecordSet.getString("prAmountSum")); - erdetail.addStringValue(ResourceComInfo.getResourcename(RecordSet.getString("managerId"))); - erdetail.addStringValue(RecordSet.getString("subject")); - erdetail.addStringValue(RecordSet.getString("giveDate")); - erdetail.addStringValue(RecordSet.getString("giveRemark")); - erdetail.addStringValue(RecordSet.getString("payRemark")); - erdetail.addStringValue(DocComInfo.getDocname(RecordSet.getString("content"))); - erdetail.addStringValue(RecordSet.getString("createDate")); - erdetail.addStringValue(RecordSet.getString("reNewStatus")); - erdetail.addStringValue(RecordSet.getString("contractName")); - erdetail.addStringValue(RecordSet.getString("reNewStatus2")); - } - - ExcelFile.init(); - ExcelFile.setFilename("ͬ"); - ExcelFile.addSheet("ͬ", es); -%> - -<%----%> \ No newline at end of file