|
@@ -202,4 +202,146 @@
|
|
|
) t
|
|
) t
|
|
|
ORDER BY create_time DESC
|
|
ORDER BY create_time DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="selectMobileUnionOrderList" resultMap="OrderScoreInfoResult">
|
|
|
|
|
+ SELECT * FROM (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ 1 as order_type,
|
|
|
|
|
+ id as id,
|
|
|
|
|
+ work_order_project_no as work_order_project_no,
|
|
|
|
|
+ work_order_status as work_order_status,
|
|
|
|
|
+ gxt_center_id as gxt_center_id,
|
|
|
|
|
+ gxt_center as gxt_center,
|
|
|
|
|
+ pcs_station_id as pcs_station_id,
|
|
|
|
|
+ pcs_station_pid as pcs_station_pid,
|
|
|
|
|
+ pcs_station_name as pcs_station_name,
|
|
|
|
|
+ pcs_device_id as pcs_device_id,
|
|
|
|
|
+ pcs_device_name as pcs_device_name,
|
|
|
|
|
+ brand as brand,
|
|
|
|
|
+ model as model,
|
|
|
|
|
+ assign_time as assign_time,
|
|
|
|
|
+ assign_user_id as assign_user_id,
|
|
|
|
|
+ assign_user_name as assign_user_name,
|
|
|
|
|
+ accept_time as accept_time,
|
|
|
|
|
+ accept_user_id as accept_user_id,
|
|
|
|
|
+ accept_user_name as accept_user_name,
|
|
|
|
|
+ real_start_time as real_start_time,
|
|
|
|
|
+ real_end_time as real_end_time,
|
|
|
|
|
+ team_leader_id as team_leader_id,
|
|
|
|
|
+ team_leader_name as team_leader_name,
|
|
|
|
|
+ work_group_member_id as work_group_member_id,
|
|
|
|
|
+ work_group_member_name as work_group_member_name,
|
|
|
|
|
+ score as score,
|
|
|
|
|
+ review_content as review_content,
|
|
|
|
|
+ suspend_reason as suspend_reason,
|
|
|
|
|
+ restart_time as restart_time,
|
|
|
|
|
+ priority_type as priority_type,
|
|
|
|
|
+ real_end_time as work_end_time,
|
|
|
|
|
+ scoring_status as scoring_status,
|
|
|
|
|
+ content as work_summary,
|
|
|
|
|
+ maintenance_type as maintenance_type,
|
|
|
|
|
+ null as inspection_type,
|
|
|
|
|
+ null as plan_start_time,
|
|
|
|
|
+ null as plan_end_time,
|
|
|
|
|
+ plan_hour as plan_hour,
|
|
|
|
|
+ fault_code as fault_code,
|
|
|
|
|
+ fault_desc as fault_desc,
|
|
|
|
|
+ occur_time as occur_time,
|
|
|
|
|
+ null as suspend_time,
|
|
|
|
|
+ null as pause_reason,
|
|
|
|
|
+ null as pause_time,
|
|
|
|
|
+ null as complete_time,
|
|
|
|
|
+ review_score_num as review_score_num,
|
|
|
|
|
+ final_coefficient as final_coefficient,
|
|
|
|
|
+ create_time as create_time,
|
|
|
|
|
+ update_time as update_time
|
|
|
|
|
+ FROM gxt_repair_order t
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="repairOrder.workOrderProjectNo != null and repairOrder.workOrderProjectNo != ''"> and work_order_project_no = #{repairOrder.workOrderProjectNo}</if>
|
|
|
|
|
+ <if test="repairOrder.workOrderStatus != null and repairOrder.workOrderStatus != ''"> and work_order_status = #{repairOrder.workOrderStatus}</if>
|
|
|
|
|
+ <if test="repairOrder.gxtCenterId != null"> and gxt_center_id = #{repairOrder.gxtCenterId}</if>
|
|
|
|
|
+ <if test="repairOrder.gxtCenter != null and repairOrder.gxtCenter != ''"> and gxt_center = #{repairOrder.gxtCenter}</if>
|
|
|
|
|
+ <if test="repairOrder.pcsStationId != null"> and pcs_station_id = #{repairOrder.pcsStationId}</if>
|
|
|
|
|
+ <if test="repairOrder.pcsStationName != null and repairOrder.pcsStationName != ''"> and pcs_station_name = #{repairOrder.pcsStationName}</if>
|
|
|
|
|
+ <if test="repairOrder.pcsDeviceId != null"> and pcs_device_id = #{repairOrder.pcsDeviceId}</if>
|
|
|
|
|
+ <if test="repairOrder.pcsDeviceName != null and repairOrder.pcsDeviceName != ''"> and pcs_device_name like concat('%', #{repairOrder.pcsDeviceName}, '%')</if>
|
|
|
|
|
+ <if test="repairOrder.teamLeaderName != null and repairOrder.teamLeaderName != ''"> and team_leader_name like concat('%', #{repairOrder.teamLeaderName}, '%')</if>
|
|
|
|
|
+ <if test="repairOrder.scoringStatus != null"> and scoring_status = #{repairOrder.scoringStatus}</if>
|
|
|
|
|
+ <!-- 业务特定数据权限过滤条件 -->
|
|
|
|
|
+ <if test="repairOrder.params.businessDataScope != null and repairOrder.params.businessDataScope != ''">
|
|
|
|
|
+ ${repairOrder.params.businessDataScope}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+
|
|
|
|
|
+ UNION ALL
|
|
|
|
|
+
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ 2 as order_type,
|
|
|
|
|
+ id as id,
|
|
|
|
|
+ work_order_project_no as work_order_project_no,
|
|
|
|
|
+ work_order_status as work_order_status,
|
|
|
|
|
+ gxt_center_id as gxt_center_id,
|
|
|
|
|
+ gxt_center as gxt_center,
|
|
|
|
|
+ pcs_station_id as pcs_station_id,
|
|
|
|
|
+ pcs_station_pid as pcs_station_pid,
|
|
|
|
|
+ pcs_station_name as pcs_station_name,
|
|
|
|
|
+ pcs_device_id as pcs_device_id,
|
|
|
|
|
+ pcs_device_name as pcs_device_name,
|
|
|
|
|
+ brand as brand,
|
|
|
|
|
+ model as model,
|
|
|
|
|
+ assign_time as assign_time,
|
|
|
|
|
+ assign_user_id as assign_user_id,
|
|
|
|
|
+ assign_user_name as assign_user_name,
|
|
|
|
|
+ accept_time as accept_time,
|
|
|
|
|
+ accept_user_id as accept_user_id,
|
|
|
|
|
+ accept_user_name as accept_user_name,
|
|
|
|
|
+ real_start_time as real_start_time,
|
|
|
|
|
+ real_end_time as real_end_time,
|
|
|
|
|
+ team_leader_id as team_leader_id,
|
|
|
|
|
+ team_leader_name as team_leader_name,
|
|
|
|
|
+ work_group_member_id as work_group_member_id,
|
|
|
|
|
+ work_group_member_name as work_group_member_name,
|
|
|
|
|
+ score as score,
|
|
|
|
|
+ review_content as review_content,
|
|
|
|
|
+ suspend_reason as suspend_reason,
|
|
|
|
|
+ restart_time as restart_time,
|
|
|
|
|
+ priority_type as priority_type,
|
|
|
|
|
+ real_end_time as work_end_time,
|
|
|
|
|
+ scoring_status as scoring_status,
|
|
|
|
|
+ real_content as work_summary,
|
|
|
|
|
+ null as maintenance_type,
|
|
|
|
|
+ inspection_type as inspection_type,
|
|
|
|
|
+ plan_start_time as plan_start_time,
|
|
|
|
|
+ plan_end_time as plan_end_time,
|
|
|
|
|
+ plan_hour as plan_hour,
|
|
|
|
|
+ fault_code as fault_code,
|
|
|
|
|
+ fault_desc as fault_desc,
|
|
|
|
|
+ null as occur_time,
|
|
|
|
|
+ suspend_time as suspend_time,
|
|
|
|
|
+ pause_reason as pause_reason,
|
|
|
|
|
+ pause_time as pause_time,
|
|
|
|
|
+ complete_time as complete_time,
|
|
|
|
|
+ review_score_num as review_score_num,
|
|
|
|
|
+ final_coefficient as final_coefficient,
|
|
|
|
|
+ create_time as create_time,
|
|
|
|
|
+ update_time as update_time
|
|
|
|
|
+ FROM gxt_work_order t
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="workOrder.workOrderProjectNo != null and workOrder.workOrderProjectNo != ''"> and work_order_project_no = #{workOrder.workOrderProjectNo}</if>
|
|
|
|
|
+ <if test="workOrder.workOrderStatus != null and workOrder.workOrderStatus != ''"> and work_order_status = #{workOrder.workOrderStatus}</if>
|
|
|
|
|
+ <if test="workOrder.gxtCenterId != null"> and gxt_center_id = #{workOrder.gxtCenterId}</if>
|
|
|
|
|
+ <if test="workOrder.gxtCenter != null and workOrder.gxtCenter != ''"> and gxt_center = #{workOrder.gxtCenter}</if>
|
|
|
|
|
+ <if test="workOrder.pcsStationId != null"> and pcs_station_id = #{workOrder.pcsStationId}</if>
|
|
|
|
|
+ <if test="workOrder.pcsStationName != null and workOrder.pcsStationName != ''"> and pcs_station_name = #{workOrder.pcsStationName}</if>
|
|
|
|
|
+ <if test="workOrder.pcsDeviceId != null"> and pcs_device_id = #{workOrder.pcsDeviceId}</if>
|
|
|
|
|
+ <if test="workOrder.pcsDeviceName != null and workOrder.pcsDeviceName != ''"> and pcs_device_name like concat('%', #{workOrder.pcsDeviceName}, '%')</if>
|
|
|
|
|
+ <if test="workOrder.teamLeaderName != null and workOrder.teamLeaderName != ''"> and team_leader_name like concat('%', #{workOrder.teamLeaderName}, '%')</if>
|
|
|
|
|
+ <if test="workOrder.scoringStatus != null"> and scoring_status = #{workOrder.scoringStatus}</if>
|
|
|
|
|
+ <!-- 业务特定数据权限过滤条件 -->
|
|
|
|
|
+ <if test="workOrder.params.businessDataScope != null and workOrder.params.businessDataScope != ''">
|
|
|
|
|
+ ${workOrder.params.businessDataScope}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ) t
|
|
|
|
|
+ ORDER BY create_time DESC
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|