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

QQ登录

只需一步,快速开始

查看: 2506|回复: 6

[结贴] 从网上下的HR系统,考勤汇总中,点击汇总报错

[复制链接]

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
发表于 2014-9-9 14:33:28 | 显示全部楼层 |阅读模式
如题,请老师指导一下
考勤汇总中,点击汇总的时候,报错


控制台报错:
<action direct-execute="false" process="/HR/checkReport/process/checkCollect/checkCollectProcess" activity="checkCollect" action-flag="__action_0__" executor="PSN01" 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[0B388FED28354F88A53B48324FAE7F6D]]></xbiz:simple></parameter><parameter name="ADeptID"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[2CF94D0920CB49B59062ED0A03CEEB69]]></xbiz:simple></parameter><parameter name="curYear"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[11]]></xbiz:simple></parameter><parameter name="curMonth"><xbiz:simple type="http://www.w3.org/2001/XMLSchema#String"><![CDATA[11]]></xbiz:simple></parameter></parameters></action>
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)
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: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, 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, '0B388FED28354F88A53B48324FAE7F6D' 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='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay1, sum(case when y.fDay='02' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay2, sum(case when y.fDay='03' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay3, sum(case when y.fDay='04' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay4, sum(case when y.fDay='05' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay5, sum(case when y.fDay='06' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay6, sum(case when y.fDay='07' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay7, sum(case when y.fDay='08' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay8, sum(case when y.fDay='09' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay9, sum(case when y.fDay='10' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay10, sum(case when y.fDay='11' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay11, sum(case when y.fDay='12' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay12, sum(case when y.fDay='13' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay13, sum(case when y.fDay='14' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay14, sum(case when y.fDay='15' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay15, sum(case when y.fDay='16' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay16, sum(case when y.fDay='17' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay17, sum(case when y.fDay='18' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay18, sum(case when y.fDay='19' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay19, sum(case when y.fDay='20' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay20, sum(case when y.fDay='21' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay21, sum(case when y.fDay='22' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay22, sum(case when y.fDay='23' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay23, sum(case when y.fDay='24' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay24, sum(case when y.fDay='25' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay25, sum(case when y.fDay='26' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay26, sum(case when y.fDay='27' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay27, sum(case when y.fDay='28' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay28, sum(case when y.fDay='29' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay29, sum(case when y.fDay='30' and fMonth='11' and (y.fCheckItemName = '出勤') then fCheckItemValue else 0 end) as fDay30, sum(case when y.fDay='31' and fMonth='11' 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) = 11 and getMonth(c.fDATE) = 11 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 = '2CF94D0920CB49B59062ED0A03CEEB69') p on o.fFID like p.fFID) pa on e.fDeptID = pa.fID ) y group by y.fEmployeeID)
at com.justep.exception.BusinessException.create(Unknown Source)
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.exception.BusinessException: 编码: JUSTEP154009; 提示: 互逆关系HR_OG_Org.fParent <-> HR_OG_Org.fChildren, 必须有一个定义映射
at com.justep.exception.BusinessException.create(Unknown Source)
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

考勤汇总报错.jpg

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-9-9 14:40:06 | 显示全部楼层
检查一下mapping文件,看这两个字段是不是都没有在mapping中
参考http://bbs.justep.com/thread-54409-1-1.html
QQ:179785966

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-9 15:03:01 | 显示全部楼层
yinlun 发表于 2014-9-9 14:40
检查一下mapping文件,看这两个字段是不是都没有在mapping中
参考http://bbs.justep.com/thread-54409-1-1. ...

不好意思,没有找到您说的mapping文件请问是哪个?谢谢

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-9-9 15:09:57 | 显示全部楼层
zdq 发表于 2014-9-9 15:03
不好意思,没有找到您说的mapping文件请问是哪个?谢谢

在BIZ\HR\checkReport\data下
QQ:179785966

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-9 15:18:49 | 显示全部楼层
yinlun 发表于 2014-9-9 15:09
在BIZ\HR\checkReport\data下

Caused by: com.justep.model.exception.ModelException: 互逆关系HR_OG_Org.fParent <-> HR_OG_Org.fChildren必须有一个定义mapping!是这两个字段吧?
在checkCollect.mapping.m文件里没有找到fParent  和 fChildren 两个字段啊

310

主题

4938

帖子

4767

积分

论坛元老

Rank: 8Rank: 8

积分
4767
QQ
发表于 2014-9-9 15:40:29 | 显示全部楼层
zdq 发表于 2014-9-9 15:18
Caused by: com.justep.model.exception.ModelException: 互逆关系HR_OG_Org.fParent  HR_OG_Org.fChildr ...

选中HR_OG_ORG,如下图,在映射里添加fParent试试
QQ截图20140909153849.jpg

评分

参与人数 1 +8 收起 理由
jishuang + 8 赞一个!

查看全部评分

QQ:179785966

448

主题

1226

帖子

2613

积分

金牌会员

Rank: 6Rank: 6

积分
2613
QQ
 楼主| 发表于 2014-9-9 15:43:22 | 显示全部楼层
yinlun 发表于 2014-9-9 15:40
选中HR_OG_ORG,如下图,在映射里添加fParent试试

谢谢老师,按照您说的问题解决了。可以结贴了。
高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

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

GMT+8, 2024-11-22 10:19 , Processed in 0.109993 second(s), 30 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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