diff --git a/src/main/resources/mapper/pms/EamMapper.xml b/src/main/resources/mapper/pms/EamMapper.xml index 3665d7bd..29e1b4c7 100644 --- a/src/main/resources/mapper/pms/EamMapper.xml +++ b/src/main/resources/mapper/pms/EamMapper.xml @@ -2286,12 +2286,11 @@ a.ObjectID FROM eam_workPlan a LEFT JOIN eam_workOrder b ON a.site = b.site AND a.PlanID = b.PlanID and a.FunctionType = b.FunctionType and a.ObjectID = b.ObjectID and a.bu_no = b.bu_no - WHERE a.site = #{site} and a.bu_no = #{buNo} + WHERE a.site = #{site} and a.bu_no = #{buNo} and a.check_type = #{checkType} AND a.ObjectID = #{objectID} AND a.FunctionType = #{functionType} AND a.Status in ('已计划','进行中') AND a.deleteFlag = 'N' AND (convert(varchar(10), a.PlanStartDate, 120) between #{planStartDate} and #{planEndDate} or convert(varchar(10), a.PlanEndDate, 120) between #{planStartDate} and #{planEndDate} - or (DATEDIFF(day, a.PlanStartDate, #{planStartDate}) >= 0 and DATEDIFF(day, #{planEndDate}, a.PlanEndDate) >= 0) - ) + or (DATEDIFF(day, a.PlanStartDate, #{planStartDate}) >= 0 and DATEDIFF(day, #{planEndDate}, a.PlanEndDate) >= 0)) and a.PropertiesCode = #{propertiesCode} and a.plan_cycle = #{planCycle} and a.PlanPeriod = #{planPeriod} and b.Status not in ('已取消','已完成','待审核')