|  |  |  | 
|---|
|  |  |  | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> | 
|---|
|  |  |  | <result property="memo" column="memo" jdbcType="VARCHAR"/> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> | 
|---|
|  |  |  | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog" extends="BaseResultMap"> | 
|---|
|  |  |  | <result property="planName" column="plan_name" jdbcType="VARCHAR"/> | 
|---|
|  |  |  | <result property="stationName" column="station_name" jdbcType="VARCHAR"/> | 
|---|
|  |  |  | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> | 
|---|
|  |  |  | 
|---|
|  |  |  | select | 
|---|
|  |  |  | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name | 
|---|
|  |  |  | FROM | 
|---|
|  |  |  | sta_device_last t | 
|---|
|  |  |  | ( | 
|---|
|  |  |  | select <include refid="Base_Column_List" /> from sta_device_production_log_past where  device_no = #{deviceNo,jdbcType=VARCHAR} union | 
|---|
|  |  |  | select <include refid="Base_Column_List" /> from sta_device_production_log where device_no = #{deviceNo,jdbcType=VARCHAR} | 
|---|
|  |  |  | ) t | 
|---|
|  |  |  | left join pr_assembly_plan p on t.plan_id=p.id | 
|---|
|  |  |  | left join plt_station s on s.id = t.station_id | 
|---|
|  |  |  | left JOIN ba_user u on u.id=t.updated_by | 
|---|
|  |  |  | where  t.device_no = #{deviceNo,jdbcType=VARCHAR} | 
|---|
|  |  |  | ORDER BY t.id DESC | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|