|
新建机构。。执行ksql失败。。代码什么的没改动过
getExistOrgs:
addOrgToSys ksql:select o.* from HR_OG_Org o where o in('E6B9A0A8B1BF4EA68EF470E5622C879A')
ksqlClear:update HR_OG_Org o set o.fFID = null,o.fFCode = null,o.fFName = null where (o in ('E6B9A0A8B1BF4EA68EF470E5622C879A')) or (o.fFID like '/E6B9A0A8B1BF4EA68EF470E5622C879A.ogn/%')
ksqlUpdateRootURL:update HR_OG_Org o set o.fFID = concat('/',o,'.',o.fOrgKindID), o.fFCode = concat('/',o.fCode), o.fFName = concat('/',o.fName) where o.fParent is null
ksqlUpdateURL:update HR_OG_Org a set a.fFID = (select concat(b.fFID,'/',a,'.',a.fOrgKindID) from HR_OG_Org b where b = a.fParent), a.fFCode = (select concat(b.fFCode,'/',a.fCode) from HR_OG_Org b where b = a.fParent), a.fFName = (select concat(b.fFName,'/',a.fName) from HR_OG_Org b where b = a.fParent) where a.fFID is null and a.fParent in(select o from HR_OG_Org o where o.fFID is not null)
2018-08-16 09:40:07 action:<?xml version="1.0" encoding="UTF-8"?>
<actions><action direct-execute="false" process="/HR/org/process/orgManage/orgManageProcess" activity="orgManageActivity" action-flag="__action_2__" executor="" execute-context="" name="HROrgSaveAction" accept="*/*"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="table"><xbiz:table><rows><userdata name="model">/HR/org/data</userdata><userdata name="id-column-name">HR_OG_Org</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">HR_OG_Org</userdata><userdata name="userdata">whereVersion</userdata><userdata name="relations">HR_OG_Org.fName,EXPRESS,HR_OG_Org.fCode,HR_OG_Org.fShortName,HR_OG_Org.fFName,HR_OG_Org.fFCode,HR_OG_Org.fFID,HR_OG_Org.fOrgKindID,HR_OG_Org.fParent,HR_OG_Org.fLevel,HR_OG_Org.fPhone,HR_OG_Org.fFax,HR_OG_Org.fAddress,HR_OG_Org.fZip,HR_OG_Org.fDescription,HR_OG_Org.fPersonID,HR_OG_Org.fNodeKind,HR_OG_Org.fManager,HR_OG_Org.fIsPayOrg,HR_OG_Org.fUseStatus,HR_OG_Org.fUseStatusName,HR_OG_Org.fUpdatePsnID,HR_OG_Org.fUpdatePsnName,HR_OG_Org.fUpdateTime,HR_OG_Org.version,HR_OG_Org.fLongName,HR_OG_Org.fSequence,HR_OG_Org.fEmail,EXPRESS</userdata><userdata name="relation-types">String,Object,String,String,String,String,String,String,String,Integer,String,String,String,String,String,String,String,String,String,String,String,String,String,DateTime,Integer,String,String,String,Object</userdata><userdata name="relation-alias">fName,space-column,fCode,fShortName,fFName,fFCode,fFID,fOrgKindID,fParent,fLevel,fPhone,fFax,fAddress,fZip,fDescription,fPersonID,fNodeKind,fManager,fIsPayOrg,fUseStatus,fUseStatusName,fUpdatePsnID,fUpdatePsnName,fUpdateTime,version,fLongName,fSequence,fEmail,isCodeOrNameChanged</userdata><userdata name="sys.rowid">HR_OG_Org</userdata><userdata name="concept">HR_OG_Org</userdata><userdata name="concept-alias">HR_OG_Org</userdata><userdata name="update-mode">whereVersion</userdata><row id="E6B9A0A8B1BF4EA68EF470E5622C879A" original-id="undefined" selected="1"><userdata name="recordState">new</userdata><cell original-value="" changed="1" image="/x5/UI/HR/common/images/org.gif?$v=undefined">3456</cell><cell original-value="" changed="1"/><cell changed="1" original-value="">1</cell><cell changed="1" original-value=""/><cell changed="1" original-value="">%2F3456</cell><cell changed="1" original-value="">%2F1</cell><cell changed="1" original-value="">%2FE6B9A0A8B1BF4EA68EF470E5622C879A.ogn</cell><cell changed="1" original-value="ogn">ogn</cell><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value="0">0</cell><cell changed="1" original-value="%E6%9C%AA%E5%90%AF%E7%94%A8">%E6%9C%AA%E5%90%AF%E7%94%A8</cell><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell original-value="0">0</cell><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell changed="1" original-value=""/><cell original-value="">1</cell></row></rows></xbiz:table></parameter></parameters></action><action direct-execute="false" process="/HR/org/process/orgManage/orgManageProcess" activity="orgManageActivity" action-flag="__action_3__" executor="" execute-context="" name="syncOrgAction" accept="*/*"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="orgIDs"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[E6B9A0A8B1BF4EA68EF470E5622C879A]]></xbiz:simple></parameter><parameter name="codeOrNameChangedIDs"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[E6B9A0A8B1BF4EA68EF470E5622C879A]]></xbiz:simple></parameter></parameters></action></actions>
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.justep.system.action.Engine.invokeActions(Native Method)
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.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:723)
at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.justep.micro.service.MicroServiceFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: update HR_OG_Org a set a.fFID = (select concat(b.fFID,'/',a,'.',a.fOrgKindID) from HR_OG_Org b where b = a.fParent), a.fFCode = (select concat(b.fFCode,'/',a.fCode) from HR_OG_Org b where b = a.fParent), a.fFName = (select concat(b.fFName,'/',a.fName) from HR_OG_Org b where b = a.fParent) where a.fFID is null and a.fParent in(select o from HR_OG_Org o where o.fFID is not null)
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlUpdate(Unknown Source)
at com.justep.system.data.impl.TableUtilsImplement.ksqlExecuteUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.justep.system.data.KSQL.executeUpdate(Unknown Source)
at com.x5hr.org.HROrgURL.reBuildOrgURL(HROrgURL.java:42)
at com.x5hr.org.HROrgSync.synchronizeHROrgToSA(HROrgSync.java:22)
at HRToSystemSync.orgSync(HRToSystemSync.java:10)
... 30 more
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: UPDATE HR_OG_Org SET HR_OG_Org.FFID = (SELECT concat_ws('',b.FFID, ?, HR_OG_Org.fID, ?, HR_OG_Org.FORGKINDID) FROM HR_OG_Org b WHERE b.fID = HR_OG_Org.fParent), HR_OG_Org.FFCODE = (SELECT concat_ws('',b.FFCODE, ?, HR_OG_Org.FCODE) FROM HR_OG_Org b WHERE b.fID = HR_OG_Org.fParent), HR_OG_Org.FFNAME = (SELECT concat_ws('',b.FFNAME, ?, HR_OG_Org.FNAME) FROM HR_OG_Org b WHERE b.fID = HR_OG_Org.fParent) WHERE (HR_OG_Org.FFID IS NULL) AND (HR_OG_Org.fParent IN (SELECT o.fID FROM HR_OG_Org o WHERE o.FFID IS NOT NULL)) , binds: [/, ., /, /]出错
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.ksql.KSQLUtils.execSqlUpdate(Unknown Source)
... 38 more
Caused by: java.sql.SQLException: General error message from server: "You can't specify target table 'HR_OG_Org' for update in FROM clause"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2001)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2281) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
... 39 more
|
|