|
@@ -32,7 +32,7 @@
|
|
|
<select id="getPersonWorkList" resultType="java.util.Map">
|
|
|
select p.fnumber "personNumber",p.fname_l2 "personName",
|
|
|
whr.CFAffiliatedProjec "projectID", pm.CFProjectName "projectName",
|
|
|
- hre.CFClockTime "clockTime",hre.CfData "data",hre.CFWorkingHours "WorkingHours",
|
|
|
+ hre.CFClockTime "clockTime",to_char(hre.CfData,'YYYY-MM-DD') "data",hre.CFWorkingHours "WorkingHours",
|
|
|
whr.fbillState "state",hre.fid "id"
|
|
|
from CT_PRO_WorkHoursReportEntry hre
|
|
|
left join CT_PRO_WorkHoursReport whr on whr.fid=hre.FParentID
|
|
@@ -41,7 +41,12 @@
|
|
|
where p.fnumber=#{number}
|
|
|
and hre.CfData BETWEEN to_date(#{beginTime},'YYYY-MM-DD')
|
|
|
AND to_date(#{endTime},'YYYY-MM-DD')
|
|
|
- and whr.fbillState=#{state}
|
|
|
+ <if test="state==true">
|
|
|
+ and whr.fbillState=1
|
|
|
+ </if>
|
|
|
+ <if test="state==false">
|
|
|
+ and whr.fbillState=0
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="getPersonWorkSumInfo" resultType="java.util.Map">
|
|
|
select whr.fbillState "state",sum(hre.CFWorkingHours) "WorkingHours"
|
|
@@ -52,7 +57,12 @@
|
|
|
where p.fnumber=#{number}
|
|
|
and hre.CfData BETWEEN to_date(#{beginTime},'YYYY-MM-DD')
|
|
|
AND to_date(#{endTime},'YYYY-MM-DD')
|
|
|
- and whr.fbillState=#{state}
|
|
|
+ <if test="state==true">
|
|
|
+ and whr.fbillState=1
|
|
|
+ </if>
|
|
|
+ <if test="state==false">
|
|
|
+ and whr.fbillState=0
|
|
|
+ </if>
|
|
|
group by whr.fbillState
|
|
|
</select>
|
|
|
<insert id="insertBill" parameterType="java.util.List" >
|
|
@@ -64,32 +74,31 @@
|
|
|
FLastUpdateTime, FControlUnitID,FID,
|
|
|
CFDataSource,CFFillingStartDate,CFFillingEndDate
|
|
|
)
|
|
|
- values
|
|
|
- <foreach collection="billList" item="item" index="index" separator=",">
|
|
|
- (
|
|
|
+ <foreach collection="billList" item="item" index="index" separator="UNION ALL">
|
|
|
+ SELECT
|
|
|
#{item.affiliatedProject}, #{item.adminOrg}, #{item.hrOrgUnit},
|
|
|
#{item.billState}, #{item.number}, #{item.bizDate},
|
|
|
#{item.creator}, SYSDATE, #{item.lastUpdateUser},
|
|
|
SYSDATE, #{item.CU}, #{item.id},
|
|
|
'employeeReport', #{item.fillingStartDate}, #{item.fillingEndDate}
|
|
|
- )
|
|
|
+ FROM dual
|
|
|
</foreach>
|
|
|
+
|
|
|
</insert>
|
|
|
+
|
|
|
<insert id="insertWork" parameterType="java.util.List">
|
|
|
- INSERT
|
|
|
- into CT_PRO_WorkHoursReportEntry(FParentID,CFEmployeeID,CFClockTime,
|
|
|
+ INSERT into CT_PRO_WorkHoursReportEntry(FParentID,CFEmployeeID,CFClockTime,
|
|
|
CFClockLocation,CFData,CFWorkingHours,
|
|
|
- CFNotes,FSeq,Fid
|
|
|
- )
|
|
|
- values
|
|
|
- <foreach collection="workList" item="item" index="index" separator=",">
|
|
|
- (
|
|
|
+ CFNotes,FSeq,Fid)
|
|
|
+ <foreach collection="workList" item="item" index="index" separator="UNION ALL">
|
|
|
+ SELECT
|
|
|
#{item.parent},#{item.employee},
|
|
|
- #{item.clockTime},#{item.clockLocation},#{item.data},
|
|
|
+ #{item.clockTime},#{item.clockLocation},to_date(#{item.clockTime},'YYYY-MM-DD'),
|
|
|
#{item.WorkingHours},#{item.notes},
|
|
|
#{item.seq}, newbosid('22DCD041')
|
|
|
- )
|
|
|
+ FROM dual
|
|
|
</foreach>
|
|
|
+
|
|
|
</insert>
|
|
|
|
|
|
</mapper>
|