|
|
|
@ -4,4 +4,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="org.dromara.dms.mapper.DmsFaultInstanceActivityMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="DmsFaultInstanceActivity" id="DmsFaultInstanceActivityResult">
|
|
|
|
|
<result property="instanceActivityId" column="instance_activity_id" />
|
|
|
|
|
<result property="repairInstanceId" column="repair_instance_id" />
|
|
|
|
|
<result property="processActivityId" column="process_activity_id" />
|
|
|
|
|
<result property="faultType" column="fault_type" />
|
|
|
|
|
<result property="faultDescription" column="fault_description" />
|
|
|
|
|
<result property="designOperations" column="design_operations" />
|
|
|
|
|
<result property="machineId" column="machine_id" />
|
|
|
|
|
<result property="repairType" column="repair_type" />
|
|
|
|
|
<result property="outsourcingId" column="outsourcing_id" />
|
|
|
|
|
<result property="processHandleResolution" column="process_handle_resolution" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="processHandleStatus" column="process_handle_status" />
|
|
|
|
|
<result property="processStepOrder" column="process_step_order" />
|
|
|
|
|
<result property="startTime" column="start_time" />
|
|
|
|
|
<result property="endTime" column="end_time" />
|
|
|
|
|
<result property="handleUserId" column="handle_user_id" />
|
|
|
|
|
<result property="handleBy" column="handle_by" />
|
|
|
|
|
<result property="handleTime" column="handle_time" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="transferUserId" column="transfer_user_id" />
|
|
|
|
|
<result property="attr1" column="attr1" />
|
|
|
|
|
<result property="approveStatus" column="approveStatus" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 先查询出该工单审批到了第几步,然后根据步骤查询拥有权限的对象id集合 -->
|
|
|
|
|
<!-- <select id="selectUserIdByDmsFaultInstanceActivity" parameterType="Long" resultType="java.lang.Long">
|
|
|
|
|
select auth_target_id from wf_process_activity_auth where process_activity_id =(
|
|
|
|
|
select process_activity_id
|
|
|
|
|
from wf_process_activity
|
|
|
|
|
where wf_process_id = 102
|
|
|
|
|
and process_activity_order = (1+(select max(process_step_order)
|
|
|
|
|
from dms_fault_instance_activity
|
|
|
|
|
where repair_instance_id=#{repairInstanceId})))
|
|
|
|
|
</select>-->
|
|
|
|
|
<select id="selectDmsFaultInstanceActivityByRepairIdMin" parameterType="Long" resultMap="DmsFaultInstanceActivityResult">
|
|
|
|
|
select *
|
|
|
|
|
from dms_fault_instance_activity
|
|
|
|
|
where instance_activity_id = (select min(instance_activity_id) FROM dms_fault_instance_activity where repair_instance_id = #{repairInstanceId})
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectPartsById" resultType="org.dromara.dms.domain.vo.DmsFaultComponentsPartsVo"
|
|
|
|
|
parameterType="java.lang.Long">
|
|
|
|
|
SELECT x.* FROM dms_fault_components_parts x where x.repair_instance_id = #{repairInstanceId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectRepairInstanceId" resultType="java.lang.Long" parameterType="java.lang.Long">
|
|
|
|
|
SELECT x.repair_instance_id FROM dms_fault_instance_activity x where x.instance_activity_id =#{activityId}
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|