|
@@ -42,10 +42,10 @@
|
|
|
and hre.CfData BETWEEN to_date(#{beginTime},'YYYY-MM-DD')
|
|
|
AND to_date(#{endTime},'YYYY-MM-DD')
|
|
|
<if test="state==true">
|
|
|
- and whr.fbillState=2
|
|
|
+ and whr.fbillState!=0
|
|
|
</if>
|
|
|
<if test="state==false">
|
|
|
- and whr.fbillState=1
|
|
|
+ and whr.fbillState=0
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="getPersonWorkSumInfo" resultType="java.util.Map">
|
|
@@ -58,10 +58,10 @@
|
|
|
and hre.CfData BETWEEN to_date(#{beginTime},'YYYY-MM-DD')
|
|
|
AND to_date(#{endTime},'YYYY-MM-DD')
|
|
|
<if test="state==true">
|
|
|
- and whr.fbillState=2
|
|
|
+ and whr.fbillState!=0
|
|
|
</if>
|
|
|
<if test="state==false">
|
|
|
- and whr.fbillState=1
|
|
|
+ and whr.fbillState=0
|
|
|
</if>
|
|
|
group by whr.fbillState
|
|
|
</select>
|
|
@@ -99,22 +99,40 @@
|
|
|
FROM dual
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
- <select id="getPersonWorkInfoById" resultType="java.util.Map">
|
|
|
- select whr.fbillState "state",sum(hre.CFWorkingHours) "WorkingHours"
|
|
|
- from CT_PRO_WorkHoursReportEntry hre
|
|
|
+ <resultMap id="JobBookingEntry" type="com.qy.worksheetsystem.model.entity.JobBooking" >
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <result column="startDate" property="beginTime"/>
|
|
|
+ <result column="endDate" property="endTime"/>
|
|
|
+ <result column="state" property="state"/>
|
|
|
+ <result column="projectName" property="projectName"/>
|
|
|
+ <result column="projectId" property="projectId"/>
|
|
|
+ <association property="person" javaType="com.qy.worksheetsystem.model.entity.JobBookPerson">
|
|
|
+ <id property="personId" column="personId" />
|
|
|
+ <result column="personName" property="personName" />
|
|
|
+ <result column="personNumber" property="personNumber" />
|
|
|
+ </association>
|
|
|
+ <collection property="entries" ofType="com.qy.worksheetsystem.model.entity.JobBookingEntry">
|
|
|
+ <id column="entryId" property="entryId"/>
|
|
|
+ <result column="seq" property="seq"/>
|
|
|
+ <result column="notes" property="notes"/>
|
|
|
+ <result column="workingHours" property="workingHours"/>
|
|
|
+ <result column="workingDate" property="workingDate"/>
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
+ <select id="getPersonWorkInfoById" resultMap="JobBookingEntry">
|
|
|
+ select whr.fid "id",whr.CFFILLINGSTARTDATE "startDate",
|
|
|
+ whr.CFFILLINGENDDATE "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",
|
|
|
+ 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=2
|
|
|
- </if>
|
|
|
- <if test="state==false">
|
|
|
- and whr.fbillState=1
|
|
|
- </if>
|
|
|
- group by whr.fbillState
|
|
|
+ where whr.fid =#{id}
|
|
|
</select>
|
|
|
<delete id="deleteWork" parameterType="String">
|
|
|
delete CT_PRO_WorkHoursReport where fid =#{id}
|