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

QQ登录

只需一步,快速开始

查看: 4851|回复: 11

考勤上报--考勤汇总 点击重新汇总报错

[复制链接]

55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
发表于 2013-12-10 15:46:00 | 显示全部楼层 |阅读模式
如题。

39

主题

1379

帖子

2464

积分

金牌会员

Rank: 6Rank: 6

积分
2464
发表于 2013-12-12 08:37:55 | 显示全部楼层
看一下是不是这个帖子里说的问题
http://bbs.justep.com/forum.php? ... &extra=page%3D1

55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:16:12 | 显示全部楼层
问题不太相同,我在选择完部门后,点击汇总,报如下错误:
执行ksql:insert into HR_CR_CheckCollect1 cc(cc,cc.fMasterID,cc.fCode, cc.fDEPTID,cc.fDEPTNAME,cc.fFID,cc.fPEOPLEID,cc.fPEOPLENAME,cc.fDAY1,cc.fDAY2, cc.fDAY3,cc.fDAY4,cc.fDAY5,cc.fDAY6,cc.fDAY7,cc.fDAY8,cc.fDAY9,cc.fDAY10,cc.fDAY11,cc.fDAY12, cc.fDAY13,cc.fDAY14,cc.fDAY15,cc.fDAY16,cc.fDAY17,cc.fDAY18,cc.fDAY19,cc.fDAY20,cc.fDAY21, cc.fDAY22,cc.fDAY23,cc.fDAY24,cc.fDAY25,cc.fDAY26,cc.fDAY27,cc.fDAY28,cc.fDAY29,cc.fDAY30, cc.fDAY31,cc.fDayShift,cc.fAbsenceLate,cc.fAbsenceEarly,cc.fDayOffYear,cc.fAbsencePrivate,cc.fAbsenceSick,cc.fDayOffNormal,cc.fDayOffShutdown,cc.fDayOffHomeLeave,cc.fDayOffWedding,cc.fDayOffMaternity,cc.fDayOffFuneral,cc.fDayOffTravel,cc.fDayOffTraining,cc.fAbsenceNeglect,cc.fDayOffInjury,cc.fDayOffConvalescent,cc.fFactDuty,cc.fPresentDuty,cc.fOverTimeWorkDay,cc.fOverTimeTurn,cc.fOverTimeHoliday,cc.fWaitPosition,cc.version) (select guid() as GUID, 'DDC09295B7F54FFA8FE5EDE182067751' as fMasterID, max(y.fEmployeeCode) as fEmployeeCode, max(y.fDeptID) as fDeptID, max(y.fDeptName) as fDeptName, max(y.fFID) as fFID, max(y.fEmployeeID) as fEmployeeID, max(y.fName) as fName, sum(case when y.fDay='01' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay1, sum(case when y.fDay='02' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay2, sum(case when y.fDay='03' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay3, sum(case when y.fDay='04' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay4, sum(case when y.fDay='05' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay5, sum(case when y.fDay='06' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay6, sum(case when y.fDay='07' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay7, sum(case when y.fDay='08' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay8, sum(case when y.fDay='09' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay9, sum(case when y.fDay='10' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay10, sum(case when y.fDay='11' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay11, sum(case when y.fDay='12' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay12, sum(case when y.fDay='13' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay13, sum(case when y.fDay='14' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay14, sum(case when y.fDay='15' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay15, sum(case when y.fDay='16' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay16, sum(case when y.fDay='17' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay17, sum(case when y.fDay='18' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay18, sum(case when y.fDay='19' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay19, sum(case when y.fDay='20' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay20, sum(case when y.fDay='21' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay21, sum(case when y.fDay='22' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay22, sum(case when y.fDay='23' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay23, sum(case when y.fDay='24' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay24, sum(case when y.fDay='25' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay25, sum(case when y.fDay='26' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay26, sum(case when y.fDay='27' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay27, sum(case when y.fDay='28' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay28, sum(case when y.fDay='29' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay29, sum(case when y.fDay='30' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay30, sum(case when y.fDay='31' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay31, round(sum(case when y.fCheckItemName ='出勤' then y.fCheckItemValue/8 else 0 end),1) as fDayShift, round(sum(case when y.fCheckItemName = '迟到' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceLate, round(sum(case when y.fCheckItemName = '早退' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceEarly, round(sum(case when y.fCheckItemName = '年休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffYear, round(sum(case when y.fCheckItemName = '事假' then y.fCheckItemValue/8 else 0 end),1) as fAbsencePrivate, round(sum(case when y.fCheckItemName = '病假' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceSick, round(sum(case when y.fCheckItemName = '正常休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffNormal, round(sum(case when y.fCheckItemName = '停工休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffShutdown, round(sum(case when y.fCheckItemName = '探亲假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffHomeLeave, round(sum(case when y.fCheckItemName = '婚假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffWedding, round(sum(case when y.fCheckItemName = '产假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffMaternity, round(sum(case when y.fCheckItemName = '丧假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffFuneral, round(sum(case when y.fCheckItemName = '公派出差' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTravel, round(sum(case when y.fCheckItemName = '培训学习(一个月以内)' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTraining, round(sum(case when y.fCheckItemName = '旷工' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceNeglect, round(sum(case when y.fCheckItemName = '工伤休养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffInjury, round(sum(case when y.fCheckItemName = '疗养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffConvalescent, round(sum(case when y.fCheckItemName = '实出勤' then y.fCheckItemValue/8 else 0 end),1) as fFactDuty, round(sum(case when y.fCheckItemName = '全勤' then y.fCheckItemValue/8 else 0 end),1) as fPresentDuty, round(sum(case when y.fCheckItemName = '工作日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeWorkDay, round(sum(case when y.fCheckItemName = '周末加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeTurn, round(sum(case when y.fCheckItemName = '法定节假日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeHoliday, round(sum(case when y.fCheckItemName = '待岗' then y.fCheckItemValue/8 else 0 end),1) as fWaitPosition, 0 as version from (select getDay(c.fDATE) as fDay, getMonth(c.fDATE) as fMonth, e.fCode as fEmployeeCode, e as fEmployeeID, e.fName as fName, e.fDeptID as fDeptID, e.fDeptName as fDeptName, pa.fFID as fFID, c.fCHECKITEMNAME as fCheckItemName, c.fCHECKITEMVALUE as fCheckItemValue from HR_EP_Employee e optional join HR_CR_EVERYDAYCHECK1 c on e = c.fEMPLOYEEID and (( getYear(c.fDATE) = 2013 and getMonth(c.fDATE) = 8 and getDay(c.fDATE) >=1 and getDay(c.fDATE) <=31) and c.fMASTERID in (select ec from HR_CR_EVERYDAYCHECK ec where ec.fBizState = 'bsFinished')) join (select o as fID, o.fFID AS fFID from HR_OG_Org o join (select distinct concat(fFID , '%') as fFID from HR_OG_Org oo where oo = '9D1CCD558D2743F0A25AB2FF3DCD9C36') p on o.fFID like p.fFID) pa on e.fDeptID = pa.fID ) y group by y.fEmployeeID)时出错!


55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:17:54 | 显示全部楼层
控制台错误:
2013-12-12 09:16:01 invokeActions error!
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.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        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

55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:18:10 | 显示全部楼层
Caused by: com.justep.model.exception.ModelException: 执行ksql:insert into HR_CR_CheckCollect1 cc(cc,cc.fMasterID,cc.fCode, cc.fDEPTID,cc.fDEPTNAME,cc.fFID,cc.fPEOPLEID,cc.fPEOPLENAME,cc.fDAY1,cc.fDAY2, cc.fDAY3,cc.fDAY4,cc.fDAY5,cc.fDAY6,cc.fDAY7,cc.fDAY8,cc.fDAY9,cc.fDAY10,cc.fDAY11,cc.fDAY12, cc.fDAY13,cc.fDAY14,cc.fDAY15,cc.fDAY16,cc.fDAY17,cc.fDAY18,cc.fDAY19,cc.fDAY20,cc.fDAY21, cc.fDAY22,cc.fDAY23,cc.fDAY24,cc.fDAY25,cc.fDAY26,cc.fDAY27,cc.fDAY28,cc.fDAY29,cc.fDAY30, cc.fDAY31,cc.fDayShift,cc.fAbsenceLate,cc.fAbsenceEarly,cc.fDayOffYear,cc.fAbsencePrivate,cc.fAbsenceSick,cc.fDayOffNormal,cc.fDayOffShutdown,cc.fDayOffHomeLeave,cc.fDayOffWedding,cc.fDayOffMaternity,cc.fDayOffFuneral,cc.fDayOffTravel,cc.fDayOffTraining,cc.fAbsenceNeglect,cc.fDayOffInjury,cc.fDayOffConvalescent,cc.fFactDuty,cc.fPresentDuty,cc.fOverTimeWorkDay,cc.fOverTimeTurn,cc.fOverTimeHoliday,cc.fWaitPosition,cc.version) (select guid() as GUID, 'DDC09295B7F54FFA8FE5EDE182067751' as fMasterID, max(y.fEmployeeCode) as fEmployeeCode, max(y.fDeptID) as fDeptID, max(y.fDeptName) as fDeptName, max(y.fFID) as fFID, max(y.fEmployeeID) as fEmployeeID, max(y.fName) as fName, sum(case when y.fDay='01' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay1, sum(case when y.fDay='02' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay2, sum(case when y.fDay='03' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay3, sum(case when y.fDay='04' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay4, sum(case when y.fDay='05' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay5, sum(case when y.fDay='06' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay6, sum(case when y.fDay='07' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay7, sum(case when y.fDay='08' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay8, sum(case when y.fDay='09' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay9, sum(case when y.fDay='10' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay10, sum(case when y.fDay='11' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay11, sum(case when y.fDay='12' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay12, sum(case when y.fDay='13' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay13, sum(case when y.fDay='14' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay14, sum(case when y.fDay='15' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay15, sum(case when y.fDay='16' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay16, sum(case when y.fDay='17' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay17, sum(case when y.fDay='18' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay18, sum(case when y.fDay='19' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay19, sum(case when y.fDay='20' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay20, sum(case when y.fDay='21' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay21, sum(case when y.fDay='22' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay22, sum(case when y.fDay='23' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay23, sum(case when y.fDay='24' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay24, sum(case when y.fDay='25' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay25, sum(case when y.fDay='26' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay26, sum(case when y.fDay='27' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay27, sum(case when y.fDay='28' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay28, sum(case when y.fDay='29' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay29, sum(case when y.fDay='30' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay30, sum(case when y.fDay='31' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay31, round(sum(case when y.fCheckItemName ='出勤' then y.fCheckItemValue/8 else 0 end),1) as fDayShift, round(sum(case when y.fCheckItemName = '迟到' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceLate, round(sum(case when y.fCheckItemName = '早退' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceEarly, round(sum(case when y.fCheckItemName = '年休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffYear, round(sum(case when y.fCheckItemName = '事假' then y.fCheckItemValue/8 else 0 end),1) as fAbsencePrivate, round(sum(case when y.fCheckItemName = '病假' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceSick, round(sum(case when y.fCheckItemName = '正常休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffNormal, round(sum(case when y.fCheckItemName = '停工休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffShutdown, round(sum(case when y.fCheckItemName = '探亲假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffHomeLeave, round(sum(case when y.fCheckItemName = '婚假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffWedding, round(sum(case when y.fCheckItemName = '产假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffMaternity, round(sum(case when y.fCheckItemName = '丧假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffFuneral, round(sum(case when y.fCheckItemName = '公派出差' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTravel, round(sum(case when y.fCheckItemName = '培训学习(一个月以内)' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTraining, round(sum(case when y.fCheckItemName = '旷工' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceNeglect, round(sum(case when y.fCheckItemName = '工伤休养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffInjury, round(sum(case when y.fCheckItemName = '疗养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffConvalescent, round(sum(case when y.fCheckItemName = '实出勤' then y.fCheckItemValue/8 else 0 end),1) as fFactDuty, round(sum(case when y.fCheckItemName = '全勤' then y.fCheckItemValue/8 else 0 end),1) as fPresentDuty, round(sum(case when y.fCheckItemName = '工作日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeWorkDay, round(sum(case when y.fCheckItemName = '周末加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeTurn, round(sum(case when y.fCheckItemName = '法定节假日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeHoliday, round(sum(case when y.fCheckItemName = '待岗' then y.fCheckItemValue/8 else 0 end),1) as fWaitPosition, 0 as version from (select getDay(c.fDATE) as fDay,  getMonth(c.fDATE) as fMonth, e.fCode as fEmployeeCode, e as fEmployeeID, e.fName as fName, e.fDeptID as fDeptID, e.fDeptName as fDeptName, pa.fFID as fFID, c.fCHECKITEMNAME as fCheckItemName, c.fCHECKITEMVALUE as fCheckItemValue from HR_EP_Employee e optional join HR_CR_EVERYDAYCHECK1 c on e = c.fEMPLOYEEID and (( getYear(c.fDATE) = 2013 and getMonth(c.fDATE) = 8 and getDay(c.fDATE) >=1 and getDay(c.fDATE) <=31) and c.fMASTERID in (select ec from HR_CR_EVERYDAYCHECK ec where ec.fBizState = 'bsFinished'))  join (select o as fID, o.fFID AS fFID from HR_OG_Org o  join (select distinct concat(fFID , '%') as fFID from HR_OG_Org oo where oo = '9D1CCD558D2743F0A25AB2FF3DCD9C36') p on o.fFID like p.fFID) pa on e.fDeptID = pa.fID ) y group by y.fEmployeeID)时出错!
       

55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:18:48 | 显示全部楼层
at com.justep.system.data.impl.TableUtilsImplement.ksqlInsert(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.checkreport.CheckFunc.monthCheckCollectRecordTc(CheckFunc.java:244)
        at CheckFuncAction.monthCheckCollectRecordTc(CheckFuncAction.java:13)
        ... 26 more
Caused by: com.justep.model.exception.ModelException: 互逆关系HR_OG_Org.fParent <-> HR_OG_Org.fChildren必须有一个定义mapping!
        at com.justep.util.Utils.check(Unknown Source)
        at com.justep.system.ksql.ConceptMapping.fillDefaultMapping(Unknown Source)
        at com.justep.system.ksql.ConceptMapping.getConceptMapping(Unknown Source)
        at com.justep.system.ksql.parser.AbstractParser.confirmSymTable(Unknown Source)
        at com.justep.system.ksql.parser.AbstractParser.parse(Unknown Source)
        ... 33 more
2013-12-12 09:16:01 excute Action error:<?xml version="1.0" encoding="UTF-8"?>
<action direct-execute="false" process="/HR/checkReport/process/checkCollect/checkCollectProcess" activity="checkCollect" action-flag="__action_0__" executor="" execute-context="" name="monthCheckCollectRecordTcAction"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="AParentID"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[DDC09295B7F54FFA8FE5EDE182067751]]></xbiz:simple></parameter><parameter name="ADeptID"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[9D1CCD558D2743F0A25AB2FF3DCD9C36]]></xbiz:simple></parameter><parameter name="curYear"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[2013]]></xbiz:simple></parameter><parameter name="curMonth"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[8]]></xbiz:simple></parameter></parameters></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.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        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


55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:20:14 | 显示全部楼层
Caused by: com.justep.model.exception.ModelException: 执行ksql:insert into HR_CR_CheckCollect1 cc(cc,cc.fMasterID,cc.fCode, cc.fDEPTID,cc.fDEPTNAME,cc.fFID,cc.fPEOPLEID,cc.fPEOPLENAME,cc.fDAY1,cc.fDAY2, cc.fDAY3,cc.fDAY4,cc.fDAY5,cc.fDAY6,cc.fDAY7,cc.fDAY8,cc.fDAY9,cc.fDAY10,cc.fDAY11,cc.fDAY12, cc.fDAY13,cc.fDAY14,cc.fDAY15,cc.fDAY16,cc.fDAY17,cc.fDAY18,cc.fDAY19,cc.fDAY20,cc.fDAY21, cc.fDAY22,cc.fDAY23,cc.fDAY24,cc.fDAY25,cc.fDAY26,cc.fDAY27,cc.fDAY28,cc.fDAY29,cc.fDAY30, cc.fDAY31,cc.fDayShift,cc.fAbsenceLate,cc.fAbsenceEarly,cc.fDayOffYear,cc.fAbsencePrivate,cc.fAbsenceSick,cc.fDayOffNormal,cc.fDayOffShutdown,cc.fDayOffHomeLeave,cc.fDayOffWedding,cc.fDayOffMaternity,cc.fDayOffFuneral,cc.fDayOffTravel,cc.fDayOffTraining,cc.fAbsenceNeglect,cc.fDayOffInjury,cc.fDayOffConvalescent,cc.fFactDuty,cc.fPresentDuty,cc.fOverTimeWorkDay,cc.fOverTimeTurn,cc.fOverTimeHoliday,cc.fWaitPosition,cc.version) (select guid() as GUID, 'DDC09295B7F54FFA8FE5EDE182067751' as fMasterID, max(y.fEmployeeCode) as fEmployeeCode, max(y.fDeptID) as fDeptID, max(y.fDeptName) as fDeptName, max(y.fFID) as fFID, max(y.fEmployeeID) as fEmployeeID, max(y.fName) as fName, sum(case when y.fDay='01' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay1, sum(case when y.fDay='02' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay2, sum(case when y.fDay='03' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay3, sum(case when y.fDay='04' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay4, sum(case when y.fDay='05' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay5, sum(case when y.fDay='06' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay6, sum(case when y.fDay='07' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay7, sum(case when y.fDay='08' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay8, sum(case when y.fDay='09' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay9, sum(case when y.fDay='10' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay10, sum(case when y.fDay='11' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay11, sum(case when y.fDay='12' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay12, sum(case when y.fDay='13' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay13, sum(case when y.fDay='14' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay14, sum(case when y.fDay='15' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay15, sum(case when y.fDay='16' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay16, sum(case when y.fDay='17' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay17, sum(case when y.fDay='18' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay18, sum(case when y.fDay='19' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay19, sum(case when y.fDay='20' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay20, sum(case when y.fDay='21' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay21, sum(case when y.fDay='22' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay22, sum(case when y.fDay='23' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay23, sum(case when y.fDay='24' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay24, sum(case when y.fDay='25' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay25, sum(case when y.fDay='26' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay26, sum(case when y.fDay='27' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay27, sum(case when y.fDay='28' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay28, sum(case when y.fDay='29' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay29, sum(case when y.fDay='30' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay30, sum(case when y.fDay='31' and fMonth='08' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay31, round(sum(case when y.fCheckItemName ='出勤' then y.fCheckItemValue/8 else 0 end),1) as fDayShift, round(sum(case when y.fCheckItemName = '迟到' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceLate, round(sum(case when y.fCheckItemName = '早退' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceEarly, round(sum(case when y.fCheckItemName = '年休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffYear, round(sum(case when y.fCheckItemName = '事假' then y.fCheckItemValue/8 else 0 end),1) as fAbsencePrivate, round(sum(case when y.fCheckItemName = '病假' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceSick, round(sum(case when y.fCheckItemName = '正常休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffNormal, round(sum(case when y.fCheckItemName = '停工休假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffShutdown, round(sum(case when y.fCheckItemName = '探亲假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffHomeLeave, round(sum(case when y.fCheckItemName = '婚假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffWedding, round(sum(case when y.fCheckItemName = '产假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffMaternity, round(sum(case when y.fCheckItemName = '丧假' then y.fCheckItemValue/8 else 0 end),1) as fDayOffFuneral, round(sum(case when y.fCheckItemName = '公派出差' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTravel, round(sum(case when y.fCheckItemName = '培训学习(一个月以内)' then y.fCheckItemValue/8 else 0 end),1) as fDayOffTraining, round(sum(case when y.fCheckItemName = '旷工' then y.fCheckItemValue/8 else 0 end),1) as fAbsenceNeglect, round(sum(case when y.fCheckItemName = '工伤休养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffInjury, round(sum(case when y.fCheckItemName = '疗养' then y.fCheckItemValue/8 else 0 end),1) as fDayOffConvalescent, round(sum(case when y.fCheckItemName = '实出勤' then y.fCheckItemValue/8 else 0 end),1) as fFactDuty, round(sum(case when y.fCheckItemName = '全勤' then y.fCheckItemValue/8 else 0 end),1) as fPresentDuty, round(sum(case when y.fCheckItemName = '工作日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeWorkDay, round(sum(case when y.fCheckItemName = '周末加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeTurn, round(sum(case when y.fCheckItemName = '法定节假日加班' then y.fCheckItemValue/8 else 0 end),1) as fOverTimeHoliday, round(sum(case when y.fCheckItemName = '待岗' then y.fCheckItemValue/8 else 0 end),1) as fWaitPosition, 0 as version from (select getDay(c.fDATE) as fDay,  getMonth(c.fDATE) as fMonth, e.fCode as fEmployeeCode, e as fEmployeeID, e.fName as fName, e.fDeptID as fDeptID, e.fDeptName as fDeptName, pa.fFID as fFID, c.fCHECKITEMNAME as fCheckItemName, c.fCHECKITEMVALUE as fCheckItemValue from HR_EP_Employee e optional join HR_CR_EVERYDAYCHECK1 c on e = c.fEMPLOYEEID and (( getYear(c.fDATE) = 2013 and getMonth(c.fDATE) = 8 and getDay(c.fDATE) >=1 and getDay(c.fDATE) <=31) and c.fMASTERID in (select ec from HR_CR_EVERYDAYCHECK ec where ec.fBizState = 'bsFinished'))  join (select o as fID, o.fFID AS fFID from HR_OG_Org o  join (select distinct concat(fFID , '%') as fFID from HR_OG_Org oo where oo = '9D1CCD558D2743F0A25AB2FF3DCD9C36') p on o.fFID like p.fFID) pa on e.fDeptID = pa.fID ) y group by y.fEmployeeID)时出错!
       


55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-12 09:20:42 | 显示全部楼层
at com.justep.system.data.impl.TableUtilsImplement.ksqlInsert(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.checkreport.CheckFunc.monthCheckCollectRecordTc(CheckFunc.java:244)
        at CheckFuncAction.monthCheckCollectRecordTc(CheckFuncAction.java:13)
        ... 26 more
Caused by: com.justep.model.exception.ModelException: 互逆关系HR_OG_Org.fParent <-> HR_OG_Org.fChildren必须有一个定义mapping!
        at com.justep.util.Utils.check(Unknown Source)
        at com.justep.system.ksql.ConceptMapping.fillDefaultMapping(Unknown Source)
        at com.justep.system.ksql.ConceptMapping.getConceptMapping(Unknown Source)
        at com.justep.system.ksql.parser.AbstractParser.confirmSymTable(Unknown Source)
        at com.justep.system.ksql.parser.AbstractParser.parse(Unknown Source)
        ... 33 more

39

主题

1379

帖子

2464

积分

金牌会员

Rank: 6Rank: 6

积分
2464
发表于 2013-12-12 12:13:10 | 显示全部楼层
james 发表于 2013-12-12 09:20
at com.justep.system.data.impl.TableUtilsImplement.ksqlInsert(Unknown Source)
        at com.justep.system. ...

检查一下mapping文件,看这两个字段是不是都没有在mapping中

55

主题

201

帖子

367

积分

中级会员

Rank: 3Rank: 3

积分
367
QQ
 楼主| 发表于 2013-12-13 10:56:23 | 显示全部楼层
我在mapping中添加了fParent字段,然后功能可以用了,但是有点不明白,为什么这样就对了?
高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

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

GMT+8, 2024-4-20 07:14 , Processed in 0.075165 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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