Browse Source

首次提交

java8
ruanqi 3 years ago
parent
commit
93a3ec1d81
  1. 2
      src/main/java/com/xujie/sys/modules/pms/controller/EamReportController.java
  2. 17
      src/main/resources/mapper/pms/EamReportMapper.xml

2
src/main/java/com/xujie/sys/modules/pms/controller/EamReportController.java

@ -35,5 +35,7 @@ public class EamReportController {
PageUtils page = eamReportService.searchEamObjectSumReport(data);
return R.ok().put("page", page);
}
}

17
src/main/resources/mapper/pms/EamReportMapper.xml

@ -10,25 +10,28 @@
select a.Site,a.ObjectID,b.ObjectDesc,b.FamilyID,b.GroupID,1 as qtyAll,case WHEN a.Status='已完工' then 1 else 0 end as qtyFinished, case WHEN a.Status='未开工' then 1 else 0 end as qtyUnFinishied, case WHEN a.Status='已取消' then 1 else 0 end as qtycancelled
from eam_workOrder a left join eam_object b on a.Site=b.Site and a.ObjectID =b.ObjectID
<where>
<if test="query.site != null and query.site != ''">
AND site = #{query.site}
<if test="query.site != null and query.site != ''">
AND a.site = #{query.site}
</if>
<if test="query.objectID != null and query.objectID != ''">
<if test="query.objectID != null and query.objectID != ''">
AND a.ObjectID like '%' + #{query.objectID} +'%'
</if>
<if test="query.objectDesc != null and query.objectDesc != ''">
AND b.ObjectDesc like '%' + #{query.objectDesc} +'%'
</if>
<if test="query.familyID != null and query.familyID != ''">
<if test="query.familyID != null and query.familyID != ''">
AND b.FamilyID like '%' + #{query.familyID}+'%'
</if>
<if test="query.groupID != null and query.groupID != ''">
<if test="query.groupID != null and query.groupID != ''">
AND b.GroupID = #{query.groupID}
</if>
<if test="query.startDate != null ">
<if test="query.functionType != null and query.functionType != ''">
AND a.functionType = #{query.functionType}
</if>
<if test="query.startDate != null ">
AND a.PlanDate >= #{query.startDate}
</if>
<if test="query.endDate != null ">
<if test="query.endDate != null ">
AND #{query.endDate} >= a.PlanDate
</if>
</where>

Loading…
Cancel
Save