application.*,
user.real_name as userName,
user2.real_name as repairUserName,
user3.real_name as checkUserName,
sb.name as sbName,part.name as partName,
sb.no as sbNo, sb.cph as sbCph, sb.model_id as modelId,
error.name as repairErrorTypeName
select
from t_repair_application_form application
left join t_sys_user user on application.user_id = user.user_id
left join t_sys_user user2 on application.repair_user_id = user2.user_id
left join t_sys_user user3 on application.check_user_id = user3.user_id
left join t_sb_info sb on application.sb_id = sb.id
left join t_error_type error on application.repair_error_type_id = error.id
left join t_part_info part on application.part_id = part.id
and ( sb.name like concat('%',#{keyword},'%') or
sb.no like concat('%',#{keyword},'%') or
application.content like concat('%',#{keyword},'%') )
and application.content like concat('%',#{content},'%')
and application.sb_id = #{sbId}
and application.category = #{category}
AND application.category in
#{item}
and sb.zbh = #{zbh}
and application.no = #{no}
and application.plan_flag = #{planFlag}
and application.status = #{status}
and application.actual_user = #{actualUser}
and application.main_repair_id = #{mainRepairId}
and application.out_type = #{outType}
and application.type = #{type}
and application.status = #{status}
and application.user_id = #{userId}
and (application.repair_user_id = #{repairUserId} or application.repair_user_id is null)
and (application.repair_user_id = #{repairUserId} or sb.repair_user_second = #{repairUserId} )
and application.check_user_id = #{checkUserId}
and user2.real_name like concat('%',#{repairUserName},'%')
and application.apply_time = ]]> #{searchStartTime}
and application.apply_time #{searchEndTime}
and application.repair_user_id = #{queryRepairUserId}
AND application.status in
#{item}
and application.repair_start_time ]]> #{repairStartTimeStart}
and application.repair_start_time #{repairStartTimeEnd}
select
from t_repair_application_form application
left join t_sys_user user on application.user_id = user.user_id
left join t_sys_user user2 on application.repair_user_id = user2.user_id
left join t_sys_user user3 on application.check_user_id = user3.user_id
left join t_sb_info sb on application.sb_id = sb.id
left join t_part_info part on application.part_id = part.id
left join t_error_type error on application.repair_error_type_id = error.id
where application.id = #{id,jdbcType=VARCHAR}
select no
from t_repair_application_form
where id = #{id,jdbcType=VARCHAR}
select count(1) as tempTotalNum,sum(fee.fee) as tempTotalFee,rf.status from t_repair_application_form rf
join t_repair_fee fee on fee.repair_id = rf.id
and rf.repair_user_id = #{repairUserId}
and rf.repair_start_time like concat('',#{searchTime},'%')
and rf.type = #{type}
group by rf.status
select * from t_repair_application_form
and repair_start_time ]]> #{searchStartTime}
and repair_start_time #{searchEndTime}
and repair_user_id = #{repairUserId}
select count(1) as tempTotalNum,sum(fee.fee) as tempTotalFee from t_repair_application_form rf
join t_repair_fee fee on fee.repair_id = rf.id
and rf.repair_user_id = #{repairUserId}
and rf.repair_start_time ]]> #{searchStartTime}
and rf.repair_start_time #{searchEndTime}
and rf.type = #{type}