|
|
@@ -140,22 +140,34 @@
|
|
|
</select>
|
|
|
|
|
|
<resultMap id="BaseResultMap"
|
|
|
- type="com.railway.business.safetool.domain.vo.SecScheduledDetailVo">
|
|
|
+ type="com.railway.business.safetool.domain.vo.SecScheduledToolListVo">
|
|
|
<result column="id" property="id"/>
|
|
|
<result column="dept_id" property="deptId"/>
|
|
|
<result column="lab_id" property="labId"/>
|
|
|
<result column="scheduled_time" property="scheduledTime"/>
|
|
|
<result column="deptName" property="deptName"/>
|
|
|
<result column="labName" property="labName"/>
|
|
|
+ <collection property="baseSafetyTools"
|
|
|
+ ofType="com.railway.business.safetool.domain.vo.SecScheduledToolVo">
|
|
|
+ <result column="tool_id" property="toolId"/>
|
|
|
+ <result column="tool_code" property="toolCode"/>
|
|
|
+ <result column="scheduled_tool_id" property="id"/>
|
|
|
+ <result column="unit" property="unit"/>
|
|
|
+ <result column="toolName" property="toolName"/>
|
|
|
+ </collection>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getInfo" resultMap="BaseResultMap">
|
|
|
select s.id, s.dept_id, s.lab_id, s.scheduled_time,
|
|
|
- d1.dept_name deptName, d2.dept_name labName
|
|
|
+ d1.dept_name deptName, d2.dept_name labName,
|
|
|
+ d3.dict_label toolName ,t.unit,t.tool_id,t.tool_code, r.id as scheduled_tool_id
|
|
|
FROM sec_scheduled s
|
|
|
+ LEFT JOIN sec_scheduled_tool r ON r.scheduled_id = s.id
|
|
|
+ INNER JOIN base_safety_tool t ON t.tool_id = r.tool_id
|
|
|
left join sys_dept d1 on s.dept_id = d1.dept_id
|
|
|
left join sys_dept d2 on s.lab_id = d2.dept_id
|
|
|
- WHERE s.del_flag = '0' and s.state = 0
|
|
|
+ left join sys_dict_data d3 on d3.dict_type = 'tool_type' and d3.dict_value = t.tool_type
|
|
|
+ WHERE s.del_flag = '0' and s.state = 0 and t.del_flag = '0' and t.state = '1'
|
|
|
and s.id=#{id}
|
|
|
</select>
|
|
|
|