|
@@ -141,4 +141,100 @@
|
|
|
<!--#############################电梯日历数据库代码####################################-->
|
|
|
<!--################################################################################-->
|
|
|
|
|
|
+ <!-- 获取当前时间到月末时间段内的公司维保计划 -->
|
|
|
+ <select id="getMonthNowToEndMtPlan"
|
|
|
+ parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
|
|
|
+ resultType="cn.com.ty.lift.system.homepage.dao.model.MtPlanDataModel">
|
|
|
+ select
|
|
|
+ <include refid="liftInfoSql"></include>
|
|
|
+ mp.plan_date as planDate,
|
|
|
+ mp.status as status
|
|
|
+ from
|
|
|
+ maintenance_plan mp
|
|
|
+ left join
|
|
|
+ lift l
|
|
|
+ on
|
|
|
+ mp.lift_id = l.id
|
|
|
+ <include refid="liftInfoJoinSql"></include>
|
|
|
+ where
|
|
|
+ mp.mt_company_id = #{mtCompanyId}
|
|
|
+ and
|
|
|
+ mp.plan_date <![CDATA[ >= ]]> #{monthEndStr}
|
|
|
+ and
|
|
|
+ mp.plan_date <![CDATA[ <= ]]> #{monthEndStr}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 获取月初到当前时间段内公司的维保记录信息 -->
|
|
|
+ <select id="getMonthBeginToNowMtRecord"
|
|
|
+ parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
|
|
|
+ resultType="cn.com.ty.lift.system.homepage.dao.model.MtRecordDataModel">
|
|
|
+ select
|
|
|
+ <include refid="liftInfoSql"></include>
|
|
|
+ mr.work_date as workDate,
|
|
|
+ mr.status as status
|
|
|
+ from
|
|
|
+ maintenance_record mr
|
|
|
+ left join
|
|
|
+ lift l
|
|
|
+ on
|
|
|
+ mr.lift_id = l.id
|
|
|
+ <include refid="liftInfoJoinSql"></include>
|
|
|
+ where
|
|
|
+ mr.mt_company_id = #{mtCompanyId}
|
|
|
+ and
|
|
|
+ mr.work_date <![CDATA[ >= ]]> #{monthBeginStr}
|
|
|
+ and
|
|
|
+ mr.work_date <![CDATA[ <= ]]> #{monthEndStr}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 获取月初到当前时间段内公司的急修记录信息 -->
|
|
|
+ <select id="getMonthBeginToNowEmergencyRecord"
|
|
|
+ parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
|
|
|
+ resultType="cn.com.ty.lift.system.homepage.dao.model.EmergencyRecordDataModel">
|
|
|
+ select
|
|
|
+ <include refid="liftInfoSql"></include>
|
|
|
+ er.caller_date as callerDate,
|
|
|
+ er.recovery_date as recoveryDate,
|
|
|
+ er.status as status
|
|
|
+ from
|
|
|
+ emergency_repair er
|
|
|
+ left join
|
|
|
+ lift l
|
|
|
+ on
|
|
|
+ er.lift_id = l.id
|
|
|
+ <include refid="liftInfoJoinSql"></include>
|
|
|
+ where
|
|
|
+ er.mt_company_id = #{mtCompanyId}
|
|
|
+ and
|
|
|
+ er.caller_date <![CDATA[ >= ]]> #{monthBeginStr}
|
|
|
+ and
|
|
|
+ er.caller_date <![CDATA[ <= ]]> #{monthEndStr}
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 获取本月时间段内的年检记录信息 -->
|
|
|
+ <select id="getMonthBeginToEndAnnualInspectionRecord"
|
|
|
+ parameterType="cn.com.ty.lift.system.homepage.dao.dto.request.PlatformCalendarRequest"
|
|
|
+ resultType="cn.com.ty.lift.system.homepage.dao.model.AnnualInspectionDataModel">
|
|
|
+ select
|
|
|
+ <include refid="liftInfoSql"></include>
|
|
|
+ ai.finish_time as finishTime,
|
|
|
+ ai.status as status
|
|
|
+ from
|
|
|
+ annual_inspection ai
|
|
|
+ left join
|
|
|
+ lift l
|
|
|
+ on
|
|
|
+ ai.lift_id = l.id
|
|
|
+ <include refid="liftInfoJoinSql"></include>
|
|
|
+ where
|
|
|
+ ai.mt_company_id = #{mtCompanyId}
|
|
|
+ and
|
|
|
+ ai.finish_time <![CDATA[ >= ]]> #{monthBeginStr}
|
|
|
+ and
|
|
|
+ ai.finish_time <![CDATA[ <= ]]> #{monthEndStr}
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|