起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2324|回复: 15

[结贴] OA自带功能模糊查询出错

[复制链接]

52

主题

246

帖子

-717

积分

乞丐

积分
-717
发表于 2013-2-25 17:46:28 | 显示全部楼层 |阅读模式
老师,您好,现在我们用的OA的功能里面的模糊查询现在都出错,错误提示如下:
2013-02-25 17:46:02 excute Action error:<?xml version="1.0" encoding="UTF-8"?>
<action direct-execute="true" process="/OA/asset/process/myAsset/myAssetProcess" activity="myAssetActivity" action-flag="__action_0__" executor="" execute-context="" name="queryASMyAssetAction"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="variables"><xbiz:map/></parameter><parameter name="filter"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[(fDutyPsnID = 'D7FF8167C89A4BADAE3DFD16B9ED6A80') AND (((((((UPPER(fCode) LIKE '%423%') OR (UPPER(fName) LIKE '%423%')) OR (UPPER(fSpecType) LIKE '%423%')) OR (UPPER(fUnit) LIKE '%423%')) OR (UPPER(fOriginValue) LIKE '%423%')) OR (UPPER(fRemainValue) LIKE '%423%')) OR (UPPER(fSourceName) LIKE '%423%'))]]></xbiz:simple></parameter><parameter name="offset"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#Integer">0</xbiz:simple></parameter><parameter name="limit"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#Integer">20</xbiz:simple></parameter><parameter name="columns"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[version,fKindID,fKind,fCode,fName,fSpecType,fUnitID,fUnit,fStatus,fStatusName,fOriginValue,fRemainValue,fServiceYear,fDutyOgnID,fDutyOgnName,fDutyOgnFID,fDutyDeptID,fDutyDeptName,fDutyPosID,fDutyPosName,fDutyPsnID,fDutyPsnName,fDutyPsnFID,fDutyPsnFName,fBgDepreYear,fBgDepreMonth,fAddDepreValue,fFactory,fFactoryDate,fSupplier,fSource,fSourceName,fDetailInfo,fCheckID,fCheckNO,fBuyApplyID,fBuyApplyNO,fAssetInID,fAssetInNO,fRemark,fCreateOgnID,fCreateOgnName,fCreateDeptID,fCreateDeptName,fCreatePosID,fCreatePosName,fCreatePsnID,fCreatePsnName,fCreatePsnFID,fCreatePsnFName,fCreateTime,fUpdatePsnID,fUpdatePsnName,fUpdateTime,fArrangeDate,fChecked,fAssetConfirm,fExtendStr1,fExtendStr2,fExtendStr3,fExtendStr4,fExtendStr5,fExtendStr6,fExtendStr7,fExtendStr8,fExtendStr9,fExtendDate1,fExtendDate2,fExtendDate3,fExtendDate4,fExtendDate5,fExtendNum1,fExtendNum2,fExtendNum3,fExtendNum4,fExtendNum5,sMainOrgFID,OA_AS_Card]]></xbiz:simple></parameter><parameter name="orderBy"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[fCode ASC]]></xbiz:simple></parameter></parameters><translate-parameter data-type="row-list" transform-idcolumn="true" use-namespace="true" cellname-by-relation="false"><rows-config concept="OA_AS_Card" sequence="ch,recNo,fStatusName,fAssetConfirm,fCode,fKind,fName,fSpecType,fSourceName,fDutyPsnName,fOriginValue,fDetailInfo,fRemark,version,fKindID,fUnitID,fUnit,fStatus,fRemainValue,fServiceYear,fDutyOgnID,fDutyOgnName,fDutyOgnFID,fDutyDeptID,fDutyDeptName,fDutyPosID,fDutyPosName,fDutyPsnID,fDutyPsnFID,fDutyPsnFName,fBgDepreYear,fBgDepreMonth,fAddDepreValue,fFactory,fFactoryDate,fSupplier,fSource,fCheckID,fCheckNO,fBuyApplyID,fBuyApplyNO,fAssetInID,fAssetInNO,fCreateOgnID,fCreateOgnName,fCreateDeptID,fCreateDeptName,fCreatePosID,fCreatePosName,fCreatePsnID,fCreatePsnName,fCreatePsnFID,fCreatePsnFName,fCreateTime,fUpdatePsnID,fUpdatePsnName,fUpdateTime,fArrangeDate,fChecked,fExtendStr1,fExtendStr2,fExtendStr3,fExtendStr4,fExtendStr5,fExtendStr6,fExtendStr7,fExtendStr8,fExtendStr9,fExtendDate1,fExtendDate2,fExtendDate3,fExtendDate4,fExtendDate5,fExtendNum1,fExtendNum2,fExtendNum3,fExtendNum4,fExtendNum5,sMainOrgFID"/></translate-parameter></action>
com.justep.model.exception.ModelException: java.lang.reflect.InvocationTargetException
        at com.justep.system.action.Engine.invokeActions(Unknown Source)
        at com.justep.business.server.BusinessServer.doAction(Unknown Source)
        at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
        at com.justep.business.server.BusinessServer.excute(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at com.justep.system.action.Engine.invokeActions(Native Method)
        ... 21 more
Caused by: com.justep.model.exception.ModelException: 执行ksql:SELECT OA_AS_Card.*,V_SA_OPPerson.sMainOrgFID as sMainOrgFID  FROM OA_AS_Card OA_AS_Card  join V_SA_OPPerson V_SA_OPPerson on V_SA_OPPerson = OA_AS_Card.fDutyPsnID WHERE (OA_AS_Card.fStatus = '0' OR OA_AS_Card.fStatus = '1') AND ((fDutyPsnID = 'D7FF8167C89A4BADAE3DFD16B9ED6A80') AND (((((((UPPER(fCode) LIKE '%423%') OR (UPPER(fName) LIKE '%423%')) OR (UPPER(fSpecType) LIKE '%423%')) OR (UPPER(fUnit) LIKE '%423%')) OR (UPPER(fOriginValue) LIKE '%423%')) OR (UPPER(fRemainValue) LIKE '%423%')) OR (UPPER(fSourceName) LIKE '%423%'))) ORDER BY fCode ASC LIMIT 0, 20时出错!
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
        at com.justep.system.data.BizData.query(Unknown Source)
        at BizProcedure.query(BizProcedure.java:12)
        ... 25 more
Caused by: java.sql.SQLException: Function UPPER invoked with wrong number or type of argument(s).

        at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
        at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
        at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
        at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
        at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418)
        at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
        at com.justep.system.ksql.KSQLUtils.execSqlSelect(Unknown Source)
        ... 30 more
