| | |
| | | <!-- 保存巡检计划信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveInspectionPlanInfo" parameterType="Map"> |
| | | insert into inspection_plan( |
| | | inspection_plan_name,create_user_id,inspection_route_id,inspection_plan_period,remark,create_user_name,sign_type,start_time,inspection_plan_id,end_time,state,community_id |
| | | inspection_plan_name,create_user_id,inspection_route_id,inspection_plan_period,remark, |
| | | create_user_name,sign_type,start_time,inspection_plan_id,end_time,state,community_id, |
| | | start_date,end_date,inspection_month,inspection_day,inspection_workday,before_time,can_reexamine |
| | | ) values ( |
| | | #{inspectionPlanName},#{createUserId},#{inspectionRouteId},#{inspectionPlanPeriod},#{remark},#{createUserName},#{signType},#{startTime},#{inspectionPlanId},#{endTime},#{state},#{communityId} |
| | | #{inspectionPlanName},#{createUserId},#{inspectionRouteId},#{inspectionPlanPeriod},#{remark}, |
| | | #{createUserName},#{signType},#{startTime},#{inspectionPlanId},#{endTime},#{state},#{communityId}, |
| | | #{startDate},#{endDate},#{inspectionMonth},#{inspectionDay},#{inspectionWorkday},#{beforeTime},#{canReexamine} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询巡检计划信息 add by wuxw 2018-07-03 --> |
| | | <select id="getInspectionPlanInfo" parameterType="Map" resultType="Map"> |
| | | |
| | | select t.inspection_plan_name,t.inspection_plan_name inspectionPlanName,t.create_user_id,t.create_user_id |
| | | createUserId,t.inspection_route_id,t.inspection_route_id |
| | | inspectionRouteId,t.inspection_plan_period,t.inspection_plan_period |
| | | createUserId,t.inspection_route_id,t.inspection_route_id inspectionRouteId |
| | | ,t.can_reexamine,t.can_reexamine canReexamine,t.inspection_plan_period,t.inspection_plan_period |
| | | inspectionPlanPeriod,t.remark,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd |
| | | statusCd,t.sign_type,t.sign_type signType,t.start_time,t.start_time |
| | | startTime,t.inspection_plan_id,t.inspection_plan_id inspectionPlanId,t.end_time,t.end_time |
| | | endTime,t.state,t.community_id,t.community_id communityId |
| | | endTime,t.state,t.community_id,t.community_id communityId, |
| | | DATE_FORMAT(t.start_date,'%Y-%m-%d') startDate,DATE_FORMAT(t.end_date,'%Y-%m-%d') endDate,t.inspection_month inspectionMonth,t.inspection_day inspectionDay, |
| | | t.inspection_workday inspectionWorkday,t.before_time beforeTime,t.create_time createTime, |
| | | d.name stateName, |
| | | c.name inspectionPlanPeriodName, |
| | | i.name signTypeName |
| | | from inspection_plan t |
| | | inner join t_dict d on t.state = d.status_cd and d.table_name = 'inspection_plan' and d.table_columns = 'state' |
| | | inner join t_dict c on t.inspection_plan_period = c.status_cd and c.table_name = 'inspection_plan' and |
| | | c.table_columns = 'inspection_plan_period' |
| | | inner join t_dict i on t.sign_type = i.status_cd and i.table_name = 'inspection_plan' and i.table_columns = |
| | | 'sign_type' |
| | | where 1 =1 |
| | | <if test="inspectionPlanName !=null and inspectionPlanName != ''"> |
| | | and t.inspection_plan_name= #{inspectionPlanName} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="canReexamine !=null and canReexamine != ''"> |
| | | and t.can_reexamine= #{canReexamine} |
| | | </if> |
| | | <if test="inspectionRouteId !=null and inspectionRouteId != ''"> |
| | | and t.inspection_route_id= #{inspectionRouteId} |
| | |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="startDate !=null and startDate != ''"> |
| | | and t.start_date= #{startDate} |
| | | </if> |
| | | <if test="endDate !=null and endDate != ''"> |
| | | and t.end_date= #{endDate} |
| | | </if> |
| | | <if test="beforeTime !=null and beforeTime != ''"> |
| | | and t.before_time = #{beforeTime} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="inspectionPlanName !=null and inspectionPlanName != ''"> |
| | | , t.inspection_plan_name= #{inspectionPlanName} |
| | | </if> |
| | | <if test="canReexamine !=null and canReexamine != ''"> |
| | | , t.can_reexamine= #{canReexamine} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | , t.create_user_id= #{createUserId} |
| | |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | |
| | | <if test="startDate !=null and startDate != ''"> |
| | | , t.start_date= #{startDate} |
| | | </if> |
| | | <if test="endDate !=null and endDate != ''"> |
| | | , t.end_date= #{endDate} |
| | | </if> |
| | | |
| | | <if test="inspectionMonth !=null and inspectionMonth != ''"> |
| | | , t.inspection_month = #{inspectionMonth} |
| | | </if> |
| | | <if test="inspectionDay !=null and inspectionDay != ''"> |
| | | , t.inspection_day= #{inspectionDay} |
| | | </if> |
| | | <if test="inspectionWorkday !=null and inspectionWorkday != ''"> |
| | | ,t.inspection_workday= #{inspectionWorkday} |
| | | </if> |
| | | <if test="beforeTime !=null and beforeTime != ''"> |
| | | , t.before_time = #{beforeTime} |
| | | </if> |
| | | |
| | | where 1=1 |
| | | <if test="inspectionPlanId !=null and inspectionPlanId != ''"> |
| | | and t.inspection_plan_id= #{inspectionPlanId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="canReexamine !=null and canReexamine != ''"> |
| | | and t.can_reexamine= #{canReexamine} |
| | | </if> |
| | | <if test="inspectionRouteId !=null and inspectionRouteId != ''"> |
| | | and t.inspection_route_id= #{inspectionRouteId} |
| | |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="startDate !=null and startDate != ''"> |
| | | and t.start_date= #{startDate} |
| | | </if> |
| | | <if test="endDate !=null and endDate != ''"> |
| | | and t.end_date= #{endDate} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="beforeTime !=null and beforeTime != ''"> |
| | | and t.before_time = #{beforeTime} |
| | | </if> |
| | | |
| | | |
| | | </select> |