|
@@ -1,11 +1,11 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.qy.worksheetsystem.model.mapper.PersonWorkMapper">
|
|
|
- <select id="selectBillKey" resultType="String">
|
|
|
- select newbosid('CF9DCEB1') as id from dual
|
|
|
+ <select id="selectBillKey" resultType="String" useCache="false">
|
|
|
+ select newbosid('CF9DCEB1') as id from dual where #{time}=#{time}
|
|
|
</select>
|
|
|
- <select id="selectKeyByBosTyoe" resultType="String">
|
|
|
- select newbosid(#{bosTyoe}) as id from dual
|
|
|
+ <select id="selectKeyByBosTyoe" resultType="String" useCache="false">
|
|
|
+ select newbosid(#{bosTyoe}) as id from dual where #{time}=#{time}
|
|
|
</select>
|
|
|
<select id="getAvailableDateInfo" resultType="java.util.Map">
|
|
|
SELECT
|
|
@@ -28,7 +28,6 @@
|
|
|
AND w.FISDEFAULT=1
|
|
|
order by item.FDate
|
|
|
</select>
|
|
|
- <!---->
|
|
|
<select id="getPersonWorkList" resultType="java.util.Map">
|
|
|
select p.fnumber "personNumber",p.fname_l2 "personName",
|
|
|
whr.CFAffiliatedProjec "projectID", pm.CFProjectName "projectName",
|
|
@@ -48,6 +47,30 @@
|
|
|
and whr.fbillState=0
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <!---->
|
|
|
+ <select id="getPersonWorkListV2" resultMap="JobBookingEntry">
|
|
|
+ select whr.fid "id",to_char(whr.CFFILLINGSTARTDATE,'YYYY-MM-DD') "startDate",
|
|
|
+ to_char(whr.CFFILLINGENDDATE,'YYYY-MM-DD') "endDate" , whr.FBILLSTATE "state",
|
|
|
+ p.fid "personId",p.fname_l2 "personName",p.fnumber "personNumber",
|
|
|
+ pm.CFPROJECTNAME "projectName",pm.fid "projectId",
|
|
|
+ to_char(hre.CFDATA,'YYYY-MM-DD') "workingDate",hre.CFWORKINGHOURS "workingHours",
|
|
|
+ hre.CFNOTES "notes",hre.FSEQ "seq",
|
|
|
+ hre.fid "entryId"
|
|
|
+ from
|
|
|
+ CT_PRO_WorkHoursReportEntry hre
|
|
|
+ left join CT_PRO_WorkHoursReport whr on whr.fid=hre.FParentID
|
|
|
+ left join CT_PRO_ProjectManagement pm on pm.FID=whr.CFAffiliatedProjec
|
|
|
+ left join t_bd_person p on hre.CFEmployeeID=p.FID
|
|
|
+ where p.fnumber=#{number}
|
|
|
+ and hre.CfData BETWEEN to_date(#{beginTime},'YYYY-MM-DD')
|
|
|
+ AND to_date(#{endTime},'YYYY-MM-DD')
|
|
|
+ <if test="state==true">
|
|
|
+ and whr.fbillState!=0
|
|
|
+ </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"
|
|
|
from CT_PRO_WorkHoursReportEntry hre
|
|
@@ -77,10 +100,10 @@
|
|
|
<foreach collection="billList" item="item" index="index" separator="UNION ALL">
|
|
|
SELECT
|
|
|
#{item.affiliatedProject}, #{item.adminOrg}, #{item.hrOrgUnit},
|
|
|
- #{item.billState}, #{item.number}, #{item.bizDate},
|
|
|
+ #{item.billState}, #{item.number}, SYSDATE,
|
|
|
#{item.creator}, SYSDATE, #{item.lastUpdateUser},
|
|
|
SYSDATE, #{item.CU}, #{item.id},
|
|
|
- 'employeeReport', #{item.fillingStartDate}, #{item.fillingEndDate}
|
|
|
+ 'employeeReport', to_date(#{item.fillingStartDate},'YYYY-MM-DD'), to_date(#{item.fillingEndDate},'YYYY-MM-DD')
|
|
|
FROM dual
|
|
|
</foreach>
|
|
|
|
|
@@ -117,14 +140,15 @@
|
|
|
<result column="notes" property="notes"/>
|
|
|
<result column="workingHours" property="workingHours"/>
|
|
|
<result column="workingDate" property="workingDate"/>
|
|
|
+ <result column="workingDate" property="date"/>
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
<select id="getPersonWorkInfoById" resultMap="JobBookingEntry">
|
|
|
- select whr.fid "id",whr.CFFILLINGSTARTDATE "startDate",
|
|
|
- whr.CFFILLINGENDDATE "endDate" , whr.FBILLSTATE "state",
|
|
|
+ select whr.fid "id",to_char(whr.CFFILLINGSTARTDATE,'YYYY-MM-DD') "startDate",
|
|
|
+ to_char(whr.CFFILLINGENDDATE,'YYYY-MM-DD') "endDate" , whr.FBILLSTATE "state",
|
|
|
p.fid "personId",p.fname_l2 "personName",p.fnumber "personNumber",
|
|
|
pm.CFPROJECTNAME "projectName",pm.fid "projectId",
|
|
|
- hre.CFDATA "workingDate",hre.CFWORKINGHOURS "workingHours",
|
|
|
+ to_char(hre.CFDATA,'YYYY-MM-DD') "workingDate",hre.CFWORKINGHOURS "workingHours",
|
|
|
hre.CFNOTES "notes",hre.FSEQ "seq",
|
|
|
hre.fid "entryId"
|
|
|
from
|