NutzCN Logo
问答 求助 with as() update 提示没有返回结果集
发布于 1816天前 作者 asdffqqqq 1332 次浏览 复制 上一个帖子 下一个帖子
标签:
16:01:31 [DEBUG] org.nutz.mvc.impl.UrlMappingImpl - Found mapping for [POST] path=/qa/answer/subExamForUser : QuestionAnswerAction.subExamForUser(QuestionAnswerAction.java:391)
16:01:31 [DEBUG] org.nutz.ioc.impl.NutIoc - Get 'questionAnswerAction'<class com.ntswy.qa.action.QuestionAnswerAction>
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT * FROM QA_QUESTION_SCORE  WHERE id=?
    |                                1 |
    |----------------------------------|
    | ebc3e45cfe4f427eb677215e748bc9ba |
  For example:> "SELECT * FROM QA_QUESTION_SCORE  WHERE id='ebc3e45cfe4f427eb677215e748bc9ba'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - DELETE FROM QA_QUESTION_SCORE_DETAIL WHERE SCORE_ID=?
    |                                1 |
    |----------------------------------|
    | ebc3e45cfe4f427eb677215e748bc9ba |
  For example:> "DELETE FROM QA_QUESTION_SCORE_DETAIL WHERE SCORE_ID='ebc3e45cfe4f427eb677215e748bc9ba'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - INSERT INTO QA_QUESTION_SCORE_DETAIL(id,SCORE_ID,ITEM_ID,SCORE,USER_ANSWER) VALUES(?,?,?,?,?) 
    |                                1 |                                2 |                                3 |    4 | 5 |
    |----------------------------------|----------------------------------|----------------------------------|------|---|
    | 0b4750c753da466fbe907f49cf5d722e | ebc3e45cfe4f427eb677215e748bc9ba | 1a941344af274159a3eb595ce5e5b05c | 5.0  | A |
    | d23d0abf31be40bcb1ff084cb693da0c | ebc3e45cfe4f427eb677215e748bc9ba | 7f2e02e16a3449729e2fb08aee564968 | 10.0 | 二 |
  For example:> "INSERT INTO QA_QUESTION_SCORE_DETAIL(id,SCORE_ID,ITEM_ID,SCORE,USER_ANSWER) VALUES('0b4750c753da466fbe907f49cf5d722e','ebc3e45cfe4f427eb677215e748bc9ba','1a941344af274159a3eb595ce5e5b05c',5.0,'A') "
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - UPDATE QA_QUESTION_SCORE SET USER_ID=?,INFO_ID=?,USER_NAME=?,START_TIME=?,END_TIME=?,EXAM_DATE=?,USE_TIME=?,SCORE=?,EXAM_STATE=?,KJ_ID=?,planJdKjXyId=?,EXAM_NUMBER=?  WHERE id=?
    |        1 |                                2 |   3 |                   4 |                   5 |          6 |         7 |    8 | 9 |                               10 |                               11 | 12 |                               13 |
    |----------|----------------------------------|-----|---------------------|---------------------|------------|-----------|------|---|----------------------------------|----------------------------------|---|----------------------------------|
    | 10020723 | c7fe2f586fe04a798ed3f9a0867a7c0b | 王阿香 | 2020-01-02 15:59:20 | 2020-01-02 16:01:31 | 2020-01-02 | 0小时2分钟11秒 | 15.0 | 1 | b4dfc71f86e64a8980a2772637af3a29 | c9104b1e5f0b4ae38336cd85713dc81c | 4 | ebc3e45cfe4f427eb677215e748bc9ba |
  For example:> "UPDATE QA_QUESTION_SCORE SET USER_ID='10020723',INFO_ID='c7fe2f586fe04a798ed3f9a0867a7c0b',USER_NAME='王阿香',START_TIME='2020-01-02 15:59:20',END_TIME='2020-01-02 16:01:31',EXAM_DATE='2020-01-02',USE_TIME='0小时2分钟11秒',SCORE=15.0,EXAM_STATE='1',KJ_ID='b4dfc71f86e64a8980a2772637af3a29',planJdKjXyId='c9104b1e5f0b4ae38336cd85713dc81c',EXAM_NUMBER=4  WHERE id='ebc3e45cfe4f427eb677215e748bc9ba'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT COUNT(*) FROM QA_QUESTION_SCORE  WHERE planJdKjXyId=? AND  NOT EXAM_STATE=?
    |                                1 | 2 |
    |----------------------------------|---|
    | c9104b1e5f0b4ae38336cd85713dc81c | 1 |
  For example:> "SELECT COUNT(*) FROM QA_QUESTION_SCORE  WHERE planJdKjXyId='c9104b1e5f0b4ae38336cd85713dc81c' AND  NOT EXAM_STATE='1'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - UPDATE PX_PLAN_JD_KJ_XY SET state=?  WHERE id=?
    | 1 |                                2 |
    |---|----------------------------------|
    | 9 | c9104b1e5f0b4ae38336cd85713dc81c |
  For example:> "UPDATE PX_PLAN_JD_KJ_XY SET state='9'  WHERE id='c9104b1e5f0b4ae38336cd85713dc81c'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT * FROM PX_PLAN_JD_KJ_XY  WHERE id=?
    |                                1 |
    |----------------------------------|
    | c9104b1e5f0b4ae38336cd85713dc81c |
  For example:> "SELECT * FROM PX_PLAN_JD_KJ_XY  WHERE id='c9104b1e5f0b4ae38336cd85713dc81c'"
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - WITH report1 as(SELECT a.id,a.xyId,b.kjId FROM PX_LJ_JD_XY a inner join PX_JD b ON a.gzId=b.gzId AND a.jdType=b.jdType inner join sys_user c ON c.deptCode='800' and c.userId=a.xyId and c.status = 1 and c.roleId=a.gzId where  a.xyId='10020723' AND a.state != '9'
),
report2 AS(
SELECT DISTINCT a.id FROM report1 a LEFT JOIN PX_PLAN_JD_KJ_XY b ON b.xyId=a.xyId AND b.state='9' AND a.kjId=b.kjId WHERE b.id is NULL
)
UPDATE PX_LJ_JD_XY SET state='9' FROM PX_LJ_JD_XY a where EXISTS(SELECT 1 FROM report1 where id=a.id) AND NOT EXISTS(SELECT 1 FROM report2 WHERE id=a.id)
16:01:31 [DEBUG] org.nutz.dao.impl.sql.run.NutDaoExecutor - SQLException
com.microsoft.sqlserver.jdbc.SQLServerException: 该语句没有返回结果集。
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:794) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160) ~[sqljdbc4.jar:na]
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:620) ~[sqljdbc4.jar:na]
	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208) ~[commons-dbcp.jar:1.2.2]
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246) ~[nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53) ~[nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithTransaction(NutDaoRunner.java:104) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:88) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoRunner$1.run(NutDaoRunner.java:74) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.trans.Trans.exec(Trans.java:174) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:72) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:245) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:257) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:241) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.dao.impl.NutDao.execute(NutDao.java:965) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at com.ntswy.px.dao.PxPlanInfoDao.updateLjJdXyStateByXyId(PxPlanInfoDao.java:541) [PxPlanInfoDao.class:na]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:12) [nutz-1.r.61.r2.jar:na]
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updateLjJdXyStateByXyId(PxPlanInfoDao.java:1) [nutz-1.r.61.r2.jar:na]
	at com.ntswy.px.dao.PxPlanInfoDao.updateLjJdXyStateByXyId(PxPlanInfoDao.java:506) [PxPlanInfoDao.class:na]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:11) [nutz-1.r.61.r2.jar:na]
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updateLjJdXyStateByXyId(PxPlanInfoDao.java:1) [nutz-1.r.61.r2.jar:na]
	at com.ntswy.px.dao.PxPlanInfoDao.updatePlanKjXyState(PxPlanInfoDao.java:413) [PxPlanInfoDao.class:na]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:9) [nutz-1.r.61.r2.jar:na]
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updatePlanKjXyState(PxPlanInfoDao.java:1) [nutz-1.r.61.r2.jar:na]
	at com.ntswy.qa.action.QuestionAnswerAction.subExamForUser(QuestionAnswerAction.java:436) [QuestionAnswerAction.class:na]
	at com.ntswy.qa.action.QuestionAnswerAction$FM$subExamForUser$ed6dacc1c4b2a5debfef6fd7936ab235.invoke(QuestionAnswerAction.java) [nutz-1.r.61.r2.jar:na]
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at com.ntswy.common.processor.CommonProcessor.process(CommonProcessor.java:24) [CommonProcessor.class:na]
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.61.r2.jar:1.r.61.r2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.47]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.47]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.47]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.47]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.47]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.47]
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) [catalina.jar:7.0.47]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.47]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.47]
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) [tomcat-coyote.jar:7.0.47]
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) [tomcat-coyote.jar:7.0.47]
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) [tomcat-coyote.jar:7.0.47]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
org.nutz.dao.DaoException: !Nutz SQL Error: 'WITH report1 as(SELECT a.id,a.xyId,b.kjId FROM PX_LJ_JD_XY a inner join PX_JD b ON a.gzId=b.gzId AND a.jdType=b.jdType inner join sys_user c ON c.deptCode='800' and c.userId=a.xyId and c.status = 1 and c.roleId=a.gzId where  a.xyId='10020723' AND a.state != '9'
),
report2 AS(
SELECT DISTINCT a.id FROM report1 a LEFT JOIN PX_PLAN_JD_KJ_XY b ON b.xyId=a.xyId AND b.state='9' AND a.kjId=b.kjId WHERE b.id is NULL
)
UPDATE PX_LJ_JD_XY SET state='9' FROM PX_LJ_JD_XY a where EXISTS(SELECT 1 FROM report1 where id=a.id) AND NOT EXISTS(SELECT 1 FROM report2 WHERE id=a.id)'
PreparedStatement: 
'WITH report1 as(SELECT a.id,a.xyId,b.kjId FROM PX_LJ_JD_XY a inner join PX_JD b ON a.gzId=b.gzId AND a.jdType=b.jdType inner join sys_user c ON c.deptCode='800' and c.userId=a.xyId and c.status = 1 and c.roleId=a.gzId where  a.xyId='10020723' AND a.state != '9'
),
report2 AS(
SELECT DISTINCT a.id FROM report1 a LEFT JOIN PX_PLAN_JD_KJ_XY b ON b.xyId=a.xyId AND b.state='9' AND a.kjId=b.kjId WHERE b.id is NULL
)
UPDATE PX_LJ_JD_XY SET state='9' FROM PX_LJ_JD_XY a where EXISTS(SELECT 1 FROM report1 where id=a.id) AND NOT EXISTS(SELECT 1 FROM report2 WHERE id=a.id)'
CaseMessage=该语句没有返回结果集。
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:104)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
	at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
	at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
	at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:158)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithTransaction(NutDaoRunner.java:104)
	at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:88)
	at org.nutz.dao.impl.sql.run.NutDaoRunner$1.run(NutDaoRunner.java:74)
	at org.nutz.trans.Trans.exec(Trans.java:174)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:72)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:245)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:257)
	at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:241)
	at org.nutz.dao.impl.NutDao.execute(NutDao.java:965)
	at com.ntswy.px.dao.PxPlanInfoDao.updateLjJdXyStateByXyId(PxPlanInfoDao.java:541)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:12)
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updateLjJdXyStateByXyId(PxPlanInfoDao.java:1)
	at com.ntswy.px.dao.PxPlanInfoDao.updateLjJdXyStateByXyId(PxPlanInfoDao.java:506)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:11)
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updateLjJdXyStateByXyId(PxPlanInfoDao.java:1)
	at com.ntswy.px.dao.PxPlanInfoDao.updatePlanKjXyState(PxPlanInfoDao.java:413)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP._aop_invoke(PxPlanInfoDao.java:9)
	at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
	at org.nutz.aop.interceptor.TransactionInterceptor.filter(TransactionInterceptor.java:34)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
	at com.ntswy.px.dao.PxPlanInfoDao$$NUTZAOP.updatePlanKjXyState(PxPlanInfoDao.java:1)
	at com.ntswy.qa.action.QuestionAnswerAction.subExamForUser(QuestionAnswerAction.java:436)
	at com.ntswy.qa.action.QuestionAnswerAction$FM$subExamForUser$ed6dacc1c4b2a5debfef6fd7936ab235.invoke(QuestionAnswerAction.java)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.ntswy.common.processor.CommonProcessor.process(CommonProcessor.java:24)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 该语句没有返回结果集。
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:170)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:794)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(SQLServerStatement.java:620)
	at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53)
	... 70 more