请问这是怎么回事!




109

主题

1191

帖子

3851

积分

论坛元老

Rank: 8Rank: 8

积分
3851
QQ
发表于 2013-2-25 18:20:25 | 显示全部楼层
是望远镜报错吗?
回复 支持 反对

使用道具 举报

52

主题

246

帖子

-717

积分

乞丐

积分
-717
 楼主| 发表于 2013-2-25 18:24:11 | 显示全部楼层
什么是望远镜????
回复 支持 反对

使用道具 举报

109

主题

1191

帖子

3851

积分

论坛元老

Rank: 8Rank: 8

积分
3851
QQ
发表于 2013-2-25 18:28:11 | 显示全部楼层
chenshiqiang00 发表于 2013-2-25 18:24
什么是望远镜????

工具栏中有这个吗? wyj.jpg
你是点什么功能报错的
回复 支持 反对

使用道具 举报

52

主题

246

帖子

-717

积分

乞丐

积分
-717
 楼主| 发表于 2013-2-25 18:30:41 | 显示全部楼层
不是这个,是用这个smartFilter组件做的查询!
回复 支持 反对

使用道具 举报

109

主题

1191

帖子

3851

积分

论坛元老

Rank: 8Rank: 8

积分
3851
QQ
发表于 2013-2-25 18:37:34 | 显示全部楼层
本帖最后由 MaHZ 于 2013-2-25 18:41 编辑
chenshiqiang00 发表于 2013-2-25 18:30
不是这个,是用这个smartFilter组件做的查询!


你是怎么配置的?UPPER是转换字符串的,你过滤的数据有不是字符串类型的字段吗?
回复 支持 反对

使用道具 举报

52

主题

246

帖子

-717

积分

乞丐

积分
-717
 楼主| 发表于 2013-2-25 18:45:16 | 显示全部楼层
都是varchar类型的!
回复 支持 反对

使用道具 举报

109

主题

1191

帖子

3851

积分

论坛元老

Rank: 8Rank: 8

积分
3851
QQ
发表于 2013-2-25 18:51:49 | 显示全部楼层
chenshiqiang00 发表于 2013-2-25 18:45
都是varchar类型的!

但是,很明显是这句话:Caused by: java.sql.SQLException: Function UPPER invoked with wrong number or type of argument(s).
错误的数量或类型的参数,报的错啊,试试把upper去掉看还报错吗?
回复 支持 反对

使用道具 举报

52

主题

246

帖子

-717

积分

乞丐

积分
-717
 楼主| 发表于 2013-2-26 09:15:17 | 显示全部楼层
不是那么回事...这个upper是起步自带组件封装的方法,具体在哪写的我也不知道!!
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2013-2-26 09:38:12 | 显示全部楼层
OA_AS_Card.fStatus = '0' OR OA_AS_Card.fStatus = '1'是整型的还是字符串
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-2 20:10 , Processed in 0.075720 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表