16:01:31 [ERROR] com.ntswy.qa.action.QuestionAnswerAction - 发生异常org.nutz.dao.DaoException: !Nutz SQL Error: 'WITH report1 as(SELECT a.id,a.xyId,b.kjId FROM PX_LJ_JD_XY a inner join PX_JD b ON a.gzId=b.gzId AND a.jdType=b.jdType inner join sys_user c ON c.deptCode='800' and c.userId=a.xyId and c.status = 1 and c.roleId=a.gzId where  a.xyId='10020723' AND a.state != '9'
),
report2 AS(
SELECT DISTINCT a.id FROM report1 a LEFT JOIN PX_PLAN_JD_KJ_XY b ON b.xyId=a.xyId AND b.state='9' AND a.kjId=b.kjId WHERE b.id is NULL
)
UPDATE PX_LJ_JD_XY SET state='9' FROM PX_LJ_JD_XY a where EXISTS(SELECT 1 FROM report1 where id=a.id) AND NOT EXISTS(SELECT 1 FROM report2 WHERE id=a.id)'
PreparedStatement: 
'WITH report1 as(SELECT a.id,a.xyId,b.kjId FROM PX_LJ_JD_XY a inner join PX_JD b ON a.gzId=b.gzId AND a.jdType=b.jdType inner join sys_user c ON c.deptCode='800' and c.userId=a.xyId and c.status = 1 and c.roleId=a.gzId where  a.xyId='10020723' AND a.state != '9'
),
report2 AS(
SELECT DISTINCT a.id FROM report1 a LEFT JOIN PX_PLAN_JD_KJ_XY b ON b.xyId=a.xyId AND b.state='9' AND a.kjId=b.kjId WHERE b.id is NULL
)
UPDATE PX_LJ_JD_XY SET state='9' FROM PX_LJ_JD_XY a where EXISTS(SELECT 1 FROM report1 where id=a.id) AND NOT EXISTS(SELECT 1 FROM report2 WHERE id=a.id)'
CaseMessage=该语句没有返回结果集。

/**
	 *更新学员的路径完成情况
	 *
	 */
	public void updateLjJdXyStateByXyId(String xyId, String conditionForLjChange) throws Exception{
		Sql sql = dao().sqls().create("updateLjJdXyStateByXyId");
		if(StrUtil.isNull(conditionForLjChange)) {//更新单个学员完成情况
			sql.setVar("sqlParam", " a.xyId='"+xyId+"'");
		}else {//阶段路径变更时自动处理学员完成情况
		}
		this.dao().execute(sql);
	}
8 回复

是不是调用了sql.forceExecQuery

最后我贴了代码了 没有加这个

sql.setType(SqlType.UPDATE) 试试

undefined 没有这个方法

大概是这个名字, 有自动提示啦

我找了的 只有getSqlType没有set的

用了nutz-1.r.68-20190109.084150-1.jar还是没有

添加回复
请先登陆
回到顶部